Batch Management

An overview of the Batch Management message.

Overview

Please see below for information on configuring the batchManagementRequest, as well as the expected batchManagementResponse. This request is used to either open a new batch (‘group’ of transactions) or to close an active batch. This is especially useful for reporting purposes.

On PAX (Paydroid) devices, a batch remains open for 72 hours before automatically being closed and a new one being started (unless the user ends it manually before this time)

batchManagementRequest

For a typical batch management request the client must provide the following information:

Field Type Length (chars) Description Example Required Card terminal support
msgLength String 4 A 4-digit number padded with leading zeros indicating message length minus 4 (including any separators). The request will be rejected if the correct message length is not provided. ‘0063’ Android Card Terminals
sessionId String 6 A unique number to control integrity of session sequence. ‘002690’ Android Card Terminals
msgType String 3 ‘500’ ‘500’ Android Card Terminals
command String 5 Specifies the request action.
  • Send “open” for creating a new batch
  • Send “close” for closing the batch
‘open’ Android Card Terminals
batchName String variable up to 20 When opening a new batch, this parameter will be used as the batch name. If no value is provided, the batch will be named automatically. When closing a batch, this parameter will be used in order to find an open batch with this name. If no value is provided, the currently active batch will be closed. 'name' Android Card Terminals
batchId String variable up to 50 This parameter is used only when closing a batch and tries to close the batch with this specific UUID. ‘d3fdc9c5-2975-4612-bf52-8c43cd2eb1ba’ Android Card Terminals

The above information elements must be joined into one single string using ‘|’ as a separator. i.e.

0058|002690|500|open|name|d3fdc9c5-2975-4612-bf52-8c43cd2eb1ba

If the resulting string gets appropriately transmitted to the terminal, the terminal will respond with a batchManagementResponse message (510).

batchManagementResponse

In a batchManagementRequest the terminal responds with a batchManagementResponse to indicate request was successful or not.

A batchManagementResponse for an approved transaction looks as follows:

0064|000015|510|open|00|00|name|d3fdc9c5-2975-4612-bf52-8c43cd2eb1ba

The table below summarizes the contents of the response.

Field Length (chars) Description Example Card terminal support
msgLength 4 A 4-digit number padded with leading zeros indicating the length of the message that follows (including separators). Before considering the msgLength value, please make sure that you've decoded the terminal response with UTF-8. '0063' Android Card Terminals
sessionId 6 A unique number to control integrity of session sequence. '002690' Android Card Terminals
msgType 3 ‘500’ ‘500’ Android Card Terminals
command 5 Specifies the completed action.
  • “open” for the newly-opened batch
  • “close” for the closed batch
'open' Android Card Terminals
respCodeResp 2 Approval status. '00' indicates approval. All other values indicate failure codes. See failure code table at the end. '00' Android Card TerminalsLinux Card Terminals
respMessageResp variable up to 60 A string containing information on how the transaction was made, the card holder verification method used, the RRN and the Auth.code provided by the host. '00' Android Card TerminalsLinux Card Terminals
batchName variable up to 20 When opening a new batch, this parameter will be used as the batch name. If no value is provided, the batch will be named automatically.

When closing a batch, this parameter will be used in order to find an open batch with this name. If no value is provided, the currently active batch will be closed.
'name' Android Card Terminals
batchId variable up to 50 This parameter is used only when closing a batch and tries to close the batch with this specific UUID. ‘d3fdc9c5-2975-4612-bf52-8c43cd2eb1ba’ Android Card Terminals

Get Support

If you would like to integrate with Viva, or if you have any queries about our products and solutions, please see our Contact & Support page to see how we can help!