TopUp Transaction

In this section you will learn how to process a TopUp transaction

TopUp Overview

If the final amount of the transaction is likely to exceed the amount of the PreAuthorization, a top-up can be done. A top-up transaction increments the original preAuthorization amount and requests authorization of the incremented amount. A merchant may process one or more top-up transactions or none at all.

How to process a TokenTopupRequest message

The merchant's system sends a TokenTopupRequest message to ANYpay POS that contains the tokenized card number returned in the response to the original pre-authorization request, the original transaction reference for the PreAuthorization in the PreAuthTransactionReference field to link the TopUp to the original PreAuthorization and the merchant's own unique transaction reference is required for the TopUp

Section TokenTopupRequest Element describes the elements required to build an TokenTopupRequest message. An example of a TokenTopupRequest message can be seen below.

📘

Key elements of a TokenTopUpRequest message

PreAuthTransactionReference Must match the Transaction Reference used in the associated PreAuthorization transaction

An example of a TokenTopupRequest message can be seen below.

<?xml version="1.0" encoding="utf-16"?>
<TokenTopupRequest 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>
  <TransactionAmount currency="GBP">10.00</TransactionAmount
  <TokenisedCardNumber>9946000000000150185</TokenisedCardNumber>
  <TransactionReference>TopUp</TransactionReference> 
  <PreAuthTransactionReference>PreAuthorization</PreAuthTransactionReference></TokenTopupRequest>

Handling an IccTransactionResponse message

Section IccTransactionResponse Element describes the elements that are returned in an IccTransactionResponse message. An example of an IccTransactionResponse message for a TokenTopupRequest 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>Authorised</ResponseCode>
  <FaultResponseCode>0</FaultResponseCode>
  <ResponseMessage>APPROVAL</ResponseMessage>
  <ReceiptInfo xsi:type="IccReceiptInfo">
    <CardNumber>541333******0185</CardNumber>
    <ExpiryDate year="49" month="12" />
    <StartDate year="96" month="12" />
    <TransactionAmount currency="GBP">5.00</TransactionAmount>
    <TransactionReference>TopUp</TransactionReference>
    <PreAuthTransactionReference>PreAuthorization</PreAuthTransactionReference>
    <MerchantId>2100112262</MerchantId>
    <TerminalId>210011226201</TerminalId>
    <CardScheme code="MSC" creditDebitIndicator="CREDIT">Mastercard</CardScheme>
    <CaptureMethod>MailOrder</CaptureMethod>
    <Dcc xsi:nil="true" />
    <BelowSignatureLimit>false</BelowSignatureLimit>
    <BalanceOnCard xsi:nil="true" />
    <AuthorizedTransactionAmount currency="GBP">5.00</AuthorizedTransactionAmount>
    <ApplicationId />
    <PanSequenceNumber>00</PanSequenceNumber>
    <TransactionDateTime>2018-02-14T17:01:04.7682699+00:00</TransactionDateTime>
    <TransactionType>TopUp</TransactionType>
    <AuthorisationResponseCode />
    <IccAccreditationInfo>
      <CryptogramTransactionType>00</CryptogramTransactionType>
      <CryptogramInformationData>00</CryptogramInformationData>
      <TerminalType>00</TerminalType>
    </IccAccreditationInfo>
  </ReceiptInfo>
  <Token>4c4053c7-b4e1-42d8-b476-051669621205</Token>
  <TokenisedCardNumber>9946000000000150185</TokenisedCardNumber>
  <AuthorityCode>032721</AuthorityCode>
  <AuthorityMethod>Online</AuthorityMethod>
  <TfsEligible>false</TfsEligible>
</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">5.00</TransactionAmount>
    <TransactionReference>TopUp</TransactionReference>
    <PreAuthTransactionReference>PreAuthorization</PreAuthTransactionReference>
    <MerchantId>2100112262</MerchantId>
    <TerminalId>210011226201</TerminalId>
    <CardScheme code="MSC" creditDebitIndicator="CREDIT">Mastercard</CardScheme>
    <CaptureMethod>MailOrder</CaptureMethod>
    <Dcc xsi:nil="true" />
    <BelowSignatureLimit>false</BelowSignatureLimit>
    <BalanceOnCard xsi:nil="true" />
    <AuthorizedTransactionAmount currency="GBP">5.00</AuthorizedTransactionAmount>
    <ApplicationId />
    <PanSequenceNumber>00</PanSequenceNumber>
    <TransactionDateTime>2018-02-14T17:01:04.7682699+00:00</TransactionDateTime>
    <TransactionType>TopUp</TransactionType>
    <AuthorisationResponseCode />
    <IccAccreditationInfo>
      <CryptogramTransactionType>00</CryptogramTransactionType>
      <CryptogramInformationData>00</CryptogramInformationData>
      <TerminalType>00</TerminalType>
    </IccAccreditationInfo>
  </ReceiptInfo>
  <Token>4c4053c7-b4e1-42d8-b476-051669621205</Token>
  <TokenisedCardNumber>9946000000000150185</TokenisedCardNumber>
  <AuthorityCode xsi:nil="true" />
  <AuthorityMethod>Online</AuthorityMethod>
  <TfsEligible>false</TfsEligible>
</IccTransactionResponse>