Ledger balances
Balance from source
Compute balance directly from transactions with the TypeScript SDK.
GET
Balance from source
Use
blnk.LedgerBalances.get with from_source set to true to reconstruct a balance from its transactions.
Call the method
blnk.LedgerBalances.get
| Field | Type | Description |
|---|---|---|
id | string | Balance ID to compute from source. |
from_source | boolean | Must be true to reconstruct from transactions. |
Compare with stored balance
Use the computed amounts to audit or reconcile against the stored balance. Differences may indicate pending transactions or snapshot lag.
Response
200 OK
| Field | Type | Description |
|---|---|---|
balance.balance | number | Net amount computed from all transactions. |
balance.balance_id | string | Unique ID for the balance. |
balance.credit_balance | number | Total computed from credit transactions. |
balance.debit_balance | number | Total computed from debit transactions. |
balance.currency | string | Currency of the balance. |
balance.ledger_id | string | Ledger this balance belongs to. |
balance.identity_id | string | Linked identity, if any. |
balance.created_at | string | Date and time the balance was created. |
balance.meta_data | Record<string, unknown> | Optional metadata on the balance. |
Related docs
Balance from source guide
Transaction-based balance computation.
Balance from source
HTTP request and response schema.