Transactions
Bulk void inflight
Void multiple independently-created inflight transactions with the TypeScript SDK.
/transactions/inflight/bulk/voidUse blnk.Transactions.bulkVoidInflight to void multiple inflight transactions.
Call the method
const response = await blnk.Transactions.bulkVoidInflight({
transaction_ids: [
'txn_11111111-1111-4111-8111-111111111111',
'txn_22222222-2222-4222-8222-222222222222',
],
});Pass skip_queue: true to process each void synchronously instead of queuing.
const response = await blnk.Transactions.bulkVoidInflight({
skip_queue: true,
transaction_ids: [
'txn_11111111-1111-4111-8111-111111111111',
'txn_22222222-2222-4222-8222-222222222222',
],
});Preview every void without releasing any hold. Items are projected independently. See Dry-run transactions.
const preview = await blnk.Transactions.bulkVoidInflight({
dry_run: true,
transaction_ids: [
'txn_11111111-1111-4111-8111-111111111111',
'txn_22222222-2222-4222-8222-222222222222',
],
});
| Field | Type | Description |
|---|---|---|
dry_run | true | Return a BulkTransactionPreview without voiding. Holds stay in place. |
Pass dry_run: true inline, as shown above, to infer the preview response. If the request is declared separately, type it as DryRun<BulkVoidInflightRequest>.
| Field | Type | Description |
|---|---|---|
transaction_ids | string[] | Up to 100 inflight transaction IDs to void. |
skip_queue | boolean | When true, process synchronously instead of queuing. |
Review per-item results
On a posted batch, check response.data.results for each transaction’s outcome. Failed items include a code and message without stopping the rest of the batch.
A dry run has no succeeded / failed counts. Check would_apply and results.
Response
{
"succeeded": 2,
"failed": 1,
"results": [
{
"transaction_id": "txn_11111111-1111-4111-8111-111111111111",
"status": "succeeded"
},
{
"transaction_id": "txn_22222222-2222-4222-8222-222222222222",
"status": "succeeded"
},
{
"transaction_id": "txn_33333333-3333-4333-8333-333333333333",
"status": "failed",
"code": "ALREADY_COMMITTED",
"message": "cannot void. Transaction already committed"
}
]
}
| Field | Type | Description |
|---|---|---|
succeeded | number | Number voided successfully. |
failed | number | Number that failed. |
results | object[] | Per-transaction outcome in request order. |
results[].status | string | succeeded or failed. |
results[].code | string | Failure code (for example NOT_FOUND, ALREADY_COMMITTED, NOT_INFLIGHT). |
results[].message | string | Human-readable failure message. |
{
"dry_run": true,
"would_apply": true,
"cumulative": false,
"atomic": false,
"results": [
{
"dry_run": true,
"would_apply": true,
"operation": "void",
"status": "VOID",
"reference": "ref_hold_001",
"currency": "USD",
"amount": 120,
"precise_amount": "12000",
"precision": 100
},
{
"dry_run": true,
"would_apply": true,
"operation": "void",
"status": "VOID",
"reference": "ref_hold_002",
"currency": "USD",
"amount": 40,
"precise_amount": "4000",
"precision": 100
}
]
}