Available in version 0.6.0 and later.
Overview
An inflight transaction keeps your transaction on hold until you take further action. When enabled using theinflight
parameter, transactions follow a specialized workflow that maintains separate balances for pending operations.
It is best used when you want to wait for feedback or authorization before a transaction is applied in your ledger.
Before we start,
Remember that all ledger balances in Blnk have 6 main balance parameters:balance
: This shows the current value held in the ledger balance.credit_balance
: This is the total sum of all amounts received by a ledger balance.debit_balance
: This is the total sum of all amounts sent by a ledger balance.inflight_balance
: This shows the net amount held inflight for a balance.inflight_credit_balance
: This is the total sum of all amount waiting to be received by a ledger balance.inflight_debit_balance
: This is the total sum of all amount waiting to be deducted from a ledger balance.
How Inflight works
Record transaction with Inflight
Record inflight
- Initializes the transaction in the
QUEUED
state. - Processes and moves the transaction to
INFLIGHT
. - Maintains the original balances while tracking the pending amounts in inflight balance parameters.
Balance management

Balance tracking example
Consider an inflight transaction where $100 is transferred from balance_A to balance_B:balance_id | Main balance | Inflight balance | Inflight credit | Inflight debit |
---|---|---|---|---|
balance_A | 200 | -100 | 0 | 100 |
balance_B | 0 | 100 | 100 | 0 |
balance_A
shows a negative inflight balance (-100) because funds are pending outflow.balance_B
shows a positive inflight balance (100) because funds are pending inflow.- The main balances remain unchanged until the transaction is committed.
Updating Inflight

1. Commit inflight
Request
- Indicates transaction conditions are met.
- Triggers balance updates, and clears the inflight balances.
- Creates new transaction record with
APPLIED
status.
balance_id | Main balance | Inflight balance | Inflight credit | Inflight debit |
---|---|---|---|---|
balance_A | 100 | 0 | 0 | 0 |
balance_B | 100 | 0 | 0 | 0 |
2. Partial commits
Request
- Only the specified amount is applied to the main balances.
- The remaining amount is left inflight.
Partial commit amount must not exceed remaining inflight amount.
balance_id | Main balance | Inflight balance | Inflight credit | Inflight debit |
---|---|---|---|---|
balance_A | 160 | -60 | 0 | 60 |
balance_B | 40 | 60 | 60 | 0 |
3. Void inflight
Request
- Indicates transaction conditions were not met.
- Creates new transaction record with
VOID
status. - Resets inflight balances without affecting actual balances.
4. Expired inflight
A transaction will stay inflight indefinitely unless it gets committed, void, or gets expired. To set a time limit on an inflight transaction, include theinflight_expiry_date
parameter in the request body.
- Indicates transaction remained
INFLIGHT
past specified expiry date. - Creates new record with a
VOID
status. - Discards the transaction and resets the inflight balances.
Record inflight with expiry date
Always format the
inflight_expiry_date
date input as ‘YYYY-MM-DDTHH:MM:SS+00:00’ (e.g., 2024-04-22T15:28:03+00:00), where +00:00
specifies the timezone. It is UTC by default.Managing insufficient funds
When working with inflight transactions, your system must always consider both the actual balance and any pending inflight amounts. To do this, compute anavailable_balance
for your customers indicating the amount available for them to spend on new transactions:
-
Query the
source
balance, and compute theavailable_balance
: -
Compare the new transaction amount against
available_balance
:- If amount ≤ available_balance: Proceed with transaction.
- If amount > available_balance: Handle gracefully in your application by notifying the customer of insufficient funds.
- You ensure that pending inflight transactions will always be committed when they need to.
- Customers are prevented from spending funds that are waiting to be deducted from their balance.
Queued balances
Learn how queued balances work
Inflight for multiple sources/destinations
Multiple sources in Blnk allow you send from multiple sources to a single destination simultaneously, while multiple destinations allow you to send from one source to multiple destinations. Learn more: Multiple Sources and Multiple Destinations.1
Initiate inflight
When initiating inflight transactions with multiple sources/destinations, enable the inflight feature in your transaction request. Here’s how to structure your request:When using multiple sources/destinations, each transaction is recorded separately in the ledger.However, these transactions are linked together through a
Request
parent_transaction
attribute, which you’ll receive in the response to your transaction request. This parent_transaction
helps you track and manage related transactions as a single unit.2
Update Inflight
To commit or void all transactions at once, call the Update Inflight endpoint and pass the
transaction_id
from your response.Use cases
Useful applications forinflight
include:
- For managing KYC limits: When an account crosses its KYC limits determined by your application, you can hold all deposits with inflight until the user’s KYC is updated.
- For escrow: Inflight allows you to easily implement escrow features in your application, allowing your users see the amount being held (but not available to them to spend).
- For card payouts: Hold amounts in an inflight balance until the card is authorized by the payment processor for successful payment.
- For external payouts: Hold amount in an inflight balance while your payout is being processed by your provider; only release it when the transaction is successful or failed.