Available in version 0.6.0 and later.
Overview
Blnk allows you to move money from multiple sources to a single destination in one transaction. This provides enhanced flexibility for complex money flows and makes tracking and reconciliation easier.Multiple destinations
Move money from a single source to multiple destinations in one transaction.
What you’ll learn
Example scenario
A customer receives USD 30,000 from three sources. Here’s how the transaction is structured:
Multiple sources transaction flow
Balance ID | Amount | |
---|---|---|
Alice | bln_f2073f6b-905a-4e3e-b5a2-8d1b3dc2fb7f | 10% (USD 3,000) |
Bob | bln_64c50fb5-32d5-4f78-9f4a-e8b01aaf025d | USD 20,000 |
Charlie | bln_7d98dfe9-5c3e-4c9b-b96a-65f6d9f7b89b | Remaining amount (USD 7,000) |
Sarah (Recipient) | bln_92e4b9b6-0b85-4ef4-87a2-682c31500d38 | Total: USD 30,000 |
When sending from multiple sources, you can only send to one destination.
Create multiple sources transaction
Call the Create Transaction endpoint with these fields:cURL
Field | Description | Required | Type |
---|---|---|---|
amount | Total amount to be received | Yes | float |
precision | Converts amount to lowest unit. See Understanding precision | No | int64 |
reference | Unique transaction reference | Yes | string |
currency | Asset class code. See Asset classes | Yes | string |
sources | Array of source objects with identifier and distribution fields | Yes | array |
sources.identifier | Balance ID of the source account | Yes | string |
sources.distribution | Amount to send from this source (specific amount, percentage, or “left”) | Yes | string |
destination | Recipient’s balance ID | Yes | string |
meta_data | Custom transaction data | No | object |
When sending from multiple sources, do not include the
source
field in your payload. Use the sources
array to group the participating balances in your payload.API response structure
When you create a multiple sources transaction, Blnk . Blnk returns a response containing:- A main transaction ID for the overall split transaction. If
inflight: true
, it can be used to commit or void all transactions at once. - A sources array with individual transaction IDs for each source.
Response
Retrieving child transactions
You can retrieve all transactions in the split by searching for the main transaction ID in themeta_data.QUEUED_PARENT_TRANSACTION
field:
cURL
Distribution types
You can specify distribution amounts in three ways:Type | Description | Example |
---|---|---|
Specific amount | Fixed amount to send | "distribution": "20000" |
Percentage | Percentage of total amount | "distribution": "10%" |
Remaining | Leftover amount after other distributions | "distribution": "left" |
You can only use
"left"
once per transaction, and all distributions must sum to the total amount.Transaction references
Blnk automatically generates unique references for each transaction record by appending a counter to your original reference (starting from1
).
Example: If your reference is ref_001adcfgf
, the generated references will be:
ref_001adcfgf1
(first source)ref_001adcfgf2
(second source)ref_001adcfgf3
(third source)