Transactions
Multiple Sources
Move money to one balance from two or more balances.
POST
If you’re using the auto-provisioned
Enterprise Core instance included with your Production License deployment, set the base URL to: https://ENTERPRISE_PUBLIC_URL/core.If you’re connecting to a different Core instance, use the publicly accessible base URL for that instance instead.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: Scoped API keys and Secure your Blnk server.
Body
Important tip: To apply multiple sources, Blnk uses the
sources array instead of the conventional source parameter in Record transaction.integer
The transaction amount in its smallest unit (recommended). Include the corresponding
precision value. See Transaction precision.integer | float
The transaction amount as a float. Blnk multiplies
amount by precision to store precise_amount.string
required
The currency of the transaction amount is in.
string
required
The unique transaction reference number for the transaction. If empty, Blnk auto-creates one.
array
required
Lists the sources for the transaction. Each source includes:
string
required
The balance receiving the amount.
@ prefix indicates that the balance is an internal balance.string
Indicates the date and time of a scheduled transaction, e.g.,
"2024-02-20 05:28:03".boolean
default:"false"
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
boolean
default:"false"
Specifies that the transaction should be held until certain conditions are met. See also: Create inflight.
string
Specifies the date and time when an inflight transaction should expire. Once expired, the transaction is voided and the amount is rolled back.
string
When
inflight is true, the date and time when Blnk should automatically commit the inflight transaction. See Schedule inflight commits.boolean
default:"false"
When false, Blnk processes each destination independently.Valid destinations are
APPLIED, while invalid ones are REJECTED. When true, all destinations must succeed for the split to be processed. If any destination fails, no credits are APPLIED, and succesful inflights are set to VOID.See Atomic split processing.object
Additional metadata of the transaction.
Response
All parameters from the request body also mean the same in the corresponding response JSON.
string
Unique id of the transaction.
string
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.
string
The status of the transaction. See the following: Transaction statuses.
string
Per-row SHA-256 fingerprint of the transaction’s core details. The optional global hash chain is separate and not returned in API responses. Learn more: Transaction hashing
string
Indicates the date & time the transaction was created.
User Object
Additional metadata of the transaction.