Wallet balances are derived from ledger entries and are guaranteed to be consistent.
Wallet Object
Represents the current wallet state.Ledger Entry Object
Represents a single immutable financial transaction.Get Wallet Balance
Retrieve the current wallet balance and currency.Examples
- cURL
- JavaScript
- Go
Get Wallet Ledger Entries
The ledger endpoint allows you to retrieve a list of immutable ledger entries. Retrieve the 50 most recent ledger entries. Use this for reconciliation and displaying transaction history to users.This endpoint is rate-limited and returns a maximum of 50 entries per request.
Response
Best Practices
To ensure financial data integrity, we recommend the following: Precision Handling: Never parse balance as a float. Use libraries like Big.js or Decimal.js. Idempotency: Use the reference field (e.g., ord_xxx) to ensure you do not double-process the same transaction in your local database. Webhooks: Don’t poll the ledger endpoint. Subscribe to our ledger.updated webhook for real-time notifications.Errors
The Travelbase API uses standard HTTP status codes to indicate success or failure.Error Object
Error Codes
Example Error Response
Orders
Connect wallet transactions to specific customer orders.
Webhooks
Receive real-time events for wallet debits and credits.

