Batch Input Processing Transactions

Batch Input Processing

The Batch Input Service allows many of the MasterCard Payment Gateway Services to be utilised by submitting a batch of transactions, instead of submitting individual transactions as they occur.

The following MasterCard Payment Gateway Services can be accessed with the Batch Input Service:

  • Credit and Debit Cards Payments:

    • One and Two Stage Card Processing

    • Pre-Registered Cards

    • AVS checking

  • BACS Payments:

    • Direct Debits

    • Direct Credits

This document is intended as an overview of the Batch Input Service. Further details about the aspects of the service are available in the links above. 

There are three parts to the Batch Input Service; batch submissionbatch runand batch query

Batch Submission


The transaction details are first collated by your systems and placed into a file in a format specified by MasterCard Payment Gateway Services. This file is placed within an XML transaction and is submitted to MasterCard Payment Gateway Services. We perform some validation checks on the file - including verifying the security details. The results of this validation are returned within a response document.

Batch Run


Once a batch has passed the validation, it can then be processed by MasterCard Payment Gateway Services - this is called a batch run. During a batch run, additional verification checks are performed on the batch and each transaction in the batch is individually submitted to the DPG. These individual transactions follow the same processing as if they had been submitted from you directly (instead of via Batch Input). The result of each transaction is stored in the DPG and will be settled if appropriate.

Batch Query


To receive the results of the individual transactions within the file, a batch query can be made. This can either be submitted as an XML transaction directly to the DPG, or it can be performed via the Reporting System.

Requirements


Before you can go live with the Batch Input Service, you will need the following:

  • an account with MasterCard Payment Gateway Services configured for the Batch Input Service

  • the ablity to collect the results of each batch

In addition, you will also need to satisfy the requirements of each individual service you will be using.

Batch Format


There are two types of Batch Format for the Batch Input Service which can be used to submit transactions to MasterCard Payment Gateway Services:

  • XML format

  • CSV format - Comma Separated Values

For each batch, either format can be used for the transactions. There are no restrictions, extra service charges or additional account configuration required. The results of each batch will be available in the same format as the batch itself. 

The two formats are available to enable you to select the format that is easiest for you to integrate with. Full details of both formats for each aspect of Batch Input are available in the Developers Guide.

XML Format


The XML format enables you to take advantage of the flexibility of XML. Using the XML format will allow you to create a single batchfile which - for example - contains:

  • the first stage of a two stage transaction

  • the second stage of an existing uncompleted two stage transaction

If you have already integrated MasterCard Payment Gateway Services real time processing, choosing the XML format for Batch Input Processing will allow you to re-use existing functionality, as the formats for the individual transactions remain the same for both types.

CSV Format


The CSV format is less flexible than the XML format, but you may find it easier to utilise. As different transaction types require different information to be supplied, only transactions which contain the same type of information can be submitted in the same batch. 

For example, this means that if you are using a two stage processing model, you cannot mix first stage and second stage transactions in the same file - two files would be needed.

Performing Transactions


Whether you are using the XML or CSV format, there are two stages to processing a batchfile. The first is to submit the batch, and the second is to collect the results.

Submitting a Batch


Each time a batch is submitted to the MasterCard Payment Gateway, it contains the following information about the file:

  • the security details to identify your account - the client and password

  • a count of the number of transactions within the file

  • a sum of the value of transactions within the file

  • a unique reference number for the batch

  • the format name of the file

This information is required for both XML and CSV formats. 

The details required for the transactions themselves will depend upon the exact details of the service that you are using. Please follow one of the links for more details:

  • Credit and Debit Cards Payments

  • BACS Payments

Once a batch has been submitted to the DPG, we will perform some basic validation to ensure it is a valid batchfile. The results of this validation are returned in real time, allowing you to instantly know if there is a problem with the batch. To allow you to quickly rectify and resubmit the data, MasterCard Payment Gateway Services will not proceed with further processing of any failed batches.

Processing a Batch


The processing of a batch - the batch run - is performed by the DPG. It requires no action on your part.

Collecting the Results of a Batch


The results of each batch can be collected via either the Reporting System or by submitting a query transaction to the DPG. 

If you are using the query transaction, you will need to supply the MasterCard Payment Gateway Services reference returned to you when the Batch Input Transaction was originally submitted.

The results of the individual transactions within a successfully processed batchfile will be returned in the same format as the batchfile itself. For example, if an XML format file is submitted, the batch query will return the results of the individual transactions in an XML format.

Response Codes


A complete list of Response Codes for the Batch Input Service is available here. The Support Centre also contains extensive examples for most error codes. Illustrations are given to demonstrate on how they would appear in both Reporting and an XML Response. Suggestions are also given to help you prevent them from occurring.

Reporting


The Batch Input files are detailed in the Batch Input section of the MasterCard Payment Gateway Services Reporting system. There are three main pages:

The Batch Input files are detailed in the Batch Input section of the MasterCard Payment Gateway Services Reporting system. There are three main pages:

  • Summary - gives a summary of the batches submitted to your account

  • List - shows specific details of the batch

  • Details - shows full details of each batch, with links to show the full details of each individual transaction within the batch

The Support Centre contains full hints and tips to help you get the most out of Reporting.