Overview
The Zuba ledger system implements a robust double-entry bookkeeping system that tracks all financial movements across the platform. Every transaction is recorded as transfers between named accounts, providing complete audit trails and real-time balance tracking.Core Concepts
Accounts
Accounts represent financial entities in the system and are identified by unique names with currency support. When querying your balances, you’ll see:Account Balance Response
| Field | Description |
|---|---|
currency | ISO 4217 currency code |
balance | Available balance (funds you can use) |
pendingIn | Incoming funds being processed |
pendingOut | Outgoing funds being processed |
totalBalance | Total balance including pending |
isActive | Whether the account is active |
lastTransactionAt | Timestamp of most recent transaction |
Transactions
All financial movements are recorded as double-entry transactions. When querying transactions, you’ll see them from your account’s perspective as debits (money out) or credits (money in):Transaction Structure
| Field | Description |
|---|---|
id | Unique transaction identifier |
type | debit (money out) or credit (money in) |
amount | Transaction amount |
currency | ISO 4217 currency code |
balanceAfter | Your account balance after this transaction |
counterparty | The external counterparty, masked (e.g. ext:****3000). Internal platform accounts are omitted, so this field is absent on internal transfers (such as fees and FX) |
isFee | true when the entry is a Zuba service fee; lets you label fee rows without inspecting account names |
status | Transaction status (pending, confirmed, failed, cancelled) |
createdAt | When the transaction was created |
confirmedAt | When the transaction was confirmed |
payoutId | Present on payout entries — the originating payout’s id |
payoutStatus | Present on payout entries — the payout’s delivery status (created, queued, processing, paid, failed, cancelled) |
txHash | Present on crypto entries — the on-chain transaction hash, for looking the transfer up on a block explorer |
A payout’s ledger transaction is
confirmed as soon as the funds are debited
from your balance — it does not mean the beneficiary has been paid. Slow
rails (e.g. SWIFT) can remain in flight for days after the debit confirms.
Use payoutStatus to track delivery; paid means the funds arrived.Transaction States
| Status | Description | Actions Available |
|---|---|---|
pending | Transaction created, awaiting confirmation | Confirm, Cancel |
confirmed | Transaction successfully processed | View only |
failed | Transaction failed during processing | Retry, Investigate |
cancelled | Transaction cancelled before processing | View only |
Balance Management
Real-time Balance Calculation
Account balances are calculated in real-time from confirmed transactions:Multi-Currency Support
Each account maintains balances in a single currency. When querying all balances, you’ll receive a list of accounts for each currency:Multi-Currency Response
Payment Flow Integration
Ledger transactions are created automatically by the platform when processing deposits and payouts. You cannot create transactions directly - they are generated as a result of your payment operations.
Payin Transaction Flow
When a customer makes a deposit, the platform settles the funds internally and credits your account automatically. From your perspective it lands as a single credit: You’ll see the credit appear in your transaction history. The internal account that funded it is omitted, so nocounterparty is present:
Credit Transaction
Payout Transaction Flow
For payouts, the system creates transaction chains including FX conversion when needed: You’ll see the debit in your transaction history. The internal accounts used to route and convert the payout are omitted, so nocounterparty is present:
Debit Transaction
Querying the Ledger
Account Balance
Transaction History
Audit & Compliance
Audit Trail
Every transaction maintains a complete audit trail:- Immutable Records: Transactions cannot be modified once confirmed
- Timestamps: All operations are timestamped with precision
- Metadata: Additional context stored with each transaction
- Reference IDs: Link to external provider transactions
Compliance Features
Financial Reconciliation
Financial Reconciliation
- Daily balance reconciliation across all accounts
- Provider settlement matching and verification
- Automated discrepancy detection and alerts
- Historical balance reconstruction capabilities
Regulatory Reporting
Regulatory Reporting
- Transaction history export for audits
- Real-time balance monitoring and limits
- Suspicious activity pattern detection
- Automated regulatory filing support
Data Integrity
Data Integrity
- Double-entry validation on every transaction
- Balance consistency checks across all accounts
- Automated reconciliation with external providers
- Immutable transaction records with cryptographic hashing
Advanced Features
Currency Conversion Tracking
When a payout converts currency, you still see a single debit on your account. It carries both the amount debited from your balance and the amount sent to the beneficiary, via thesourceAmount/sourceCurrency and payoutAmount/payoutCurrency fields. Internal FX accounts are not surfaced, so no counterparty is present:
FX Payout Debit
Account Statements
For detailed reconciliation, you can generate account statements for a specific period:Account Statement
Error Handling
Transaction Failures
When a payout or deposit fails, you may see a failed transaction in your history:Failed Transaction
Common Error Scenarios
| Error | Description | Resolution |
|---|---|---|
| Insufficient funds | Not enough balance to complete payout | Add funds to your account |
| Invalid beneficiary | Beneficiary details are incorrect | Update beneficiary information |
| Provider error | External provider issue | Retry or contact support |
Integration Guidelines
Ledger transactions are created automatically by the platform when you create payouts or receive deposits. You cannot create transactions directly - use the Payouts API to initiate transfers.
Best Practices
Balance Monitoring
Balance Monitoring
- Check balances before initiating payouts to avoid failures
- Set up webhooks for real-time balance notifications
- Use the statement endpoint for reconciliation
- Monitor pending amounts for cash flow planning
Reconciliation
Reconciliation
- Generate statements periodically for your records
- Match ledger transactions with your internal systems
- Keep track of pending transactions for accurate cash positions
- Export transaction history for accounting integration
API Usage
API Usage
- Use pagination (
limitandoffset) for large transaction histories - Filter by currency when querying specific account activity
- Cache balance responses where real-time accuracy isn’t required
- Handle rate limits gracefully with exponential backoff
Next Steps
First Payout Guide
Send your first payout with the Zuba API
Webhooks
Set up real-time notifications for payment events
Batch Payouts
Process multiple payouts efficiently
API Reference
Complete API documentation