Skip to main content
POST
/
transactions
/
bulk
Bulk transactions
curl --request POST \
  --url http://localhost:5001/transactions/bulk \
  --header 'X-blnk-key: <api-key>'
Use client.Transaction.CreateBulk to create many transactions in one request.
1

Call the method

client.Transaction.CreateBulk
result, resp, err := client.Transaction.CreateBulk(blnkgo.CreateBulkTransactionRequest{
	Atomic: true,
	Transactions: []blnkgo.CreateTransactionRequest{
		{
			ParentTransaction: blnkgo.ParentTransaction{
				Amount: 1000,
				Precision: 100,
				Currency: "USD",
				Source: "@source_1",
				Destination: "@dest_1",
				Reference: "bulk_001",
				Description: "Payment 1",
			},
		},
		{
			ParentTransaction: blnkgo.ParentTransaction{
				Amount: 2000,
				Precision: 100,
				Currency: "USD",
				Source: "@source_2",
				Destination: "@dest_2",
				Reference: "bulk_002",
				Description: "Payment 2",
			},
		},
	},
})
FieldTypeDescription
Transactions[]CreateTransactionRequestTransaction objects to create; references must be unique within the batch.
AtomicboolWhen true, every transaction succeeds or fails together.
InflightboolWhen true, transactions are created in INFLIGHT status for a later commit or void.
RunAsyncboolWhen true, Core processes the batch in the background and returns status: "queued".
SkipQueueboolWhen true, transactions bypass the queue and process synchronously.
2

Save the batch ID

Use result.BatchID as ParentTransactionID to find child transactions, or with Update to commit or void an inflight batch.
3

Response

{
  "batch_id": "bulk_c62f200b-905f-4983-a349-cadd279234aa",
  "status": "applied",
  "transaction_count": 4
}
FieldTypeDescription
batch_idstringIdentifier for the batch. Use as parent_transaction to find child transactions, or with Update to commit or void an inflight batch.
statusstringapplied, inflight, or queued depending on the batch.
transaction_countnumberNumber of transactions when processed synchronously.
messagestringStatus message when RunAsync is true.

Bulk transactions guide

Batch processing, webhooks, and retrieving a batch.

Bulk transactions

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.