Ledger balances

Create new balance

How to create a new ledger balance in Blnk.

POST/balances

Authorization

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_idstringrequiredbody

Unique id of the ledger the balance is created in. Use general_ledger_id for an internal balance.

currencystringrequiredbody

The currency/asset class of this balance. See the following: Currencies

indicatorstringbody

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_idstringbody

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_lineagebooleandefault falsebody

Enables fund lineage tracking on this balance.

allocation_strategystringdefault FIFObody

Controls how Blnk allocates tagged provider funds when spending from this balance.

Supported values: FIFO, LIFO, PROPORTIONAL.

meta_dataobjectbody

Additional metadata for the request body.

Response

balanceintegerrequired

The net amount being stored in the balance.

inflight_balanceintegerrequired

The net amount waiting to be moved into or out of the balance.

credit_balanceintegerrequired

Total amount moved into the balance

inflight_credit_balanceintegerrequired

Total amount waiting to be moved into the balance.

debit_balanceintegerrequired

Total amount moved out of the balance.

inflight_debit_balanceintegerrequired

Total amount waiting to be moved out of the balance.

ledger_idstringrequired

Unique id of the ledger the balance is created in.

identity_idstring

Unique id of the identity (if any) linked to this balance.

balance_idstringrequired

Unique id of the created balance.

indicatorstring

The balance indicator. Set for General Ledger balances created with indicator.

currencystringrequired

The currency/asset class of the balance.

created_atstringrequired

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.