Skip to main content
The Wallet API allows you to retrieve your current wallet balance and inspect immutable ledger entries representing all financial activity. The wallet is backed by a deterministic, append-only ledger to ensure financial integrity, auditability, and replayability.
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.
string
Unique identifier for the wallet (prefix: wal_).
string
Current balance. Always returned as a string to prevent floating-point precision issues.
string
ISO 4217 currency code (e.g., USD).

Examples

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

string
Machine-readable error type.
string
Human-readable description of the error.
string
Optional error code for programmatic handling.

Error Codes


Example Error Response

Orders

Connect wallet transactions to specific customer orders.

Webhooks

Receive real-time events for wallet debits and credits.