Chapter 8 – BatchAll Method

To solve the complexities of performing batch settlement in a multi-terminal environment, the BatchAll method consolidates this by sending a single command to settle all devices at a single location or under the same PosID. If a particular device is offline, the service continues on to next device configured under the hierarchy and the Response provides the status of each batch performed per device.

 

Section 8.1 - Service Location: link

For SOAP connections:

https://demo.spweblink.com/service/BatchAll.asmx?op=BatchAll

For standard HTTPS connections:

https:/demo.spweblink.com/service/BatchAll.asmx

BatchAll Input Parameters:

O = Optional, R = Required, C = Conditional

Parameter Name

Opt/Req/ Conditional

Max Length

Description

UserName

R

32

User name assigned in the payment server. The user must have an appropriate level of access within the system in order to utilize the web service

Password

R

32

API password associated with the user name.

WorkstationID

O

24

Value assigned by ISV to the workstation

PosID

R

24

Value assigned by Nuvei to identify the ECR/POS Station. Assigned by Nuvei to identify the ECR/POS station

Token

R

64

Value assigned by Nuvei to identify the ISV

TerminalID

R

24

Identifies individual payment terminal (lane) within a group. Assigned by Nuvei.

SerialNum

R

10

Serial Number of any Payment device in the hierarchy at the merchant location.

TraceNum

R

14

Unique identifier of the transaction. Assigned by Nuvei web service at the initial time of transaction.

TimeOut

R

3

Set in seconds. Maximum is 4 minutes=240 seconds.

TransType

R

16

BATCHCLOSE – Closes the current batch.

FORCEBATCHCLOSE – Force closes the current batch, if supported by the host.

BATCHCLEAR – Clears the local database.

PURGEBATCH – Launches purge batch, if supported by host.

EDCType

O

10

PaymentTypes:

CREDIT

DEBIT

CHECK

EBT

GIFT

LOYALTY

CASH

TimeStamp

R

14

Transaction Time/date stamp.  

The date time: YYYYMMDDhhmmss

SAFIndicator

O

1

Store and forward upload type indicator 0: New stored transactions.

1: Failed transactions

2: All (upload/resend Failed + New records) Only valid when TransType = SAFUPLOAD and DELETESAFFILE

ExtData

O

VAR

Reserved for future use

 

Section 8.1.1 - BatchAll Response Definitions: link

O = Optional, R = Required, C = Conditional

Parameter Name

Opt/Req/ Conditional

Max Length

Description

ResultCode

R

6

Transaction Result Code

ResultTxt

O/C

 

*Only returned when using JSON message format

ResultMsg

R

32

Transaction Result Text

TransType

R

20

BATCHCLOSE – Closes the current batch.

FORCEBATCHCLOSE – Force closes the current batch, if supported by the host.

BATCHCLEAR – Clears the local database.

PURGEBATCH – Launches purge batch, if supported by host.

PosID

R

24

Value assigned by Nuvei to identify the ECR/POS Station. Assigned by Nuvei to identify the ECR/POS station.

IPaddress

R

128

IP address of initiating transaction

Port

R

9

Port of the initiating transaction

MacAddress

R

48

Identifies MAC address of payment device

TerminalID

R

24

Identifies individual payment terminal (lane) within a group. Assigned by Nuvei.

Token

R

64

Value assigned by Nuvei to identify the ISV

SerialNum

R

10

Unique Serial number of payment device.

TraceNum

R

14

Unique identifier of the transaction. Assigned by Nuvei web service at the initial time of transaction.

CreditCount

O/C

Var

Total Credit Transaction Count

**Does not include Voids or Authorizations (PreAuths)

CreditAmount

O/C

Var

Total Credit Transaction Amount

**Does not include Voids or Authorizations (PreAuths)

DebitCount

O/C

Var

Total Debit Transaction Count

DebitAmount

O/C

Var

Total Debit Transaction Amount

EBTCount

O/C

Var

Total EBT Transaction Count

EBTAmount

O/C

Var

Total EBT Transaction Amount

GiftCount

O/C

Var

Not supported at this time

GiftAmount

O/C

Var

Not supported at this time

LoyaltyCount

O/C

Var

Not supported at this time

LoyaltyAmount

O/C

Var

Not supported at this time

CashCount

O/C

Var

Not supported at this time

CashAmount

O/C

Var

Not supported at this time

CheckCount

O/C

Var

Not supported at this time

CheckAmount

O/C

Var

Not supported at this time

Timestamp

R

14

Transaction Time/Date Stamp:

Date/Time format: YYYYMMDDhhmmss

TID

R

20

Terminal ID

MID

R

20

Merchant ID

HostTraceNum

C

32

Host Trace Number: Mandatory if the host returns a trace number.

*Suggested to print this on the receipt.

BatchNum

O/C

32

Host Batch Number

Mandatory if the host returns a batch number.

AuthCode

R

10

Authorization Code: Returns the transaction Auth Code from the payment processor

HostCode

R

32

Reference Number:

Payment processing host reference number.

HostResponse

R

8

Host Response Code:

Payment processing host response

HostMessage

O/C

32

Host Response Message:

Host or Gateway Message

SAFTotalCount

O/C

4

Total number of new SAF records

follow the SAF indicator.

SAFTotalAmount

O/C

8

Total amount of new SAF records

follow the SAF indicator.

UploadRecords

O/C

4

Number of successful approved

uploaded records.

UploadAmount

O/C

8

Amount of successful approved

upload records.

FailedRecords

O/C

4

Number of failed records during the

upload process.

TotalFailedDatabase

O/C

8

Number of total records in failed

Database after the upload process.

DeleteRecords

O/C

4

Total number of records deleted.

ExtData

O

VAR

Response for consolidated settlement. See SOAP 1.1 for example.

 

<CombinedBatch>

 

<TerminalBatch>

TerminalSN

R

10

 

<TerminalSN>NNNNNNNN</TerminalSN>

BatchResult

R

32

 

<BatchResult>string</BatchResult>

BatchKey

R

6

 

<BatchKey>NNNNNN</BatchKey>

 

</TerminalBatch>

 

<CombinedBatch>

 

 

Section 8.2 - BatchAll XML Schema link

Section 8.2.1 - SOAP 1.1 Request and Response link

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /Service/PosService.asmx HTTP/1.1 Host: demo.spweblink.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "https://secure.spweblink.com/BatchAll" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <BatchAll xmlns="https://secure.spweblink.com/"> <UserName>string</UserName> <Password>string</Password> <WorkstationID>string</WorkstationID> <PosID>string</PosID> <Token>string</Token> <TerminalID>string</TerminalID> <SerialNum>string</SerialNum> <TraceNum>string</TraceNum> <TimeOut>string</TimeOut> <TransType>string</TransType> <EDCType>string</EDCType> <Timestamp>string</Timestamp> <SAFIndicator>string</SAFIndicator> <ExtData>string</ExtData> </BatchAll> </soap:Body> </soap:Envelope> HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <BatchAllResponse xmlns="https://secure.spweblink.com/"> <BatchAllResult> <ResultCode>string</ResultCode> <ResultTxt>string</ResultTxt> <ResultMsg>string</ResultMsg> <IPaddress>string</IPaddress> <PosID>string</PosID> <Port>string</Port> <MacAddress>string</MacAddress> <TerminalID>string</TerminalID> <Token>string</Token> <SerialNum>string</SerialNum> <TraceNum>string</TraceNum> <CreditCount>string</CreditCount> <CreditAmount>string</CreditAmount> <DebitCount>string</DebitCount> <DebitAmount>string</DebitAmount> <EBTCount>string</EBTCount> <EBTAmount>string</EBTAmount> <GiftCount>string</GiftCount> <GiftAmount>string</GiftAmount> <LoyaltyCount>string</LoyaltyCount> <LoyaltyAmount>string</LoyaltyAmount> <CashCount>string</CashCount> <CashAmount>string</CashAmount> <CheckCount>string</CheckCount> <CheckAmount>string</CheckAmount> <Timestamp>string</Timestamp> <TID>string</TID> <MID>string</MID> <HostTraceNum>string</HostTraceNum> <BatchNum>string</BatchNum> <AuthCode>string</AuthCode> <HostCode>string</HostCode> <HostResponse>string</HostResponse> <HostMessage>string</HostMessage> <SAFTotalCount>string</SAFTotalCount> <SAFTotalAmount>string</SAFTotalAmount> <UploadRecords>string</UploadRecords> <UploadAmount>string</UploadAmount> <FailedRecords>string</FailedRecords> <TotalFailedDatabase>string</TotalFailedDatabase> <DeleteRecords>string</DeleteRecords> <ExtData> <CombinedBatch> <TerminalBatch> <TerminalSN>string</TerminalSN> <BatchResult>string</BatchResult> <BatchKey>string</BatchKey> </TerminalBatch> <TerminalBatch> <TerminalSN>string</TerminalSN> <BatchResult>string</BatchResult> <BatchKey>string</BatchKey> </TerminalBatch> </CombinedBatch> </ExtData> </BatchAllResult> </BatchAllResponse> </soap:Body> </soap:Envelope>

Section 8.2.2 - SOAP 1.2 link

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

 
POST /Service/PosService.asmx HTTP/1.1 Host: demo.spweblink.com Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> </soap12:Envelope> HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <BatchAllResponse xmlns="https://secure.spweblink.com/"> <BatchAllResult> <ResultCode>string</ResultCode> <ResultTxt>string</ResultTxt> <ResultMsg>string</ResultMsg> <IPaddress>string</IPaddress> <PosID>string</PosID> <Port>string</Port> <MacAddress>string</MacAddress> <TerminalID>string</TerminalID> <Token>string</Token> <SerialNum>string</SerialNum> <TraceNum>string</TraceNum> <CreditCount>string</CreditCount> <CreditAmount>string</CreditAmount> <DebitCount>string</DebitCount> <DebitAmount>string</DebitAmount> <EBTCount>string</EBTCount> <EBTAmount>string</EBTAmount> <GiftCount>string</GiftCount> <GiftAmount>string</GiftAmount> <LoyaltyCount>string</LoyaltyCount> <LoyaltyAmount>string</LoyaltyAmount> <CashCount>string</CashCount> <CashAmount>string</CashAmount> <CheckCount>string</CheckCount> <CheckAmount>string</CheckAmount> <Timestamp>string</Timestamp> <TID>string</TID> <MID>string</MID> <HostTraceNum>string</HostTraceNum> <BatchNum>string</BatchNum> <AuthCode>string</AuthCode> <HostCode>string</HostCode> <HostResponse>string</HostResponse> <HostMessage>string</HostMessage> <SAFTotalCount>string</SAFTotalCount> <SAFTotalAmount>string</SAFTotalAmount> <UploadRecords>string</UploadRecords> <UploadAmount>string</UploadAmount> <FailedRecords>string</FailedRecords> <TotalFailedDatabase>string</TotalFailedDatabase> <DeleteRecords>string</DeleteRecords> <ExtData>string</ExtData> </BatchAllResult> </BatchAllResponse> </soap12:Body> </soap12:Envelope>

Section 8.2.3 - HTTPS GET link

The following is a sample HTTPS GET request and response. The placeholders shown need to be replaced with actual values.

 
GET /Service/PosService.asmx/BatchAll?UserName=string&Password=string&WorkstationID=string&PosID=string&Token=string&TerminalID=string&SerialNum=string&TraceNum=string&TimeOut=string&TransType=string&EDCType=string&Timestamp=string&SAFIndicator=string&ExtData=string HTTP/1.1 Host: demo.spweblink.com HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <PosBatchResult xmlns="https://secure.spweblink.com/"> <ResultCode>string</ResultCode> <ResultTxt>string</ResultTxt> <ResultMsg>string</ResultMsg> <IPaddress>string</IPaddress> <PosID>string</PosID> <Port>string</Port> <MacAddress>string</MacAddress> <TerminalID>string</TerminalID> <Token>string</Token> <SerialNum>string</SerialNum> <TraceNum>string</TraceNum> <CreditCount>string</CreditCount> <CreditAmount>string</CreditAmount> <DebitCount>string</DebitCount> <DebitAmount>string</DebitAmount> <EBTCount>string</EBTCount> <EBTAmount>string</EBTAmount> <GiftCount>string</GiftCount> <GiftAmount>string</GiftAmount> <LoyaltyCount>string</LoyaltyCount> <LoyaltyAmount>string</LoyaltyAmount> <CashCount>string</CashCount> <CashAmount>string</CashAmount> <CheckCount>string</CheckCount> <CheckAmount>string</CheckAmount> <Timestamp>string</Timestamp> <TID>string</TID> <MID>string</MID> <HostTraceNum>string</HostTraceNum> <BatchNum>string</BatchNum> <AuthCode>string</AuthCode> <HostCode>string</HostCode> <HostResponse>string</HostResponse> <HostMessage>string</HostMessage> <SAFTotalCount>string</SAFTotalCount> <SAFTotalAmount>string</SAFTotalAmount> <UploadRecords>string</UploadRecords> <UploadAmount>string</UploadAmount> <FailedRecords>string</FailedRecords> <TotalFailedDatabase>string</TotalFailedDatabase> <DeleteRecords>string</DeleteRecords> <ExtData>string</ExtData> </PosBatchResult>

Section 8.2.4 - HTTPS POST link

The following is a sample HTTPS POST request and response. The placeholders shown need to be replaced with actual values.

 
POST /Service/PosService.asmx/BatchAll HTTP/1.1 Host: demo.spweblink.com Content-Type: application/x-www-form-urlencoded Content-Length: length UserName=string&Password=string&WorkstationID=string&PosID=string&Token=string&TerminalID=string&SerialNum=string&TraceNum=string&TimeOut=string&TransType=string&EDCType=string&Timestamp=string&SAFIndicator=string&ExtData=string HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <PosBatchResult xmlns="https://secure.spweblink.com/"> <ResultCode>string</ResultCode> <ResultTxt>string</ResultTxt> <ResultMsg>string</ResultMsg> <IPaddress>string</IPaddress> <PosID>string</PosID> <Port>string</Port> <MacAddress>string</MacAddress> <TerminalID>string</TerminalID> <Token>string</Token> <SerialNum>string</SerialNum> <TraceNum>string</TraceNum> <CreditCount>string</CreditCount> <CreditAmount>string</CreditAmount> <DebitCount>string</DebitCount> <DebitAmount>string</DebitAmount> <EBTCount>string</EBTCount> <EBTAmount>string</EBTAmount> <GiftCount>string</GiftCount> <GiftAmount>string</GiftAmount> <LoyaltyCount>string</LoyaltyCount> <LoyaltyAmount>string</LoyaltyAmount> <CashCount>string</CashCount> <CashAmount>string</CashAmount> <CheckCount>string</CheckCount> <CheckAmount>string</CheckAmount> <Timestamp>string</Timestamp> <TID>string</TID> <MID>string</MID> <HostTraceNum>string</HostTraceNum> <BatchNum>string</BatchNum> <AuthCode>string</AuthCode> <HostCode>string</HostCode> <HostResponse>string</HostResponse> <HostMessage>string</HostMessage> <SAFTotalCount>string</SAFTotalCount> <SAFTotalAmount>string</SAFTotalAmount> <UploadRecords>string</UploadRecords> <UploadAmount>string</UploadAmount> <FailedRecords>string</FailedRecords> <TotalFailedDatabase>string</TotalFailedDatabase> <DeleteRecords>string</DeleteRecords> <ExtData>string</ExtData> </PosBatchResult>

Section 8.2.5 - JSON Format link

POST /Service/PosService.asmx/NewBatch HTTP/1.1 Host: demo.spweblink.com Content-Type: application/json; charset=utf-8 Content-Length: length { "NewBatch": { "UserName": "string", "Password": "string", "WorkstationID": "string", "PosID": "string", "Token": "string", "TerminalID": "string", "SerialNum": "string", "TraceNum": "string", "TimeOut": "string", "TransType": "string", "EDCType": "string", "Timestamp": "string", "SAFIndicator": "string", "ExtData": "string", "_xmlns": "https://secure.spweblink.com/" } } { " PosBatchResult": { " PosBatchResult": { "ResultCode": "string", "ResultTxt": "string", "ResultMsg": "string", "IPaddress": "string", "PosID": "string", "Port": "string", "MacAddress": "string", "TerminalID": "string", "Token": "string", "SerialNum": "string", "TraceNum": "string", "CreditCount": "string", "CreditAmount": "string", "DebitCount": "string", "DebitAmount": "string", "EBTCount": "string", "EBTAmount": "string", "GiftCount": "string", "GiftAmount": "string", "LoyaltyCount": "string", "LoyaltyAmount": "string", "CashCount": "string", "CashAmount": "string", "CheckCount": "string", "CheckAmount": "string", "Timestamp": "string", "TID": "string", "MID": "string", "HostTraceNum": "string", "BatchNum": "string", "AuthCode": "string", "HostCode": "string", "HostResponse": "string", "HostMessage": "string", "SAFTotalCount": "string", "SAFTotalAmount": "string", "UploadRecords": "string", "UploadAmount": "string", "FailedRecords": "string", "TotalFailedDatabase": "string", "DeleteRecords": "string", "ExtData": "string" }, "_xmlns": "https://secure.spweblink.com/" } } }

Need Help?

How can we help you today?  Our team is standing by and just a click away.