Transactions
Bulk commit inflight
Commit multiple independently-created inflight transactions.
POST
/
transactions
/
inflight
/
bulk
/
commit
curl -X POST "http://localhost:5001/transactions/inflight/bulk/commit" \
-H "X-blnk-key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"transactions": [
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94"
},
{
"transaction_id": "txn_c5d9e2a1-7b4f-4a3c-9e8d-1f6a2b4c8d30",
"precise_amount": 4000
},
{
"transaction_id": "txn_7c91e4b2-3d8a-4f6e-b1c2-9a8d7e6f5b4a",
"precise_amount": 125034
}
]
}'
curl -X POST "http://localhost:5001/transactions/inflight/bulk/commit" \
-H "X-blnk-key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"dry_run": true,
"transactions": [
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94"
},
{
"transaction_id": "txn_c5d9e2a1-7b4f-4a3c-9e8d-1f6a2b4c8d30"
}
]
}'
{
"dry_run": true,
"would_apply": true,
"cumulative": false,
"atomic": false,
"results": [
{
"dry_run": true,
"would_apply": true,
"operation": "commit",
"status": "APPLIED",
"reference": "ref_hold_001",
"currency": "USD",
"amount": 120,
"precise_amount": "12000",
"precision": 100,
"balances": [
{
"balance_id": "bln_source-bal-001",
"role": "source",
"currency": "USD",
"current_balance": "50000",
"current_available": "38000",
"current_credit_balance": "50000",
"current_debit_balance": "0",
"current_inflight_debit_balance": "12000",
"current_inflight_credit_balance": "0",
"resulting_balance": "38000",
"resulting_available": "38000",
"resulting_credit_balance": "50000",
"resulting_debit_balance": "12000",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "0"
},
{
"balance_id": "bln_dest-bal-001",
"role": "destination",
"currency": "USD",
"current_balance": "0",
"current_available": "0",
"current_credit_balance": "0",
"current_debit_balance": "0",
"current_inflight_debit_balance": "0",
"current_inflight_credit_balance": "12000",
"resulting_balance": "12000",
"resulting_available": "12000",
"resulting_credit_balance": "12000",
"resulting_debit_balance": "0",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "0"
}
]
},
{
"dry_run": true,
"would_apply": true,
"operation": "commit",
"status": "APPLIED",
"reference": "ref_hold_002",
"currency": "USD",
"amount": 40,
"precise_amount": "4000",
"precision": 100,
"balances": [
{
"balance_id": "bln_source-bal-001",
"role": "source",
"currency": "USD",
"current_balance": "50000",
"current_available": "46000",
"current_credit_balance": "50000",
"current_debit_balance": "0",
"current_inflight_debit_balance": "4000",
"current_inflight_credit_balance": "0",
"resulting_balance": "46000",
"resulting_available": "46000",
"resulting_credit_balance": "50000",
"resulting_debit_balance": "4000",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "0"
},
{
"balance_id": "blnk_dest-bal-002",
"role": "destination",
"currency": "USD",
"current_balance": "0",
"current_available": "0",
"current_credit_balance": "0",
"current_debit_balance": "0",
"current_inflight_debit_balance": "0",
"current_inflight_credit_balance": "4000",
"resulting_balance": "4000",
"resulting_available": "4000",
"resulting_credit_balance": "4000",
"resulting_debit_balance": "0",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "0"
}
]
}
]
}
{
"dry_run": true,
"would_apply": false,
"cumulative": false,
"atomic": false,
"results": [
{
"dry_run": true,
"would_apply": true,
"operation": "commit",
"status": "APPLIED",
"reference": "ref_hold_001",
"currency": "USD",
"amount": 120,
"precise_amount": "12000",
"precision": 100
},
{
"dry_run": true,
"would_apply": false,
"operation": "commit",
"rejection": {
"code": "TXN_COMMIT_AMOUNT_EXCEEDED",
"reason": "commit_amount_exceeded",
"message": "cannot commit more than the original transaction amount. Original: USD40.00, Requested: USD999999.00"
},
"reference": "ref_hold_002",
"currency": "USD",
"amount": 999999,
"precise_amount": "99999900",
"precision": 100
}
]
}
{
"succeeded": 2,
"failed": 0,
"results": [
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"status": "queued",
"code": "QUEUED"
},
{
"transaction_id": "txn_c5d9e2a1-7b4f-4a3c-9e8d-1f6a2b4c8d30",
"status": "queued",
"code": "ALREADY_QUEUED",
"message": "a commit or void is already queued for this transaction"
}
]
}
{
"succeeded": 2,
"failed": 1,
"results": [
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"status": "succeeded"
},
{
"transaction_id": "txn_c5d9e2a1-7b4f-4a3c-9e8d-1f6a2b4c8d30",
"status": "succeeded"
},
{
"transaction_id": "txn_7c91e4b2-3d8a-4f6e-b1c2-9a8d7e6f5b4a",
"status": "failed",
"code": "INVALID_AMOUNT",
"message": "cannot commit more than inflight amount"
}
]
}
{
"error": "transactions cannot be empty",
"error_detail": {
"code": "TXN_BULK_EMPTY",
"message": "transactions cannot be empty"
}
}
{
"error": "too many transactions; max is 100",
"error_detail": {
"code": "TXN_BULK_LIMIT_EXCEEDED",
"message": "too many transactions; max is 100"
}
}
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.
Available in version 0.14.2 and later.
Body
object[]
required
List of inflight transactions to commit. Max number of transactions allowed is 100.
Show child attributes
Show child attributes
string
required
The unique id of the independently-created inflight transaction.
integer
Optional commit amount in its smallest unit for a partial commit (recommended). When omitted or zero, Blnk commits the full remaining inflight amount.
float
Optional float amount to commit for a partial commit. When both are set,
precise_amount takes precedence over amount.boolean
default:"false"
When
false (default), each item is enqueued for asynchronous processing. Per-item results return status: "queued" with code QUEUED or ALREADY_QUEUED, and both codes count toward succeeded. When true, Blnk processes each item synchronously and returns status: "succeeded" or "failed". See Commit & void inflight.boolean
default:"false"
When
true, Blnk projects every commit without settling anything. Items are projected independently. See Dry-run a transaction.Response
integer
required
Number of transactions committed or queued successfully. Items with
QUEUED or ALREADY_QUEUED count here.integer
required
Number of transactions that failed.
object[]
required
Per-transaction result in the same order as the request.
Show child attributes
Show child attributes
string
required
Transaction id from the request item.
string
required
succeeded, failed, or queued (when skip_queue is false).string
When queued:
QUEUED or ALREADY_QUEUED. When synchronous: failure codes such as NOT_FOUND, ALREADY_VOIDED, ALREADY_COMMITTED, NOT_INFLIGHT, INVALID_AMOUNT, LOCKED, or INTERNAL_ERROR.string
Human-readable failure message.
curl -X POST "http://localhost:5001/transactions/inflight/bulk/commit" \
-H "X-blnk-key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"transactions": [
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94"
},
{
"transaction_id": "txn_c5d9e2a1-7b4f-4a3c-9e8d-1f6a2b4c8d30",
"precise_amount": 4000
},
{
"transaction_id": "txn_7c91e4b2-3d8a-4f6e-b1c2-9a8d7e6f5b4a",
"precise_amount": 125034
}
]
}'
curl -X POST "http://localhost:5001/transactions/inflight/bulk/commit" \
-H "X-blnk-key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"dry_run": true,
"transactions": [
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94"
},
{
"transaction_id": "txn_c5d9e2a1-7b4f-4a3c-9e8d-1f6a2b4c8d30"
}
]
}'
{
"dry_run": true,
"would_apply": true,
"cumulative": false,
"atomic": false,
"results": [
{
"dry_run": true,
"would_apply": true,
"operation": "commit",
"status": "APPLIED",
"reference": "ref_hold_001",
"currency": "USD",
"amount": 120,
"precise_amount": "12000",
"precision": 100,
"balances": [
{
"balance_id": "bln_source-bal-001",
"role": "source",
"currency": "USD",
"current_balance": "50000",
"current_available": "38000",
"current_credit_balance": "50000",
"current_debit_balance": "0",
"current_inflight_debit_balance": "12000",
"current_inflight_credit_balance": "0",
"resulting_balance": "38000",
"resulting_available": "38000",
"resulting_credit_balance": "50000",
"resulting_debit_balance": "12000",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "0"
},
{
"balance_id": "bln_dest-bal-001",
"role": "destination",
"currency": "USD",
"current_balance": "0",
"current_available": "0",
"current_credit_balance": "0",
"current_debit_balance": "0",
"current_inflight_debit_balance": "0",
"current_inflight_credit_balance": "12000",
"resulting_balance": "12000",
"resulting_available": "12000",
"resulting_credit_balance": "12000",
"resulting_debit_balance": "0",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "0"
}
]
},
{
"dry_run": true,
"would_apply": true,
"operation": "commit",
"status": "APPLIED",
"reference": "ref_hold_002",
"currency": "USD",
"amount": 40,
"precise_amount": "4000",
"precision": 100,
"balances": [
{
"balance_id": "bln_source-bal-001",
"role": "source",
"currency": "USD",
"current_balance": "50000",
"current_available": "46000",
"current_credit_balance": "50000",
"current_debit_balance": "0",
"current_inflight_debit_balance": "4000",
"current_inflight_credit_balance": "0",
"resulting_balance": "46000",
"resulting_available": "46000",
"resulting_credit_balance": "50000",
"resulting_debit_balance": "4000",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "0"
},
{
"balance_id": "blnk_dest-bal-002",
"role": "destination",
"currency": "USD",
"current_balance": "0",
"current_available": "0",
"current_credit_balance": "0",
"current_debit_balance": "0",
"current_inflight_debit_balance": "0",
"current_inflight_credit_balance": "4000",
"resulting_balance": "4000",
"resulting_available": "4000",
"resulting_credit_balance": "4000",
"resulting_debit_balance": "0",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "0"
}
]
}
]
}
{
"dry_run": true,
"would_apply": false,
"cumulative": false,
"atomic": false,
"results": [
{
"dry_run": true,
"would_apply": true,
"operation": "commit",
"status": "APPLIED",
"reference": "ref_hold_001",
"currency": "USD",
"amount": 120,
"precise_amount": "12000",
"precision": 100
},
{
"dry_run": true,
"would_apply": false,
"operation": "commit",
"rejection": {
"code": "TXN_COMMIT_AMOUNT_EXCEEDED",
"reason": "commit_amount_exceeded",
"message": "cannot commit more than the original transaction amount. Original: USD40.00, Requested: USD999999.00"
},
"reference": "ref_hold_002",
"currency": "USD",
"amount": 999999,
"precise_amount": "99999900",
"precision": 100
}
]
}
{
"succeeded": 2,
"failed": 0,
"results": [
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"status": "queued",
"code": "QUEUED"
},
{
"transaction_id": "txn_c5d9e2a1-7b4f-4a3c-9e8d-1f6a2b4c8d30",
"status": "queued",
"code": "ALREADY_QUEUED",
"message": "a commit or void is already queued for this transaction"
}
]
}
{
"succeeded": 2,
"failed": 1,
"results": [
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"status": "succeeded"
},
{
"transaction_id": "txn_c5d9e2a1-7b4f-4a3c-9e8d-1f6a2b4c8d30",
"status": "succeeded"
},
{
"transaction_id": "txn_7c91e4b2-3d8a-4f6e-b1c2-9a8d7e6f5b4a",
"status": "failed",
"code": "INVALID_AMOUNT",
"message": "cannot commit more than inflight amount"
}
]
}
{
"error": "transactions cannot be empty",
"error_detail": {
"code": "TXN_BULK_EMPTY",
"message": "transactions cannot be empty"
}
}
{
"error": "too many transactions; max is 100",
"error_detail": {
"code": "TXN_BULK_LIMIT_EXCEEDED",
"message": "too many transactions; max is 100"
}
}
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.Was this page helpful?
⌘I
curl -X POST "http://localhost:5001/transactions/inflight/bulk/commit" \
-H "X-blnk-key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"transactions": [
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94"
},
{
"transaction_id": "txn_c5d9e2a1-7b4f-4a3c-9e8d-1f6a2b4c8d30",
"precise_amount": 4000
},
{
"transaction_id": "txn_7c91e4b2-3d8a-4f6e-b1c2-9a8d7e6f5b4a",
"precise_amount": 125034
}
]
}'
curl -X POST "http://localhost:5001/transactions/inflight/bulk/commit" \
-H "X-blnk-key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"dry_run": true,
"transactions": [
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94"
},
{
"transaction_id": "txn_c5d9e2a1-7b4f-4a3c-9e8d-1f6a2b4c8d30"
}
]
}'
{
"dry_run": true,
"would_apply": true,
"cumulative": false,
"atomic": false,
"results": [
{
"dry_run": true,
"would_apply": true,
"operation": "commit",
"status": "APPLIED",
"reference": "ref_hold_001",
"currency": "USD",
"amount": 120,
"precise_amount": "12000",
"precision": 100,
"balances": [
{
"balance_id": "bln_source-bal-001",
"role": "source",
"currency": "USD",
"current_balance": "50000",
"current_available": "38000",
"current_credit_balance": "50000",
"current_debit_balance": "0",
"current_inflight_debit_balance": "12000",
"current_inflight_credit_balance": "0",
"resulting_balance": "38000",
"resulting_available": "38000",
"resulting_credit_balance": "50000",
"resulting_debit_balance": "12000",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "0"
},
{
"balance_id": "bln_dest-bal-001",
"role": "destination",
"currency": "USD",
"current_balance": "0",
"current_available": "0",
"current_credit_balance": "0",
"current_debit_balance": "0",
"current_inflight_debit_balance": "0",
"current_inflight_credit_balance": "12000",
"resulting_balance": "12000",
"resulting_available": "12000",
"resulting_credit_balance": "12000",
"resulting_debit_balance": "0",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "0"
}
]
},
{
"dry_run": true,
"would_apply": true,
"operation": "commit",
"status": "APPLIED",
"reference": "ref_hold_002",
"currency": "USD",
"amount": 40,
"precise_amount": "4000",
"precision": 100,
"balances": [
{
"balance_id": "bln_source-bal-001",
"role": "source",
"currency": "USD",
"current_balance": "50000",
"current_available": "46000",
"current_credit_balance": "50000",
"current_debit_balance": "0",
"current_inflight_debit_balance": "4000",
"current_inflight_credit_balance": "0",
"resulting_balance": "46000",
"resulting_available": "46000",
"resulting_credit_balance": "50000",
"resulting_debit_balance": "4000",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "0"
},
{
"balance_id": "blnk_dest-bal-002",
"role": "destination",
"currency": "USD",
"current_balance": "0",
"current_available": "0",
"current_credit_balance": "0",
"current_debit_balance": "0",
"current_inflight_debit_balance": "0",
"current_inflight_credit_balance": "4000",
"resulting_balance": "4000",
"resulting_available": "4000",
"resulting_credit_balance": "4000",
"resulting_debit_balance": "0",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "0"
}
]
}
]
}
{
"dry_run": true,
"would_apply": false,
"cumulative": false,
"atomic": false,
"results": [
{
"dry_run": true,
"would_apply": true,
"operation": "commit",
"status": "APPLIED",
"reference": "ref_hold_001",
"currency": "USD",
"amount": 120,
"precise_amount": "12000",
"precision": 100
},
{
"dry_run": true,
"would_apply": false,
"operation": "commit",
"rejection": {
"code": "TXN_COMMIT_AMOUNT_EXCEEDED",
"reason": "commit_amount_exceeded",
"message": "cannot commit more than the original transaction amount. Original: USD40.00, Requested: USD999999.00"
},
"reference": "ref_hold_002",
"currency": "USD",
"amount": 999999,
"precise_amount": "99999900",
"precision": 100
}
]
}
{
"succeeded": 2,
"failed": 0,
"results": [
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"status": "queued",
"code": "QUEUED"
},
{
"transaction_id": "txn_c5d9e2a1-7b4f-4a3c-9e8d-1f6a2b4c8d30",
"status": "queued",
"code": "ALREADY_QUEUED",
"message": "a commit or void is already queued for this transaction"
}
]
}
{
"succeeded": 2,
"failed": 1,
"results": [
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"status": "succeeded"
},
{
"transaction_id": "txn_c5d9e2a1-7b4f-4a3c-9e8d-1f6a2b4c8d30",
"status": "succeeded"
},
{
"transaction_id": "txn_7c91e4b2-3d8a-4f6e-b1c2-9a8d7e6f5b4a",
"status": "failed",
"code": "INVALID_AMOUNT",
"message": "cannot commit more than inflight amount"
}
]
}
{
"error": "transactions cannot be empty",
"error_detail": {
"code": "TXN_BULK_EMPTY",
"message": "transactions cannot be empty"
}
}
{
"error": "too many transactions; max is 100",
"error_detail": {
"code": "TXN_BULK_LIMIT_EXCEEDED",
"message": "too many transactions; max is 100"
}
}