curl --request POST \
--url http:
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"amount" : 19050.34 ,
"currency" : "USD" ,
"precision" : 100 ,
"reference" : "ref_2ye281ewiu-1e17-dh17-eh18728hd245" ,
"sources" : [
{
"identifier" : "bln_f2073f6b-905a-4e3e-b5a2-8d1b3dc2fb7f" ,
"distribution" : "10%" ,
"narration" : "Monthly contribution"
} ,
{
"identifier" : "bln_64c50fb5-32d5-4f78-9f4a-e8b01aaf025d" ,
"distribution" : "5000" ,
"narration" : "Monthly contribution"
} ,
{
"identifier" : "bln_7d98dfe9-5c3e-4c9b-b96a-65f6d9f7b89b" ,
"distribution" : "left" ,
"narration" : "Monthly contribution"
}
] ,
"destination" : "@WorldUSD" ,
"meta_data" : { }
} '
{
"amount" : 19050.34 ,
"rate" : 0 ,
"precision" : 100 ,
"precise_amount" : 1905034 ,
"transaction_id" : "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c" ,
"parent_transaction" : "" ,
"sources" : [
{
"identifier" : "bln_f2073f6b-905a-4e3e-b5a2-8d1b3dc2fb7f" ,
"distribution" : "10%" ,
"narration" : "Monthly contribution"
} ,
{
"identifier" : "bln_64c50fb5-32d5-4f78-9f4a-e8b01aaf025d" ,
"distribution" : "5000" ,
"narration" : "Monthly contribution"
} ,
{
"identifier" : "bln_7d98dfe9-5c3e-4c9b-b96a-65f6d9f7b89b" ,
"distribution" : "left" ,
"narration" : "Monthly contribution"
}
] ,
"destination" : "@WorldUSD" ,
"reference" : "ref_2ye281ewiu-1e17-dh17-eh18728hd245" ,
"currency" : "USD" ,
"description" : "Card payment on Stripe" ,
"status" : "QUEUED" ,
"hash" : "0b9c25fb5b00d6c71cb4ca87026bf6dc316e63353d3330deb588bd0b3d74dcc0" ,
"allow_overdraft" : false ,
"inflight" : false ,
"created_at" : "2024-11-26T09:33:35.265582042Z" ,
"scheduled_for" : "0001-01-01T00:00:00Z" ,
"inflight_expiry_date" : "0001-01-01T00:00:00Z"
}
Authorization
Basic authentication header of the form — Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string of your username:password
.
Body
Important tip: To apply multiple sources, Blnk uses the
sources
array instead of the conventional
source
parameter in
Record transaction .
The currency of the transaction amount is in.
precision
integer
default: "1"
required
Precision for the transaction’s currency. Also see: Precision .
The unique transaction reference number for the transaction. If empty, Blnk auto-creates one.
Lists the sources for the transaction. Each source includes:
The transaction id of the source.
Specifies how much should be deducted from the source. It can either be:
a fixed amount ("240.23"
),
a percentage ("20%"
) or
the remaining amount ("left"
).
The narration of the transaction per source.
The balance receiving the amount. @
prefix indicates that the balance is an [internal balance](/balances/internal-balances.
Indicates the date and time of a scheduled transaction, e.g., "2024-02-20 05:28:03"
.
Specifies whether the transaction should proceed even if the source’s balance is insufficient. If enabled and the source has less than the required amount, the balance will become negative. See also: Overdrafts
Specifies that the transaction should be held until certain conditions are met. See also: Inflight transactions .
Specifies the date and time when an inflight transaction should expire. Once expired, the transaction is voided and the amount is rolled back.
Defines the conversion rate to be applied when the transaction involves balances in different currencies. See also: Applying rates .
Additional metadata of the transaction.
Response
All parameters from the request body also mean the same in the corresponding response JSON.
This is computed by amount
x precision
. Learn why this is important: Why use precision
Unique id of the transaction.
The transaction ID of the parent transaction. A parent transaction is one that impacts the creation of a new transaction, such as an inflight transaction, a scheduled transaction, or similar.
For instance, refunding a sample transaction A creates a new transaction B; therefore A is the parent transaction of B.
Indicates the date & time the transaction was created.
Additional metadata of the transaction.
curl --request POST \
--url http:
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"amount" : 19050.34 ,
"currency" : "USD" ,
"precision" : 100 ,
"reference" : "ref_2ye281ewiu-1e17-dh17-eh18728hd245" ,
"sources" : [
{
"identifier" : "bln_f2073f6b-905a-4e3e-b5a2-8d1b3dc2fb7f" ,
"distribution" : "10%" ,
"narration" : "Monthly contribution"
} ,
{
"identifier" : "bln_64c50fb5-32d5-4f78-9f4a-e8b01aaf025d" ,
"distribution" : "5000" ,
"narration" : "Monthly contribution"
} ,
{
"identifier" : "bln_7d98dfe9-5c3e-4c9b-b96a-65f6d9f7b89b" ,
"distribution" : "left" ,
"narration" : "Monthly contribution"
}
] ,
"destination" : "@WorldUSD" ,
"meta_data" : { }
} '
{
"amount" : 19050.34 ,
"rate" : 0 ,
"precision" : 100 ,
"precise_amount" : 1905034 ,
"transaction_id" : "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c" ,
"parent_transaction" : "" ,
"sources" : [
{
"identifier" : "bln_f2073f6b-905a-4e3e-b5a2-8d1b3dc2fb7f" ,
"distribution" : "10%" ,
"narration" : "Monthly contribution"
} ,
{
"identifier" : "bln_64c50fb5-32d5-4f78-9f4a-e8b01aaf025d" ,
"distribution" : "5000" ,
"narration" : "Monthly contribution"
} ,
{
"identifier" : "bln_7d98dfe9-5c3e-4c9b-b96a-65f6d9f7b89b" ,
"distribution" : "left" ,
"narration" : "Monthly contribution"
}
] ,
"destination" : "@WorldUSD" ,
"reference" : "ref_2ye281ewiu-1e17-dh17-eh18728hd245" ,
"currency" : "USD" ,
"description" : "Card payment on Stripe" ,
"status" : "QUEUED" ,
"hash" : "0b9c25fb5b00d6c71cb4ca87026bf6dc316e63353d3330deb588bd0b3d74dcc0" ,
"allow_overdraft" : false ,
"inflight" : false ,
"created_at" : "2024-11-26T09:33:35.265582042Z" ,
"scheduled_for" : "0001-01-01T00:00:00Z" ,
"inflight_expiry_date" : "0001-01-01T00:00:00Z"
}
Need help?
We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool.
To ask questions or discuss issues, please contact us or join our Discord community .
Love building with Blnk? We’d love to hear your feedback. Tell us here .