Transaction properties
- Immutability: Once recorded, transactions in Blnk cannot be modified or deleted. This fundamental property ensures the integrity and reliability of your transaction history, preventing any unauthorized alterations. See also: Transaction hashing
- Idempotency: Each transaction in Blnk produces the same result whether executed once or multiple times. This is crucial for maintaining data consistency, especially during network failures or system retries.
Recording a transaction
To record a transaction, call the record-transaction endpoint:Response
- Request
- Response
Verifying transactions with queue enabled
When using the default queue system, every transaction starts asQUEUED. To verify your transaction status, you have two options:
- Webhooks: Blnk sends webhook notifications when transaction states change.
-
Direct API calls: Query the transaction status using the reference or transaction ID. See below:
- By reference (direct endpoint)
- By reference (search)
- By transaction ID
Blnk appends a_qsuffix to your original reference after processing aQUEUEDtransaction. To verify the updated status, retrieve the transaction using your original reference plus the_qsuffix.Response
Verifying transactions without queue disabled
When usingskip_queue: true, transactions are processed immediately and you can verify them from the direct response. Learn more about skip queue.
Response
INFLIGHT, APPLIED, or REJECTED), allowing you to confirm the transaction result without waiting for webhooks or additional API calls.
Discarded transactions
A discarded transaction is not recorded in the ledger. Blnk discards transactions for two reasons:-
Duplicate reference: Your new transaction
referencematches an existingreferencein your ledger. Blnk requires uniquereferencevalues per transaction. Options are timestamps (e.g. UNIX timestamp), random string or UUID (e.g.ref_e55c4f33-bff7-4c30-9b9f-5d2d10a29b7a), or a business identifier like anorder_id. - Zero amount: Your transaction amount is 0. Zero amounts are not recorded in the Blnk ledger.
Managing insufficient funds
Available in version 0.11.0 and later. For versions 0.10.8 and older, see our insufficient funds guide.
balance - inflight_debit_balance on the source balance.
Inflight debit balance is the amount waiting to be deducted from the source balance from inflight transactions. Learn more: Create inflight.
If the transaction amount is more than the available balance, the source has insufficient funds and:
- The transaction is rejected and status is recorded as
REJECTED. - A webhook notification to inform your system of the rejected transaction and a reason in its
meta_data.
If you want a transaction to proceed even when it exceeds the available balance, you can enable overdrafts by setting
allow_overdraft: true in your transaction request. Learn more.Dive deeper
Transaction lifecycle
States from creation through completion.
Understanding precision
Decimal handling for accurate amounts.
Transaction statuses
What each status means and when it applies.