Ledger

This GET endpoint is used to retrieve a list of all ledger entries, including payouts, payins, loads, spendbacks, fees, credits, and reversals, for a wallet with the provided wallet token. <br> You can use this endpoint to obtain a comprehensive history of balance movements for the provided wallet, allowing you to track and reconcile its activity over time. <br> To use this endpoint, you need to provide the wallet_token as a parameter in the URL Path. <br> The response will contain a JSON array of ledger entry objects, each including entry details, along with pagination metadata. Results can be paginated either with page or with last_token, passing the token of the last ledger entry from a previous response; the two parameters cannot be combined in the same request.

get/wallets/{wallet_token}/ledger

Request

Query parameters

number_of_recordsnumber

Number of records to return. Defaults to 10 if no value is provided

start_datestring date
Example:2020-03-31

Starting date - in UTC

end_datestring date
Example:2020-03-31

Ending date - in UTC

pageinteger

Page number. Cannot be combined with last_token

last_tokenstring
Example:ltx_3f2c9b1a-77aa-4c3e-b2c4-1d2e3f4a5b6c

Token of the last ledger entry received in a previous response; results continue from the entry immediately following it. Cannot be combined with page

type'payout' | 'payout_cancel' | 'payout_reversal' | 'payin' | 'payin_reversal' | 'payin_deposit_return' | 'topup' | 'topup_reversal' | 'service_fee' | 'wallet_credit' | 'wallet_debit' | 'spendback' | 'load' | 'load_reversal' | 'spendback_reversal'
Example:payout

Filter particular types of ledger entries. Comma separated to include multiple types

Headers

Idempotency-Keystring

Unique key to prevent duplicate processing

Response

Succesful operation.

Example response

{
  "ledger_entries": [
    {
      "token": "ltx_3f2c9b1a-77aa-4c3e-b2c4-1d2e3f4a5b6c",
      "wallet_token": "usr_wlt_9e5a349e-8d10-4a0b-9d8f-6b3f2a1c4d7e",
      "user_token": "usr_1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
      "metadata": {
        "group_id": 541
      },
      "amount": 125.75,
      "currency_code": "USD",
      "timestamp": "2024-06-15T13:45:30.123Z",
      "ref_token": "payout_7c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
      "ref_tokens": [
        "payout_7c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"
      ]
    }
  ]
}

Changes