Ledger history
Changed onThis 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.
Request
- Base URLhttps://api.masspay.io/v1.0.0
- Auth
- API key in header Authorization
- or API key in header x-api-key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Number of records to return. Defaults to 10 if no value is provided
Starting date - in UTC
Ending date - in UTC
Page number. Cannot be combined with last_token
Token of the last ledger entry received in a previous response; results continue from the entry immediately following it. Cannot be combined with page
Filter particular types of ledger entries. Comma separated to include multiple types
Headers
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
- info
endpoint added
- info