Process Batch Response

After a batch has completed processing, you can request a response file that contains the result of each of the uploaded operations. You will receive the response file in csv format and in the same encoding as the batch upload request.

Download the Batch Response

You can download the batch response by sending a HTTPS GET request to:

https://suncorp.gateway.mastercard.com/batch/version/<versionNum>/merchant/<merchantId>/batch/<batchName>/response

where:

  • <versionNum> is the version of Batch Integration
  • <merchantId> is your Merchant identifier
  • <batchName> is your unique name for the batch

The response file will contain the same header and records as the original batch submission, with all fields overwritten with the results from the API request.

Below is an extract of a sample batch response file in csv format showing gateway response code as "APPROVED".

"apiOperation","order.id","transaction.id","order.amount","order.currency","sourceOfFunds.type","sourceOfFunds.provided.card.number","sourceOfFunds.provided.card.expiry.month","sourceOfFunds.provided.card.expiry.year","sourceOfFunds.provided.card.number","result","error.cause","error.explanation","response.gatewayCode"
"","921830104177","TXID1","30.00","AUD","CARD","512345xxxxxx2346","5","17","512345xxxxxx2346","SUCCESS","","","APPROVED"
"","921830104178","TXID1","100.00","AUD","CARD","512345xxxxxx2346","5","17","512345xxxxxx2346","SUCCESS","","","APPROVED"
"","921830104179","TXID1","50.00","AUD","CARD","498765xxxxxx8769","5","17","498765xxxxxx8769","SUCCESS","","","APPROVED"
"","921830104180","TXID1","90.00","AUD","CARD","498765xxxxxx8769","5","17","498765xxxxxx8769","SUCCESS","","","APPROVED"
"","921830104181","TXID1","45.00","AUD","CARD","345678xxxxx4564","5","17","345678xxxxx4564","SUCCESS","","","APPROVED"
"","921830104182","TXID1","75.00","AUD","CARD","345678xxxxx4564","5","17","345678xxxxx4564","SUCCESS","","","APPROVED"

Using the Batch Response

The information provided in the batch response is based on the parameters defined in the batch upload request. You may find it useful to include parameters such as response.gatewayCode and error.cause to be able to identify problems in processing operations.

It is also a good practice to validate whether the data you supplied for an operation is the same data used to process the operation. For example, you should check that amount returned in the batch response for an operation matches the value you sent in the batch request for that operation.

Copyright © 2023 Suncorp