Choose a language javascript

Credit Notes

The credit note object represents credit notes created against a booking.

An example of the charges object

{
"transaction": {
"id": "a9832728-0107-11ed-b939-0242ac120002",
"amount": 130808,
"currency": "GBP",
"completed_at": "2021-12-30T22:41:44.590Z"
},
"metadata": {
"card_type": "DEBIT",
"bin_type": "PERSONAL",
"payment_brand": "VISA",
"issuing_country": "GB",
"last_four_digits": "7287",
"cardholder_name": "Judy Dench"
},
"charges": {
"amount": -850,
"currency": "GBP",
"percentage": 0.65
}
}

transactionobject

The compact transaction object that the charge relates to.

metadata.card_typestring

The card type that the charge was for, can be CREDIT or DEBIT

metadata.bin_typestring

The bin type of the card, can be PERSONAL or COMMERCIAL

metadata.payment_brandstring

The brand of the card that payment was taken on. Most common values are MASTER, AMEX or VISA

metadata.issuing_countrystring

Issuing country of card in ISO 3166 format

metadata.last_four_digitsstring

The last four digits of the payment card

metadata.cardholder_namestring

The name of the cardholder

charges.amountnumber

Total value of charges (in pence)

charges.currencystring

Currency code for charges, in ISO 4217 format

charges.percentagenumber

Percentage of charges of total transaction amount


Fetch all

POST/agent/charges

import axios from 'axios';
const response = await axios(
{
method: 'post',
url: 'https://api.felloh.com/agent/charges',
data: {
organisation: 'X9876',
date_from: '2020-02-01',
date_to: '2021-05-10',
skip: 10,
take: 20
},
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
}
);

RESPONSE

{
"data": [
{
"transaction": {
"id": "a9832728-0107-11ed-b939-0242ac120002",
"amount": 130808,
"currency": "GBP",
"completed_at": "2021-12-30T22:41:44.590Z"
},
"metadata": {
"card_type": "DEBIT",
"bin_type": "PERSONAL",
"payment_brand": "VISA",
"issuing_country": "GB",
"last_four_digits": "7287",
"cardholder_name": "Judy Dench"
},
"charges": {
"amount": -850,
"currency": "GBP",
"percentage": 0.65
}
},
{
"transaction": {
"id": "262baae1-0c47-4bea-adbe-7c0f180771d3",
"amount": 304000,
"currency": "GBP",
"completed_at": "2021-12-30T13:34:03.321Z"
},
"metadata": {
"card_type": "DEBIT",
"bin_type": "PERSONAL",
"payment_brand": "VISA",
"payment_type": "DB",
"issuing_country": "GB",
"last_four_digits": "7073",
"cardholder_name": "Daniel Craig"
},
"charges": {
"amount": -1976,
"currency": "GBP",
"percentage": 0.65
}
}
],
"errors": {},
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6",
"count": 2
}
}

This endpoint retrieves all charges.

HTTP Method

POST

HTTP Endpoint

PRODhttps://api.felloh.com/agent/charges

SANDBOXhttps://sandbox.felloh.com/agent/charges

Payload

ParameterRequiredTypeDescription
organisationtruestringThe organisation ID that you want to fetch charges for. You can find the organisation that you have access to by using the List all organisations method.
skipfalseIntegerSee pagination section for details
takefalseIntegerSee pagination section for details
date_fromfalsedateThe date that you want to get charges from, in ISO 8601 format
date_tofalsedateThe date that you want to get charges to, in ISO 8601 format

Response

Returns an array of Charges Objects