List Balance History
Use this endpoint to list the balance history with filters.
Available Environments
- Production
https://api.gateway.com.br/core
Endpoint
- Method:
GET - Endpoint:
/wallet/ledger-entry - Authentication: Bearer token
Query Params
ℹ️ Dates in ISO
The startDate and endDate fields must be sent as an ISO date string with time.
Example:
2026-03-06T12:00:00.000Z
ℹ️ Snapshot pagination
The snapshot is not a pointer to the "next page": it is a fixed identifier of the pagination session, used together with page (which is still sent and incremented normally) to keep the results consistent even if new records are created while you navigate.
Take the snapshot value from the first response (sent without a snapshot on the first request) and resend that same value, unchanged, on the requests for the following pages, along with the same filters and the same perPage used originally. If any of those values changes while an old snapshot is resent, the API returns an error.
| Name | Type | Required | Description | Validations |
|---|---|---|---|---|
snapshot | string | No | Identifier of the pagination session (received in the snapshot field of the first response); resend it unchanged along with page on the following pages | Must match the same filters and the same perPage of the original request |
startDate | string | No | Start date of the filter | Must be an ISO date string with time |
endDate | string | No | End date of the filter | Must be an ISO date string with time |
type | string[] (enum) - CREDIT, DEBIT | No | List of types to filter by | Must be a non-empty array with no duplicates |
Request Example
- cURL
- JavaScript
curl --request GET \
--url https://api.gateway.com.br/core/wallet/ledger-entry?type=DEBIT&startDate=2026-03-06T00:00:00.000Z&endDate=2026-03-06T23:59:59.999Z \
--header 'Authorization: Bearer your-jwt-token'
const params = new URLSearchParams({
startDate: '2026-03-06T00:00:00.000Z',
endDate: '2026-03-06T23:59:59.999Z'
});
params.append('type', 'DEBIT');
const response = await fetch(`https://api.gateway.com.br/core/wallet/ledger-entry?${params}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer your-jwt-token'
}
});
const data = await response.json();
Success Response
| Field | Type | Required | Description |
|---|---|---|---|
totalPages | number | Yes | Total pages |
currentPage | number | Yes | Current page |
perPage | number | Yes | Items per page |
snapshot | string | No | Identifier of the pagination session; resend it unchanged on the following pages |
data | array | Yes | List |
Fields of the item in data
| Field | Type | Required | Description |
|---|---|---|---|
id | string (UUID) | Yes | Unique identifier |
transactionId | string (UUID) | Yes | Unique identifier of the transaction |
amount | number | Yes | Amount in cents, which may come with a fraction |
balanceBefore | number | Yes | Previous balance in cents, which may come with a fraction |
balanceAfter | number | Yes | New balance in cents, which may come with a fraction |
type | string (enum) - CREDIT, DEBIT | Yes | Type |
description | string | Yes | Description of the event |
date | string | Yes | Date of the event |
Response Example
{
"totalPages": 1,
"currentPage": 1,
"perPage": 15,
"snapshot": "b3BhcXVlLXNuYXBzaG90LXRva2Vu",
"data": [
{
"id": "553e8400-e29b-41d4-a716-436251480000",
"transactionId": "553e8400-e29b-41d4-a716-436251480000",
"amount": 10000,
"balanceBefore": 50000,
"balanceAfter": 60000,
"type": "CREDIT",
"description": "Transaction payment",
"date": "2026-03-06T12:49:04.681Z"
},
{
"id": "553e8400-e29b-41d4-a716-436251480000",
"transactionId": "553e8400-e29b-41d4-a716-436251480000",
"amount": 1000,
"balanceBefore": 60000,
"balanceAfter": 59000,
"type": "DEBIT",
"description": "Transaction payment - Fee",
"date": "2026-03-06T12:49:04.681Z"
},
{
"id": "553e8400-e29b-41d4-a716-436251480000",
"transactionId": "553e8400-e29b-41d4-a716-436251480000",
"amount": 2000,
"balanceBefore": 59000,
"balanceAfter": 57000,
"type": "DEBIT",
"description": "Transaction payment - Reserve",
"date": "2026-03-06T12:49:04.681Z"
}
]
}
Possible Errors
| Code | Description | Solution |
|---|---|---|
| 401 | Invalid credentials | Check your credentials |
| 403 | No permission/authorization | Contact support |
| 422 | Invalid or missing data | Check the format of the data |
| 500 | Internal error | Contact support |