The Query is used to have the PSI server re-send you what was in the original response call. Can be in the case complete communication was not received at the time of the original transaction.
Certain parameters must be in all API calls, view all the parameters below:
This field is part of the Common Request Parameters.
The value for this call is Query
RefNo in original request packet.
ReceiptNo in original request packet
Date and time of the original transaction request.
Format: yyyy-MM-dd HH:mm:ss<RequestXml> <Type>Query</Type> <TerminalId>BA12111112</TerminalId> <Password>*</Password> <Language>eng</Language> <OriginalRefNo>394</OriginalRefNo> <OriginalDateTime>2019-02-08 19:52:09</OriginalDateTime> <ClerkId>1</ClerkId> </RequestXml>There are two types of responses for this call:
Certain fields are returned from all API calls, view all the fields below:
Product code
PIN amount
Original PSInet transaction number.
U - Original transaction is pending. Retry Query every few seconds.
P - Original transaction was successful.
N - Original transaction failed.
(Once the receive Query with response <PsiNetStatus>P (succeed) or N (failed), client implement their own logic to determine if reversal is needed to resolve the transaction discrepancy. In certification testing, we simply require client to send PinlessRequest with ProdCode RETURN, to demonstrate client's ability to send reversal api call. )
PIN data block, object contents below:
The secret code of the Product to be given to the customer. This field is sent as clear text, not encrypted.
Can contain information that should be delivered to the customer with the product. Most PIN products do not have data in this field.
Can contain information that should be delivered to the customer with the product. Most PIN products do not have data in this field.
Serial number of the pin
Serial number of the pin
Serial number of the pin
Transaction's date and time
Response message EC sends to terminal
<ResponseXml><StatusCode>0</StatusCode><StatusDescription /><TransNo>0010005412649</TransNo><ProductCode>ECBHEG</ProductCode><Amount>25</Amount><eFreshStatus>P</eFreshStatus><PinData><Pin>https://egift.certification.blackhawknetwork.com/egift?tid=A71F3HSL8P9MYAZ3XDNZVRCPAX&eid=JANCA0LHWX9FVRJDQGS9ZV3G94</Pin><Custom1 /><Custom2 /><PinSerial>JANCA0LHWX9FVRJDQGS9ZV3G94</PinSerial><PinBatch /><ExpiryDate /><DateSold>2019-02-08 Friday 2:23:44 PM</DateSold><ResponseMessage>Approved</ResponseMessage></PinData><MerchantId>WenchengTesting</MerchantId><Company>VendTek has a very long name here</Company><CompanyCity>Port Moody</CompanyCity><CompanyPhone>1234567</CompanyPhone><CompanyDbaName>PSInet99</CompanyDbaName><TransDate>2019-02-08</TransDate><TransTime>14:23:44</TransTime><ProductVer>0340255</ProductVer><PromoVer>0340009</PromoVer><SoftVer /><InvoiceNumber /></ResponseXml>Certain fields are returned from all API calls, view all the fields below:
Product code
Amount
Original PSInet transaction number
U - Original transaction is pending. Retry Query every few seconds.
P - Original transaction was successful.
N - Original transaction failed.
(Once the receive Query with response <PsiNetStatus>P (succeed) or N (failed), client implement their own logic to determine if reversal is needed to resolve the transaction discrepancy. In certification testing, we simply require client to send PinlessRequest with ProdCode RETURN, to demonstrate client's ability to send reversal api call. )
Status of transaction in Sptrans
"" "" -Start of a transaction.
""P"" -Communication was successful and Approved.
""O"" -Communication was successful and Approved.
""M""-Communication was successful and was Not Approved.
""X"" -Communication was successful and Successfully Cancelled.
""T""-Communication was successful and was Not Successfully Cancelled.
""R"" -The communication failed and needs to be retried.
""C"" -The communication failed and needs to be cancelled.
""N"" - Either unable to connect to service provider or communication was successful but was Not Approved.
""Q""-User Terminated
""U""– Unknown error. Should check transaction/log.
""1P"" - Acknowledgment pending. (EC 11.08+)
""J"" - SiTEF Query approved."
Response message EC sends to terminal