Transactions

Bulk commit inflight

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

POST/transactions/inflight/bulk/commit

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

Call the method

BulkCommitInflightItem item = BulkCommitInflightItem.create()
    .transactionId("txn_c4e70eb8-e4d6-4e04-a2e2-92a43b96");

ApiResponse<JsonNode> response = blnk.transactions().bulkCommitInflight(
    BulkCommitInflightRequest.create()
        .transactions(List.of(item)));

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

BulkCommitInflightItem item = BulkCommitInflightItem.create()
    .transactionId("txn_c4e70eb8-e4d6-4e04-a2e2-92a43b96");

ApiResponse<JsonNode> response = blnk.transactions().bulkCommitInflight(
    BulkCommitInflightRequest.create()
        .skipQueue(true)
        .transactions(List.of(item)));

Preview every commit without settling any hold. See Dry-run transactions.

BulkCommitInflightItem item = BulkCommitInflightItem.create()
    .transactionId("txn_c4e70eb8-e4d6-4e04-a2e2-92a43b96");

ApiResponse<JsonNode> preview = blnk.transactions().bulkCommitInflight(
    BulkCommitInflightRequest.create()
        .dryRun(true)
        .transactions(List.of(item)));
FieldTypeDescription
transactionsList<
BulkCommitInflightItem>
Up to 100 inflight transactions to commit.
transactions.
[].transaction_id
StringInflight transaction ID to commit.
transactions.
[].amount
NumberPartial commit amount. Omit to commit the full remaining inflight amount.
transactions.
[].precise_amount
Number | StringPrecision-applied partial commit amount. Takes precedence over amount.
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_c4e70eb8-e4d6-4e04-a2e2-92a43b96",
      "status": "succeeded"
    },
    {
      "transaction_id": "txn_6164573b-6cc8-45a4-ad2e-7b4ba6a6",
      "status": "succeeded"
    },
    {
      "transaction_id": "txn_0b59f6e6-6c4a-4efa-915c-526f77ef",
      "status": "failed",
      "code": "INVALID_AMOUNT",
      "message": "cannot commit more than inflight amount"
    }
  ]
}
FieldTypeDescription
succeededNumberNumber committed 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_VOIDED, INVALID_AMOUNT).
results[].messageStringHuman-readable failure message.