Choose a language javascript

Ledger

The ledger (and ledger items) represent all transactions into and out of your account.

An example of a settled transaction ledger object

{
"id": "a9832728-0107-11ed-b939-0242ac120002",
"type": "credit",
"amount": 72500,
"currency": "GBX",
"source": "settled transaction",
"created_at": "2022-07-08T00:00:00.000Z",
"transaction": {
"id": "af228f0c-0107-11ed-b939-0242ac120002",
"amount": 72500,
"currency": "GBX",
"created_at": "2022-07-07T09:25:07.982Z",
"completed_at": "2022-07-07T09:25:07.982Z"
}
}

An example of a disbursal ledger object

{
"id": "1b75d352-0109-11ed-b939-0242ac120002",
"type": "debit",
"amount": 168014,
"currency": "GBX",
"source": "disbursal",
"created_at": "2022-07-07T14:08:03.982Z",
"disbursal": {
"id": "919c9dba-0102-11ed-b939-0242ac120002",
"amount": 1060200,
"currency": "GBX",
"bank_reference": "X9876-080720221401",
"created_at": "2022-07-08T14:08:04.130Z",
"receiving_account": {
"iban": "GB89BARC20040444858415",
"account_number": "12345678",
"sort_code": "102030",
"name": "FELLOH",
"created_at": "2022-01-16T06:52:42.423Z"
}
}
}

idstring

Unique identifier for the ledger entry

typestring

Can be credit or debit and represents whether funds are coming in or out

amountinteger

The total value of the ledger entry.

currencystring

The currency of the ledger entry | see currency documentation

sourcestring

Can be settled transaction, disbursal or amendment. This indicates the source of the ledger entry (e.g. whether it was a transaction settling, a disbursal to bank account or an amendment from merchant acquirer)

created_atdatetime

The datetime at which the object was created within our systems

transactionobject

If the source of the ledger entry was a settled transaction, then this will contain a compact transaction object

disbursalobject

If the source of the ledger entry was a disbursal, then this will contain a disbursement object

amendmentobject

If the source of the ledger entry was a amendment, then this will contain an amendment object


Fetch all

POST/ledger

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

JSON RESPONSE Defined by type parameter being NULL or 'json'

{
"data": [
{
"id": "a9832728-0107-11ed-b939-0242ac120002",
"type": "credit",
"amount": 72500,
"currency": "GBX",
"source": "settled transaction",
"created_at": "2022-07-08T00:00:00.000Z",
"transaction": {
"id": "af228f0c-0107-11ed-b939-0242ac120002",
"amount": 72500,
"currency": "GBX",
"created_at": "2022-07-07T09:25:07.982Z",
"completed_at": "2022-07-07T09:25:07.982Z"
}
},
{
"id": "1b75d352-0109-11ed-b939-0242ac120002",
"type": "debit",
"amount": 168014,
"currency": "GBX",
"source": "disbursal",
"created_at": "2022-07-07T14:08:03.982Z",
"disbursal": {
"id": "919c9dba-0102-11ed-b939-0242ac120002",
"amount": 1060200,
"currency": "GBX",
"bank_reference": "X9876-080720221401",
"created_at": "2022-07-08T14:08:04.130Z",
"receiving_account": {
"iban": "GB89BARC20040444858415",
"account_number": "12345678",
"sort_code": "102030",
"name": "FELLOH",
"created_at": "2022-01-16T06:52:42.423Z"
}
}
}
],
"errors": {},
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6",
"count": 2
}
}

CSV RESPONSE Defined by type parameter being 'csv'

{
"data": {
"url": "https://ledger-production-reports.s3.eu-west-2.amazonaws.com/02803bec-dddf-4f3e-902d-ef0e42a856af.csv"
},
"errors": [],
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "02803bec-dddf-4f3e-902d-ef0e42a856af",
"count": 184
}
}

This endpoint retrieves all ledger entries. Entries are sorted by creation date, with the most recent entries coming first.

HTTP Method

POST

HTTP Endpoint

PRODhttps://api.felloh.com/ledger

SANDBOXhttps://sandbox.felloh.com/ledger

Payload

ParameterRequiredTypeDescription
organisationtruestringThe organisation ID that you want to fetch ledger entries for. You can find the organisation that you have access to by using the List all organisations method.
keywordfalsestringA customer name, booking reference or email address that you want to filter by.
skipfalseIntegerSee pagination section for details
takefalseIntegerSee pagination section for details
typefaslestringCan be 'csv' or 'json', defaults to json

Response

Returns an array of Ledger Objects