Transactions

Bulk void inflight

Void multiple independently-created inflight transactions with the TypeScript SDK.

POST/transactions/inflight/bulk/void

Use 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',
  ],
});
FieldTypeDescription
dry_runtrueReturn 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>.

FieldTypeDescription
transaction_idsstring[]Up to 100 inflight transaction IDs to void.
skip_queuebooleanWhen 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"
    }
  ]
}
FieldTypeDescription
succeedednumberNumber voided successfully.
failednumberNumber that failed.
resultsobject[]Per-transaction outcome in request order.
results[].statusstringsucceeded or failed.
results[].codestringFailure code (for example NOT_FOUND, ALREADY_COMMITTED, NOT_INFLIGHT).
results[].messagestringHuman-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
    }
  ]
}