Token Transaction

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

Token Transaction Overview

A token transaction enables a merchant to process a Sale or PreAuthorization transaction using an existing TokenisedCardNumber without invoking the PIN Entry Device.

985

How to process a TokenTransactionRequest message

The merchant's system sends a TokenTransactionRequest message to ANYpay POS in order to process a Customer Present (Keyed) Sale or PreAuthorization transaction using an existing TokenizedCardNumber

๐Ÿ“˜

Key elements of a TokenTransactionRequest message

AuthorizationConnectionType can ONLY be set to [OnlineAuthorization] or [OfflineAuthorization]
TransactionType can ONLY be set to [Sale] or [PreAuthorization], all other transaction types will be rejected
TokenisedCardNumber MUST be set to an existing PXP TokenisedCardNumber

๐Ÿ“˜

Key elements of a TokenTransactionRequest message for Stored Credential Transactions

CardSchemeReference Merchants must retain and supply the Card Scheme Reference when processing Merchant Initiated Transactions of type 'Initial' and 'Subsequent' Recurring'.
InitialTransactionReference Initial Transaction Reference is required to link the transaction to the initial transaction.
CardOnfileIndicator This is to indicate how the cardholder authorises a merchant to store the cardholder's payment details. Refer to complex types under ANYPay POS in the API Reference.
MerchantInitiatedTransactionIndicator A merchant-initiated transaction is a payment that is taken on an agreed upon date with the payer's consent, and is initiated by the merchant collecting the payment. If a transaction is merchant initiated. Refer to complex types under ANYPay POS in the API Reference.

<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<TokenTransactionRequest 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>
  <AuthorizationConnectionType>OnlineAuthorization</AuthorizationConnectionType>
  <TransactionAmount currency="GBP">20.00</TransactionAmount>
  <TransactionReference>Sale</TransactionReference>
  <TransactionDateTime>2018-02-07T16:20:16.3964394+00:00</TransactionDateTime>
  <TransactionType>Sale</TransactionType>    
  <TokenisedCardNumber>9959000000002881111</TokenisedCardNumber>
  <ExpiryDate year="25" month="12" />
</TokenTransactionRequest>
<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<TokenTransactionRequest 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>
  <AuthorizationConnectionType>OnlineAuthorization</AuthorizationConnectionType>
  <TransactionAmount currency="GBP">20.00</TransactionAmount>
  <TransactionReference>Sale</TransactionReference>
  <TransactionDateTime>2018-02-07T16:20:16.3964394+00:00</TransactionDateTime>
  <TransactionType>Sale</TransactionType>    
  <TokenisedCardNumber>9959000000002881111</TokenisedCardNumber>
  <ExpiryDate year="25" month="12" />
  <StoredCredential>
    <CardOnfileIndicator>CardholderInitiatedCardOnFile</CardOnfileIndicator>
    <MerchantInitiatedTransactionIndicator>Reauthorization</MerchantInitiatedTransactionIndicator>
    <InitialTransactionReference>Sale</InitialTransactionReference>
    <cardSchemeReference>GP193370000073A1</cardSchemeReference>
  </StoredCredential>
</TokenTransactionRequest>

Handling an IccTransactionResponse message

Section IccTransactionResponse Element describes the elements that are returned in an IccTransactionResponse message.

๐Ÿ“˜

Key elements of a IccTransactionResponse for a TokenTransactionRequest

CaptureMethod will be set to [Keyed]

An example of an IccTransactionResponse message for a TokenTransactionRequest 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">
  <ResponseCode>Authorised</ResponseCode>
  <FaultResponseCode>0</FaultResponseCode>
  <ResponseMessage>APPROVAL</ResponseMessage>
  <ReceiptInfo xsi:type="IccReceiptInfo">
    <CardNumber>444433******1111</CardNumber>
    <ExpiryDate year="25" month="12" />
    <TransactionAmount currency="GBP">15.00</TransactionAmount>
    <TransactionReference>Sale</TransactionReference>
    <PreAuthTransactionReference>Sale</PreAuthTransactionReference>
    <MerchantId>2100112262</MerchantId>
    <TerminalId>210011226201</TerminalId>
    <CardScheme code="VIS" creditDebitIndicator="CREDIT">Visa</CardScheme>
    <CaptureMethod>Keyed</CaptureMethod>
    <Dcc xsi:nil="true" />
    <Signature>
      <Format>Bitmap</Format>
    </Signature>
    <BelowSignatureLimit>true</BelowSignatureLimit>
    <BalanceOnCard xsi:nil="true" />
    <AuthorizedTransactionAmount currency="GBP">15.00</AuthorizedTransactionAmount>
    <TransactionDateTime>2018-02-15T10:04:23.4631903+00:00</TransactionDateTime>
    <TransactionType>Sale</TransactionType>
    <AuthorisationResponseCode />
  </ReceiptInfo>
  <Token>e38d6ac8-bd55-419c-adef-8e41fcd84f81</Token>
  <TokenisedCardNumber>9959000000002881111</TokenisedCardNumber>
  <AuthorityCode>123465</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">
  <ResponseCode>Authorised</ResponseCode>
  <FaultResponseCode>0</FaultResponseCode>
  <ResponseMessage>APPROVAL</ResponseMessage>
  <ReceiptInfo xsi:type="IccReceiptInfo">
    <CardNumber>444433******1111</CardNumber>
    <ExpiryDate year="25" month="12" />
    <TransactionAmount currency="GBP">15.00</TransactionAmount>
    <TransactionReference>PreAuthorization</TransactionReference>
    <PreAuthTransactionReference>PreAuthorization</PreAuthTransactionReference>
    <MerchantId>2100112262</MerchantId>
    <TerminalId>210011226201</TerminalId>
    <CardScheme code="VIS" creditDebitIndicator="CREDIT">Visa</CardScheme>
    <CaptureMethod>Keyed</CaptureMethod>
    <Dcc xsi:nil="true" />
    <Signature>
      <Format>Bitmap</Format>
    </Signature>
    <BelowSignatureLimit>true</BelowSignatureLimit>
    <BalanceOnCard xsi:nil="true" />
    <AuthorizedTransactionAmount currency="GBP">15.00</AuthorizedTransactionAmount>
    <TransactionDateTime>2018-02-15T10:04:23.4631903+00:00</TransactionDateTime>
    <TransactionType>PreAuthorization</TransactionType>
    <AuthorisationResponseCode />
  </ReceiptInfo>
  <Token>e38d6ac8-bd55-419c-adef-8e41fcd84f81</Token>
  <TokenisedCardNumber>9959000000002881111</TokenisedCardNumber>
  <AuthorityCode>123465</AuthorityCode>
  <AuthorityMethod>Online</AuthorityMethod>
  <TfsEligible>false</TfsEligible>
</IccTransactionResponse>