Transactions
Bulk void inflight
Void multiple independently-created inflight transactions with the Go SDK.
POST
/transactions/inflight/bulk/voidUse client.Transaction.BulkVoidInflight to void multiple inflight transactions.
Call the method
Queued void
result, _, _ := client.Transaction.BulkVoidInflight(
blnkgo.BulkVoidInflightRequest{
TransactionIDs: []string{
"txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
"txn_6164573b-6cc8-45a4-ad2e-7b4ba6a60f7d",
},
},
)Synchronous void
Pass SkipQueue: true to process each void synchronously instead of queuing.
result, _, _ := client.Transaction.BulkVoidInflight(
blnkgo.BulkVoidInflightRequest{
SkipQueue: true,
TransactionIDs: []string{
"txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
"txn_6164573b-6cc8-45a4-ad2e-7b4ba6a60f7d",
},
},
)Dry run
Preview every void without releasing any hold. Use BulkVoidInflightDryRun. See Dry-run transactions.
preview, _, _ := client.Transaction.BulkVoidInflightDryRun(
blnkgo.BulkVoidInflightRequest{
TransactionIDs: []string{
"txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
"txn_6164573b-6cc8-45a4-ad2e-7b4ba6a60f7d",
},
},
)| Field | Type | Description |
|---|---|---|
TransactionIDs | []string | Up to 100 inflight transaction IDs to void. |
SkipQueue | bool | When true, process synchronously instead of queuing. |
Review per-item results
On a posted batch, check result.Results for each transaction’s outcome.
A dry run has no succeeded or failed counts. Check WouldApply and Results.
Response
Queued voidGo response (
{
"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": "ALREADY_COMMITTED",
"message": "cannot void. Transaction already committed"
}
]
}Go response (*blnkgo.BulkVoidInflightResponse)
| Field | Type | Description |
|---|---|---|
Succeeded | int | Number voided successfully. |
Failed | int | Number that failed. |
Results | []blnkgo.BulkVoidInflightResult | Per-transaction outcome in request order. |
Results.[].TransactionID | string | Transaction ID from the request. |
Results.[].Status | string | succeeded, failed, or queued (when SkipQueue is false). |
Results.[].Code | string | Failure code (for example NOT_FOUND, ALREADY_COMMITTED, NOT_INFLIGHT). |
Results.[].Message | string | Human-readable failure message. |
Dry run
{
"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
}
]
}