Transactions

Bulk void inflight

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

POST/transactions/inflight/bulk/void

Use blnk.transactions.bulk_void_inflight to void multiple inflight transactions.

Call the method

response = blnk.transactions.bulk_void_inflight({
  "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.

response = blnk.transactions.bulk_void_inflight({
  "skip_queue": True,
  "transaction_ids": [
    "txn_11111111-1111-4111-8111-111111111111",
    "txn_22222222-2222-4222-8222-222222222222",
  ],
})

Preview every void without releasing any hold. See Dry-run transactions.

preview = blnk.transactions.bulk_void_inflight({
  "dry_run": True,
  "transaction_ids": [
    "txn_11111111-1111-4111-8111-111111111111",
    "txn_22222222-2222-4222-8222-222222222222",
  ],
})
FieldTypeDescription
transaction_idsstring[]Up to 100 inflight transaction IDs to void.
skip_queueboolWhen True, process synchronously instead of queuing.

Review per-item results

Check response.data["results"] for each transaction’s outcome. Failed items include a code and message without stopping the rest of the batch.

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.
resultslist[dict]Per-transaction outcome in request order.
results[].transaction_idstrTransaction ID from the request.
results[].statusstrsucceeded, failed, or queued (when skip_queue is False).
results[].codestrFailure code (for example NOT_FOUND, ALREADY_COMMITTED, NOT_INFLIGHT).
results[].messagestrHuman-readable failure message.