Ledger balances
Create new balance
How to create a new ledger balance in Blnk.
/balancesAuthorization
If set, the API uses an API key for authentication. Include the following header in your requests: X-blnk-key: <api-key>.
Replace <api-key> with your secret API key. Ensure the key is kept secure and not exposed in public repositories or client-side code.
See also: Core API key.
Body
ledger_idstring
Unique id of the ledger the balance is created in. Use general_ledger_id for an internal balance.
currencystring
The currency/asset class of this balance. See the following: Currencies
indicatorstring
General Ledger indicator for an internal balance. Must start with @ and contain no whitespace. Only allowed when ledger_id is general_ledger_id.
The same indicator and currency pair can only exist once.
identity_idstring
Unique id of identity (if any) to be linked to the balance. Can be left out from the request body if there’s no identity to be linked.
track_fund_lineageboolean
Enables fund lineage tracking on this balance.
allocation_strategystring
Controls how Blnk allocates tagged provider funds when spending from this balance.
Supported values: FIFO, LIFO, PROPORTIONAL.
meta_dataobject
Additional metadata for the request body.
Response
balanceinteger
The net amount being stored in the balance.
inflight_balanceinteger
The net amount waiting to be moved into or out of the balance.
credit_balanceinteger
Total amount moved into the balance
inflight_credit_balanceinteger
Total amount waiting to be moved into the balance.
debit_balanceinteger
Total amount moved out of the balance.
inflight_debit_balanceinteger
Total amount waiting to be moved out of the balance.
ledger_idstring
Unique id of the ledger the balance is created in.
identity_idstring
Unique id of the identity (if any) linked to this balance.
balance_idstring
Unique id of the created balance.
indicatorstring
The balance indicator. Set for General Ledger balances created with indicator.
currencystring
The currency/asset class of the balance.
created_atstring
Indicates the date & time of creation.
meta_dataUser Object
Additional metadata of the balance.
track_fund_lineageboolean
Indicates whether fund lineage tracking is enabled for this balance.
allocation_strategystring
The allocation strategy used for fund lineage spending when track_fund_lineage is enabled.