Ledger

This GET endpoint is used to retrieve a single ledger entry for a wallet with the provided wallet token. <br> You can use this endpoint to obtain the details of a specific balance movement, such as a payout, payin, load, spendback, fee, credit, or reversal, identified by its ledger entry token. <br> To use this endpoint, you need to provide the wallet_token and the ledger_transaction_token as parameters in the URL Path. <br> The response will contain a single JSON ledger entry object including entry details.

get/wallets/{wallet_token}/ledger/{ledger_transaction_token}

Request

Headers

Idempotency-Keystring

Unique key to prevent duplicate processing

Response

Succesful operation.

tokenstring required

Prefixed ledger entry identifier.

wallet_tokenstring required

Prefixed wallet identifier. User wallets use the usr_wlt_ prefix and client wallets use the clnt_wlt_ prefix.

user_tokenstring

Prefixed user identifier.

metadataobject

Optional JSON object with attributes associated with the transaction

amountnumber double required

Signed amount of the entry in the wallet's currency, with up to two decimal places. Negative values decrease the wallet balance.

currency_codestring required

Currency code of the wallet in which the entry is denominated. Three-letter ISO 4217 codes for fiat currencies (e.g. USD) and up to five characters for cryptocurrencies (e.g. USDC, MATIC).

timestampstring date-time required

Time at which the entry was recorded, ISO 8601 with millisecond precision.

notesstring required

Free-form notes attached to the entry.

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' required

The kind of ledger movement.

ref_tokenstring

Prefixed token of a source transaction object, such as a payout, payin, top-up, load, or spendback. The prefix identifies the resource type.

ref_tokensSourceTransactionToken[]

Tokens of the source transactions that produced this ledger entry, such as a payout, payin, top-up, load, or spendback. Null for entries with no associated source object.

Example response

{
  "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