The GetBachResult Method gives the ability to obtain the status of the last two batch settlements performed on a payment terminal through an API command provided the terminal database has not been cleared. The BatchKey or terminal SerialNum may be used to retrieve the batch result.
Section 9.1 - Service Location: link
For SOAP connections:
https://demo.spweblink.com/service/GetBatchResult.asmx?op=GetBatchResult
For standard HTTPS connections:
https:/demo.spweblink.com/service/GetBatchResult.asmx
GetBatchResult 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 |
2 |
Set in seconds. Maximum is 1 minutes=60 seconds. |
BatchKey |
C/O |
6 |
Unique identifier assigned to batch by the web service. Will be returned in the ExtData in BatchAll response. * If BatchKey value is provided, command will ignore RequestTerminalSN field value. |
RequestTerminalSN |
C/O |
10 |
Specific serial number of payment device for which you would like batch result. *If you do not know this serial number, use the BatchKey that was returned in the response of BatchAll. |
ExtData |
O |
VAR |
Reserved for future use |
Section 9.1.1 - GetBatchResult Response Definitions: link
O = Optional, R = Required, C = Conditional
Parameter Name |
Opt/Req/ Conditional |
Max Length |
Description |
---|---|---|---|
ResultCode |
R |
6 |
Transaction Result Code |
ResultTxt |
C |
32 |
Transaction Result Text *Only returned when using JSON message format |
ResultMsg |
R |
32 |
Transaction Result Text |
IPaddress |
R |
128 |
IP address of initiating transaction |
PosID |
R |
24 |
Value assigned by Nuvei to identify the ECR/POS Station. Assigned by Nuvei to identify the ECR/POS station. |
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 |
Varies based on data requested |
Section 9.2 - GetBatchResult XML Schema link
Section 9.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/GetBatchResult"
<?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>
<GetBatchResult 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>
<BatchKey>string</BatchKey>
<RequestTerminalSN>string</RequestTerminalSN>
<TimeOut>string</TimeOut>
<ExtData>string</ExtData>
</GetBatchResult>
</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>
<GetBatchResultResponse xmlns="https://secure.spweblink.com/">
<GetBatchResultResult>
<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>
</GetBatchResultResult>
</GetBatchResultResponse>
</soap:Body>
</soap:Envelope>
Section 9.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>
<GetBatchResult 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>
<BatchKey>string</BatchKey>
<RequestTerminalSN>string</RequestTerminalSN>
<TimeOut>string</TimeOut>
<ExtData>string</ExtData>
</GetBatchResult>
</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>
<GetBatchResultResponse xmlns="https://secure.spweblink.com/">
<GetBatchResultResult>
<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>
</GetBatchResultResult>
</GetBatchResultResponse>
</soap12:Body>
</soap12:Envelope>
Section 9.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/GetBatchResult?UserName=string&Password=string&WorkstationID=string&PosID=string&Token=string&TerminalID=string&SerialNum=string&TraceNum=string&BatchKey=string&RequestTerminalSN=string&TimeOut=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 9.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/GetBatchResult 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&BatchKey=string&RequestTerminalSN=string&TimeOut=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 9.2.5 - JSON Format link
POST /Service/PosService.asmx/GetBatchResult HTTP/1.1
Host: demo.spweblink.com
Content-Type: application/json; charset=utf-8
Content-Length: length
{
"GetBatchResult": {
"UserName": "string",
"Password": "string",
"WorkstationID": "string",
"PosID": "string",
"Token": "string",
"TerminalID": "string",
"SerialNum": "string",
"TraceNum": "string",
"BatchKey": "string",
"RequestTerminalSN": "string",
"TimeOut": "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/"
}
}