Transactions
Update inflight
Commit or void an inflight transaction
PUT
/
transactions
/
inflight
/
{transaction_id}
curl -X PUT "http://localhost:5001/transactions/inflight/{transaction_id}" \
-H "X-blnk-key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"status": "commit"
}'
curl -X PUT "http://localhost:5001/transactions/inflight/{transaction_id}" \
-H "X-blnk-key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"status": "commit",
"dry_run": true
}'
{
"dry_run": true,
"would_apply": true,
"operation": "commit",
"status": "APPLIED",
"reference": "ref_card_settle_4821",
"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": false,
"operation": "commit",
"rejection": {
"code": "TXN_COMMIT_AMOUNT_EXCEEDED",
"reason": "commit_amount_exceeded",
"message": "cannot commit more than the original transaction amount. Original: USD120.00, Requested: USD999999.00"
},
"reference": "ref_card_settle_4821",
"currency": "USD",
"amount": 999999,
"precise_amount": "99999900",
"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": "50000",
"resulting_available": "38000",
"resulting_credit_balance": "50000",
"resulting_debit_balance": "0",
"resulting_inflight_debit_balance": "12000",
"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": "0",
"resulting_available": "0",
"resulting_credit_balance": "0",
"resulting_debit_balance": "0",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "12000"
}
]
}
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"status": "INFLIGHT",
"queued": true
}
{
"amount": 1250.34,
"precision": 100,
"precise_amount": 125034,
"transaction_id": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
"parent_transaction": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
"source": "bln_f344b673-e855-4bda-b769-3e94a02c1941",
"destination": "@WorldUSD",
"reference": "ref_2ye281ewiu-1e17-dh17-eh18728hd245",
"currency": "USD",
"description": "Card payment on Stripe",
"status": "APPLIED",
"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",
"inflight_commit_date": "0001-01-01T00:00:00Z"
}
{
"error": "transaction is not in inflight status",
"error_detail": {
"code": "TXN_NOT_INFLIGHT",
"message": "transaction is not in inflight status"
}
}
{
"error": "status not supported. use either commit or void",
"error_detail": {
"code": "TXN_INVALID_STATUS_ACTION",
"message": "status not supported. use either commit or void"
}
}
{
"error": "Transaction with ID 'txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94' not found",
"error_detail": {
"code": "TXN_NOT_FOUND",
"message": "Transaction with ID 'txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94' not found",
"details": {}
}
}
{
"error": "cannot void. Transaction already committed",
"error_detail": {
"code": "TXN_ALREADY_COMMITTED",
"message": "cannot void. Transaction already committed"
}
}
{
"error": "a commit or void is already queued for this transaction",
"error_detail": {
"code": "GEN_CONFLICT",
"message": "a commit or void is already queued for this transaction"
}
}
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.
Path
string
required
The unique id of the inflight transaction.
Body
string
required
Specifies the instruction for the inflight.
commitmeans the conditions were met and transaction should be processed.voidmeans the conditions were not met and amount should be rolled back.
integer
The commit amount in its smallest unit for a partial commit (recommended). Learn more: Partial commits for inflight transactions.
integer
Optional float amount to commit for a partial commit. Blnk converts it using the inflight transaction’s
precision. When both are set, precise_amount takes precedence over amount.boolean
default:"false"
When
false (default), the commit or void is enqueued for asynchronous processing and the response includes queued: true. When true, Blnk processes the action synchronously and returns an immediate APPLIED or VOID child. See Commit & void inflight.boolean
default:"false"
When
true, Blnk projects the commit or void without settling anything. The hold stays in place. See Dry-run a transaction.To commit or void multiple independently-created inflight transactions in one request, use Bulk commit inflight or Bulk void inflight.
Response
Same JSON structure as Record a transactioncurl -X PUT "http://localhost:5001/transactions/inflight/{transaction_id}" \
-H "X-blnk-key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"status": "commit"
}'
curl -X PUT "http://localhost:5001/transactions/inflight/{transaction_id}" \
-H "X-blnk-key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"status": "commit",
"dry_run": true
}'
{
"dry_run": true,
"would_apply": true,
"operation": "commit",
"status": "APPLIED",
"reference": "ref_card_settle_4821",
"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": false,
"operation": "commit",
"rejection": {
"code": "TXN_COMMIT_AMOUNT_EXCEEDED",
"reason": "commit_amount_exceeded",
"message": "cannot commit more than the original transaction amount. Original: USD120.00, Requested: USD999999.00"
},
"reference": "ref_card_settle_4821",
"currency": "USD",
"amount": 999999,
"precise_amount": "99999900",
"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": "50000",
"resulting_available": "38000",
"resulting_credit_balance": "50000",
"resulting_debit_balance": "0",
"resulting_inflight_debit_balance": "12000",
"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": "0",
"resulting_available": "0",
"resulting_credit_balance": "0",
"resulting_debit_balance": "0",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "12000"
}
]
}
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"status": "INFLIGHT",
"queued": true
}
{
"amount": 1250.34,
"precision": 100,
"precise_amount": 125034,
"transaction_id": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
"parent_transaction": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
"source": "bln_f344b673-e855-4bda-b769-3e94a02c1941",
"destination": "@WorldUSD",
"reference": "ref_2ye281ewiu-1e17-dh17-eh18728hd245",
"currency": "USD",
"description": "Card payment on Stripe",
"status": "APPLIED",
"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",
"inflight_commit_date": "0001-01-01T00:00:00Z"
}
{
"error": "transaction is not in inflight status",
"error_detail": {
"code": "TXN_NOT_INFLIGHT",
"message": "transaction is not in inflight status"
}
}
{
"error": "status not supported. use either commit or void",
"error_detail": {
"code": "TXN_INVALID_STATUS_ACTION",
"message": "status not supported. use either commit or void"
}
}
{
"error": "Transaction with ID 'txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94' not found",
"error_detail": {
"code": "TXN_NOT_FOUND",
"message": "Transaction with ID 'txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94' not found",
"details": {}
}
}
{
"error": "cannot void. Transaction already committed",
"error_detail": {
"code": "TXN_ALREADY_COMMITTED",
"message": "cannot void. Transaction already committed"
}
}
{
"error": "a commit or void is already queued for this transaction",
"error_detail": {
"code": "GEN_CONFLICT",
"message": "a commit or void is already queued for this transaction"
}
}
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 PUT "http://localhost:5001/transactions/inflight/{transaction_id}" \
-H "X-blnk-key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"status": "commit"
}'
curl -X PUT "http://localhost:5001/transactions/inflight/{transaction_id}" \
-H "X-blnk-key: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"status": "commit",
"dry_run": true
}'
{
"dry_run": true,
"would_apply": true,
"operation": "commit",
"status": "APPLIED",
"reference": "ref_card_settle_4821",
"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": false,
"operation": "commit",
"rejection": {
"code": "TXN_COMMIT_AMOUNT_EXCEEDED",
"reason": "commit_amount_exceeded",
"message": "cannot commit more than the original transaction amount. Original: USD120.00, Requested: USD999999.00"
},
"reference": "ref_card_settle_4821",
"currency": "USD",
"amount": 999999,
"precise_amount": "99999900",
"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": "50000",
"resulting_available": "38000",
"resulting_credit_balance": "50000",
"resulting_debit_balance": "0",
"resulting_inflight_debit_balance": "12000",
"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": "0",
"resulting_available": "0",
"resulting_credit_balance": "0",
"resulting_debit_balance": "0",
"resulting_inflight_debit_balance": "0",
"resulting_inflight_credit_balance": "12000"
}
]
}
{
"transaction_id": "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94",
"status": "INFLIGHT",
"queued": true
}
{
"amount": 1250.34,
"precision": 100,
"precise_amount": 125034,
"transaction_id": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
"parent_transaction": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
"source": "bln_f344b673-e855-4bda-b769-3e94a02c1941",
"destination": "@WorldUSD",
"reference": "ref_2ye281ewiu-1e17-dh17-eh18728hd245",
"currency": "USD",
"description": "Card payment on Stripe",
"status": "APPLIED",
"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",
"inflight_commit_date": "0001-01-01T00:00:00Z"
}
{
"error": "transaction is not in inflight status",
"error_detail": {
"code": "TXN_NOT_INFLIGHT",
"message": "transaction is not in inflight status"
}
}
{
"error": "status not supported. use either commit or void",
"error_detail": {
"code": "TXN_INVALID_STATUS_ACTION",
"message": "status not supported. use either commit or void"
}
}
{
"error": "Transaction with ID 'txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94' not found",
"error_detail": {
"code": "TXN_NOT_FOUND",
"message": "Transaction with ID 'txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94' not found",
"details": {}
}
}
{
"error": "cannot void. Transaction already committed",
"error_detail": {
"code": "TXN_ALREADY_COMMITTED",
"message": "cannot void. Transaction already committed"
}
}
{
"error": "a commit or void is already queued for this transaction",
"error_detail": {
"code": "GEN_CONFLICT",
"message": "a commit or void is already queued for this transaction"
}
}