Bulk Transaction Processing
Batch processing enables the submission of multiple transactions within one API call, making it well-suited for scenarios involving large-scale or high-frequency payment operations.
How to Implement
Initiating a New Batch
To begin creating a batch of transactions:
- curl
curl -X POST --location "https://sandbox-api.neodeos.com/batch/transaction/payment_method" \
-H "x-secretkey: <secret_key>" \
-H "Content-Type: application/json" \
-d '{
"Count": 2,
"Description": "Test",
"Batch": "PaymentMethodId,Amount,Currency,Reference\nfc3fb5ff9e3b42c290c740c8772b40aa,123.3,USD,reference\nfc3fb5ff9e3b42c290c740c8772b40aa,13.3,USD,reference2",
"Webhook": {
"Url": "https://webhook.site/1752c235-7693-466b-9710-f6ca4e0f8255",
"Authorization": "Basic dXNlcjpwYXNzd29yZA=="
}
}'
Get Status of Batch
The Status field can have one of the following values: RECEIVED, CREATED, IN_PROGRESS, SUCCESS, FAILED.
RECEIVED: The batch has been received by the system.CREATED: The batch is ready and queued for processing.IN_PROGRESS: The system is currently processing the batch.SUCCESS: All transactions in the batch were successfully completed.FAILED: The batch encountered an error during processing. Contact support for assistance.
The Progress value shows how much of the batch has been processed, expressed as a decimal between 0 and 1
To get the status of a batch:
- curl
curl -X GET --location "https://sandbox-api.neodeos.com/batch/{{batchId}}/status" \
-H "x-secretkey: <secret_key>" \
-H "Content-Type: application/json"
Retrieve Batch Details
When you fetch batch data, the response includes a Results field that outlines the status of individual transactions within the batch. This field is formatted as a CSV-style string structured as:
PaymentMethodId,Amount,Currency,Reference,Status,TransactionId,FailureReason,GatewayErrorCode,GatewayErrorResponse,IsRetryable.
The Status field can reflect one of the following states: RECEIVED - All transactions in the batch have completed successfully.
CREATED: Transactions have been initialized and queued for processing.IN_PROGRESS: Transactions in the batch are currently being executed.SUCCESS: All transactions in the batch have completed successfully. TheTransactionIdwill contain the unique ID for each processed transaction.FAILED: One or more transactions encountered errors during processing. In this case:FailureReasonprovides the root cause.GatewayErrorCode,GatewayErrorResponse,IsRetryablesupply detailed error diagnostics from the payment gateway.
Retrieving Batch Metadata and Transaction Details:
- curl
curl -X GET --location "https://sandbox-api.neodeos.com/batch/{{batchId}}" \
-H "x-secretkey: <secret_key>" \
-H "Content-Type: application/json"
For a deeper dive into batch processing functionality, consult the API documentation.