Charges
The charges object represents charges against transactions raised by a merchant acquirer. It includes details such as the booking reference, transaction details, and any associated metadata like card type and country.
Charge Model
Properties
- Name
booking- Type
- object
- Description
Details about the booking, including the Felloh booking ID and your reference.
- Name
charges- Type
- object
- Description
Details about the charges, including amount, currency, and rate.
- Name
metadata- Type
- object
- Description
Metadata related to the transaction, such as card type and country type.
- Name
transaction- Type
- object
- Description
The transaction model that the charge relates to.
{
"booking": {
"id": "ce9c7525-ec4e-44cd-a400-f2b6c8a5e1a9",
"booking_reference": "ABC-1234"
},
"charges": {
"amount": "2013",
"currency": "GBX",
"rate": "0.85"
},
"metadata": {
"level": "PERSONAL",
"card_type": "DEBIT",
"country_type": "DOMESTIC",
"payment_brand": "MASTER"
},
"transaction": {
"id": "a9832728-0107-11ed-b939-0242ac120002",
"amount": 130808,
"completed_at": "2024-03-31T04:01:14.000Z",
"created_at": "2024-03-31T04:00:10.149Z",
"currency": "GBX"
}
}
Fetch All
This endpoint retrieves all charges associated with an organisation within a specified date range.
Parameters
- Name
organisationrequired- Type
- string
- Description
The organisation ID that you want to fetch charges for. You can find the organisation you have access to by using the List all organisations method.
- Name
date_from- Type
- date
- Description
The starting date for fetching charges, in ISO 8601 format.
- Name
date_to- Type
- date
- Description
The ending date for fetching charges, in ISO 8601 format.
- Name
skip- Type
- integer
- Description
Pagination offset - see the pagination section for details.
- Name
take- Type
- integer
- Description
Number of records to return - see the pagination section for details.
Returns
Returns an array of Charge Models
Request
import axios from 'axios';
const response = await axios.post(
'https://api.felloh.com/agent/charges',
{
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": [
{
"booking": {
"id": "ce9c7525-ec4e-44cd-a400-f2b6c8a5e1a9",
"booking_reference": "ABC-1234"
},
"charges": {
"amount": "2013",
"currency": "GBX",
"rate": "0.85"
},
"metadata": {
"level": "PERSONAL",
"card_type": "DEBIT",
"country_type": "DOMESTIC",
"payment_brand": "MASTER"
},
"transaction": {
"id": "a9832728-0107-11ed-b939-0242ac120002",
"amount": 130808,
"completed_at": "2024-03-31T04:01:14.000Z",
"created_at": "2024-03-31T04:00:10.149Z",
"currency": "GBX"
}
}
],
"errors": {},
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6",
"count": 1
}
}
