Welcome to the Hosted Batch
Requests must use the HTTP PUT method and should have no query parameters.
Valid URLs are formatted as follows:
- https://eu-gateway.mastercard.com/batch/version/<versionNum>/merchant/<merchantId>/batch/<batchName>
Where:
- <versionNum> is the version of Hosted Batch
- <merchantId> is your Merchant identifier
- <batchName> is your unique name for the batch
The body of the request must:
- be CSV formatted
- contain a single header row designating request and response parameters in the order fields are sent/returned
- contain one or more operation rows.
The following character encodings are supported:
The body of the request is assumed to be encoded as ISO-8859-1 (latin1). If a different encoding is required, it should be defined in the content-type HTTP header
e.g. Content-Type: text/plain; charset=UTF-8
Example: A request defined as such:
result,apiOperation,apiPassword,merchant,order.id,transaction.id,transaction.amount,transaction.currency,transaction.authorizationCode,cardDetails.cardToken,card.number
,CAPTURE,password1,MYSHOP,202,203,100.00,USD,OK3720,cardtoken1,
,PAY,merchant2,YOURSHOP,198,198,50.00,USD,,cardtoken2,
Returns a response:
result,apiOperation,apiPassword,merchant,order.id,transaction.id,transaction.amount,transaction.currency,transaction.authorizationCode,cardDetails.cardToken,card.number
SUCCESS,,,MYSHOP,202,203,100.00,USD,OK3720,,123456XXXXXX1234
SUCCESS,,,YOURSHOP,198,198,50.00,USD,OK3700,,654321XXXXXX4321
Please refer to the API Reference Documentation for guidance in defining batch header request and response parameters.