Transactions

Bulk void inflight

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

POST/transactions/inflight/bulk/void

Use blnk.transactions().bulkVoidInflight for this operation.

Call the method

List<String> transactionIds = List.of(
    "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94"
);

ApiResponse<JsonNode> response = blnk.transactions().bulkVoidInflight(
    BulkVoidInflightRequest.create()
        .transactionIds(transactionIds)
);

Pass skipQueue(true) to process each void synchronously instead of queuing.

List<String> transactionIds = List.of(
    "txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94"
);

ApiResponse<JsonNode> response = blnk.transactions().bulkVoidInflight(
    BulkVoidInflightRequest.create()
        .skipQueue(true)
        .transactionIds(transactionIds)
);

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

ApiResponse<JsonNode> preview = blnk.transactions().bulkVoidInflight(
    BulkVoidInflightRequest.create()
        .dryRun(true)
        .transactionIds(List.of("txn_f482a1b3-6c2d-4e89-a17b-3d5e8f2a1c94")));
FieldTypeDescription
transaction_idsList<String>Up to 100 inflight transaction IDs to void.
skip_queuebooleanWhen true, process synchronously instead of queuing.

Review per-item results

Check response.data().get("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.
resultsJsonNodeJSON array of per-transaction outcomes in request order. Read with response.data().
get("results").get(i).
results[].transaction_idStringTransaction ID from the request.
results[].statusStringsucceeded, failed, or queued (when skip_queue is false).
results[].codeStringFailure code (for example NOT_FOUND, ALREADY_COMMITTED, NOT_INFLIGHT).
results[].messageStringHuman-readable failure message.