Status of a Transaction

Query Transaction Overview

A Query Transaction message enables a merchant to query the status of a transaction using either a Transaction Reference or Token.

How to process a QueryTransactionRequest message

The merchant's system sends a QueryTransactionRequest message to ANYpay POS which calls the ANYpay Gateway host to query the status of the transaction.

Section QueryTransactionRequest Element describes the elements required to build an QueryTransactionRequest message.

🚧

QueryTransactionRequest message

In order to return the status of a transaction either a TransactionReference or Token MUST to be provided in the QueryTransactionRequest message

An example of a QueryTransactionRequest message can be seen below.

<?xml version="1.0" encoding="utf-16"?>
<QueryTransactionRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://servebase.com/2009/06/pedframework">
  <TransactionConfig>
    <CustomerCode>PXP</CustomerCode>
    <Site>PXP000000001</Site>
    <Culture>en</Culture>
    <Workstation>001</Workstation>
    <MerchantId>2100112262</MerchantId>
    <Username>PxpUser1</Username>
    <Password>PxpPassword</Password>
    <IpAddress>127.0.0.1</IpAddress>
  </TransactionConfig>         
  <TransactionReference>Sale</TransactionReference>
</QueryTransactionRequest>
<?xml version="1.0" encoding="utf-16"?>
<QueryTransactionRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://servebase.com/2009/06/pedframework">
  <TransactionConfig>
    <CustomerCode>PXP</CustomerCode>
    <Site>PXP000000001</Site>
    <Culture>en</Culture>
    <Workstation>001</Workstation>
    <MerchantId>2100112262</MerchantId>
    <Username>PxpUser1</Username>
    <Password>PxpPassword</Password>
    <IpAddress>127.0.0.1</IpAddress>
  </TransactionConfig>         
  <Token>684d8145-afef-4366-8d0a-1684ca5a84af</Token>
</QueryTransactionRequest>

Handling an IccTransactionResponse message

Section IccTransactionResponse Element describes the elements that are returned in an IccTransactionResponse message to a QueryTransactionRequest message. An example of a IccTransactionResponse message for can be seen below.

Section ErrorResponse Element describes the elements that are returned in an ErrorResponse message to a QueryTransactionRequest message should a transaction NOT be found. An example of an ErrorResponse message can be seen below.

<?xml version="1.0" encoding="utf-16"?>
<IccTransactionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://servebase.com/2009/06/pedframework">
  <Language>en</Language>
  <ResponseCode>Approved</ResponseCode>
  <FaultResponseCode>0</FaultResponseCode>
  <ResponseMessage>Transaction Approved</ResponseMessage>
  <ReceiptInfo xsi:type="IccReceiptInfo">
    <CardNumber>541333******0185</CardNumber>
    <ExpiryDate year="49" month="12" />
    <StartDate year="96" month="12" />
    <TransactionAmount currency="GBP">15.00</TransactionAmount>
    <TransactionReference>Sale</TransactionReference>
    <PreAuthTransactionReference>Sale</PreAuthTransactionReference>
    <MerchantId>2100112262</MerchantId>
    <TerminalId>210011226201</TerminalId>
    <CardScheme code="MSC" creditDebitIndicator="CREDIT">Mastercard</CardScheme>
    <CaptureMethod>Icc</CaptureMethod>
    <Dcc xsi:nil="true" />
    <Signature>
      <Format>Bitmap</Format>
    </Signature>
    <BelowSignatureLimit>false</BelowSignatureLimit>
    <CardHolderName>RDIR 03</CardHolderName>
    <BalanceOnCard xsi:nil="true" />
    <AuthorizedTransactionAmount currency="GBP">15.00</AuthorizedTransactionAmount>
    <ApplicationId>A0000000041010</ApplicationId>
    <ApplicationLabel>MasterCard</ApplicationLabel>
    <PreferredName>Mastercard</PreferredName>
    <PanSequenceNumber>00</PanSequenceNumber>
    <CvmResults>410302</CvmResults>
    <TransactionDateTime>2018-02-14T15:47:24.7174233+00:00</TransactionDateTime>
    <TransactionType>Sale</TransactionType>
    <AuthorisationResponseCode>3030</AuthorisationResponseCode>
    <IccAccreditationInfo>
      <AuthorisationRequestCryptogram>975C5CE3ED29C82B</AuthorisationRequestCryptogram>
      <ApplicationInterchangeProfile>5800</ApplicationInterchangeProfile>
      <ApplicationTransactionCounter>0003</ApplicationTransactionCounter>
      <UnpredictableNumber>68396050</UnpredictableNumber>
      <TerminalVerificationResult>420000E000</TerminalVerificationResult>
      <CryptogramTransactionType>00</CryptogramTransactionType>
      <CryptogramInformationData>40</CryptogramInformationData>
      <ApplicationResponseCryptogram>5800</ApplicationResponseCryptogram>
      <POSEntryMode1>3</POSEntryMode1>
      <POSEntryMode2>2</POSEntryMode2>
      <ApplicationUsageControl>FF00</ApplicationUsageControl>
      <ApplicationVersionNumber>0002</ApplicationVersionNumber>
      <TerminalApplicationVersionNumber>0002</TerminalApplicationVersionNumber>
      <TransactionStatusInformation>E800</TransactionStatusInformation>
      <TerminalType>22</TerminalType>
      <TerminalCapabilities>E0F8C8</TerminalCapabilities>
      <IssuerActionCodesOnline>F0E064F800</IssuerActionCodesOnline>
      <IssuerActionCodesDenial>0010880000</IssuerActionCodesDenial>
      <IssuerActionCodesDefault>F040642000</IssuerActionCodesDefault>
      <IssuerApplicationData>020000000000</IssuerApplicationData>
      <TerminalCountryCode>0826</TerminalCountryCode>
      <TerminalCurrencyNumber>0826</TerminalCurrencyNumber>
      <AuthorisationResponseCode>00</AuthorisationResponseCode>
    </IccAccreditationInfo>
  </ReceiptInfo>
  <Token>9d5ee8a6-c69d-42ae-ac5c-952c91da9736</Token>
  <TokenisedCardNumber>9946000000000150185</TokenisedCardNumber>
  <AuthorityCode>032662</AuthorityCode>
  <AuthorityMethod>Online</AuthorityMethod>
  <TfsEligible>false</TfsEligible>
  <PinEntryDeviceInfo>
    <TerminalSerialNumber>325-283-122<TerminalSerialNumber>
  <PinEntryDeviceInfo>  
</IccTransactionResponse>
<?xml version="1.0" encoding="utf-16"?>
<IccTransactionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://servebase.com/2009/06/pedframework">
  <Language>en</Language>
  <ResponseCode>Declined</ResponseCode>
  <FaultResponseCode>0</FaultResponseCode>
  <ResponseMessage>DECLINED</ResponseMessage>
  <ReceiptInfo xsi:type="IccReceiptInfo">
    <CardNumber>541333******0185</CardNumber>
    <ExpiryDate year="49" month="12" />
    <StartDate year="96" month="12" />
    <TransactionAmount currency="GBP">15.00</TransactionAmount>
    <TransactionReference>Sale</TransactionReference>
    <PreAuthTransactionReference>Sale</PreAuthTransactionReference>
    <MerchantId>2100112262</MerchantId>
    <TerminalId>210011226201</TerminalId>
    <CardScheme code="MSC" creditDebitIndicator="CREDIT">Mastercard</CardScheme>
    <CaptureMethod>Icc</CaptureMethod>
    <Dcc xsi:nil="true" />
    <Signature>
      <Format>Bitmap</Format>
    </Signature>
    <BelowSignatureLimit>false</BelowSignatureLimit>
    <CardHolderName>RDIR 03</CardHolderName>
    <BalanceOnCard xsi:nil="true" />
    <AuthorizedTransactionAmount currency="GBP">15.00</AuthorizedTransactionAmount>
    <ApplicationId>A0000000041010</ApplicationId>
    <ApplicationLabel>MasterCard</ApplicationLabel>
    <PreferredName>Mastercard</PreferredName>
    <PanSequenceNumber>00</PanSequenceNumber>
    <CvmResults>410302</CvmResults>
    <TransactionDateTime>2018-02-14T15:47:24.7174233+00:00</TransactionDateTime>
    <TransactionType>Sale</TransactionType>
    <AuthorisationResponseCode>3035</AuthorisationResponseCode>
    <IccAccreditationInfo>
      <AuthorisationRequestCryptogram>975C5CE3ED29C82B</AuthorisationRequestCryptogram>
      <ApplicationInterchangeProfile>5800</ApplicationInterchangeProfile>
      <ApplicationTransactionCounter>0003</ApplicationTransactionCounter>
      <UnpredictableNumber>68396050</UnpredictableNumber>
      <TerminalVerificationResult>420000E000</TerminalVerificationResult>
      <CryptogramTransactionType>00</CryptogramTransactionType>
      <CryptogramInformationData>40</CryptogramInformationData>
      <ApplicationResponseCryptogram>5800</ApplicationResponseCryptogram>
      <POSEntryMode1>3</POSEntryMode1>
      <POSEntryMode2>2</POSEntryMode2>
      <ApplicationUsageControl>FF00</ApplicationUsageControl>
      <ApplicationVersionNumber>0002</ApplicationVersionNumber>
      <TerminalApplicationVersionNumber>0002</TerminalApplicationVersionNumber>
      <TransactionStatusInformation>E800</TransactionStatusInformation>
      <TerminalType>22</TerminalType>
      <TerminalCapabilities>E0F8C8</TerminalCapabilities>
      <IssuerActionCodesOnline>F0E064F800</IssuerActionCodesOnline>
      <IssuerActionCodesDenial>0010880000</IssuerActionCodesDenial>
      <IssuerActionCodesDefault>F040642000</IssuerActionCodesDefault>
      <IssuerApplicationData>020000000000</IssuerApplicationData>
      <TerminalCountryCode>0826</TerminalCountryCode>
      <TerminalCurrencyNumber>0826</TerminalCurrencyNumber>
      <AuthorisationResponseCode>00</AuthorisationResponseCode>
    </IccAccreditationInfo>
  </ReceiptInfo>
  <Token>9d5ee8a6-c69d-42ae-ac5c-952c91da9736</Token>
  <TokenisedCardNumber>9946000000000150185</TokenisedCardNumber>
  <AuthorityCode>032662</AuthorityCode>
  <AuthorityMethod>Online</AuthorityMethod>
  <TfsEligible>false</TfsEligible>
</IccTransactionResponse>
<ErrorResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://servebase.com/2009/06/pedframework">
  <RequestReference>Sale</RequestReference>
  <FaultResponseCode>4001150</FaultResponseCode>
  <ResponseMessage>Couldn't find transactions for merchantId</ResponseMessage>  
</ErrorResponse>