Charges
The charges object represents charges against transactions raised by a merchant acquirer.
An example of the charges object
{"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"}}
booking.idstring
The felloh booking id for the booking
booking.booking_referencestring
Your reference for the booking
transactionobject
The compact transaction object that the charge relates to.
metadata.levelstring
The bin type of the card
metadata.card_typestring
The card type that the charge was for, can be CREDIT or DEBIT
metadata.country_typestring
Country type of the card, can be DOMESTIC, INTRA or INTER
metadata.payment_brandstring
The brand of the card that payment was taken on. Most common values are MASTER, AMEX or VISA
charges.amountnumber
Total value of charges (in pence)
charges.currencystring
The currency of the transaction | see currency documentation
charges.ratenumber
Rate that the card was charged at
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": [{"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}}
This endpoint retrieves all charges.
HTTP Method
POST
HTTP Endpoint
PRODhttps://api.felloh.com/agent/charges
SANDBOXhttps://sandbox.felloh.com/agent/charges
Payload
Parameter | Required | Type | Description |
---|---|---|---|
organisation | true | string | The 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. |
skip | false | Integer | See pagination section for details |
take | false | Integer | See pagination section for details |
date_from | false | date | The date that you want to get charges from, in ISO 8601 format |
date_to | false | date | The date that you want to get charges to, in ISO 8601 format |
Response
Returns an array of Charges Objects