Skip to main content
POST
/
transactions
/
inflight
/
bulk
/
commit
Bulk commit inflight
curl --request POST \
  --url http://localhost:5001/transactions/inflight/bulk/commit \
  --header 'X-blnk-key: <api-key>'
Use client.Transaction.BulkCommitInflight to commit multiple inflight transactions.
1

Call the method

client.Transaction.BulkCommitInflight
result, resp, err := client.Transaction.BulkCommitInflight(
	blnkgo.BulkCommitInflightRequest{
		Transactions: []blnkgo.BulkCommitInflightItem{
			{
				TransactionID: "txn_c4e70eb8-e4d6-4e04",
			},
			{
				TransactionID: "txn_6164573b-6cc8-45a4",
				Amount: 40,
			},
			{
				TransactionID: "txn_0b59f6e6-6c4a-4efa",
				PreciseAmount: big.NewInt(125034),
			},
		},
	},
)
FieldTypeDescription
Transactions[]BulkCommitInflightItemUp to 100 inflight transactions to commit.
Transactions[].TransactionIDstringInflight transaction ID to commit.
Transactions[].Amountfloat64Partial commit amount. Omit to commit the full remaining inflight amount.
Transactions[].PreciseAmount*big.IntPrecision-applied partial commit amount. Takes precedence over Amount.
SkipQueueboolWhen true, process synchronously instead of queuing.
2

Review per-item results

Check result.Results for each transaction’s outcome. Failed items include a code and message without stopping the rest of the batch.
3

Response

200 OK
{
  "succeeded": 2,
  "failed": 1,
  "results": [
    {
      "transaction_id": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
      "status": "succeeded"
    },
    {
      "transaction_id": "txn_6164573b-6cc8-45a4-ad2e-7b4ba6a60f7d",
      "status": "succeeded"
    },
    {
      "transaction_id": "txn_0b59f6e6-6c4a-4efa-915c-526f77ef61ab",
      "status": "failed",
      "code": "INVALID_AMOUNT",
      "message": "cannot commit more than inflight amount"
    }
  ]
}
FieldTypeDescription
succeedednumberNumber committed successfully.
failednumberNumber that failed.
resultsobject[]Per-transaction outcome in request order.
results[].statusstringsucceeded or failed.
results[].codestringFailure code (for example NOT_FOUND, ALREADY_VOIDED, INVALID_AMOUNT).
results[].messagestringHuman-readable failure message.

Bulk inflight updates

Per-item failure codes and when to use batch updates.

Bulk commit inflight

HTTP request and response schema.

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.