Refund Transaction

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

Refund Overview

The purpose of a refund transaction is to credit a transaction amount to the cardholder's account.

985

How to process a Refund IccTransactionRequest message

The merchant's system sends a Refund IccTransactionRequest message to ANYpay POS which interacts with the PED. The transaction is downgraded to 'swiped' by ANYpay POS which returns an authorization response to the merchant's system.

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

📘

Key elements of an IccTransactionRequest message

AuthorizationConnectionType MUST be set to [OnlineAuthorization]
TransactionType MUST be set to [Refund]

An example of a Refund IccTransactionRequest message can be seen below.

<?xml version="1.0" encoding="utf-16"?>
<IccTransactionRequest 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>
  <PedEndpointAddress>
    <EndpointAddressType>Serial</EndpointAddressType>
    <SerialEndpointAddress><ComPort>COM1</ComPort>
      <BaudRate>115200</BaudRate>
      <SerialPortParity>None</SerialPortParity>
      <DataBits>8</DataBits>
      <SerialPortStopBits>One</SerialPortStopBits
      <SerialPortHandshake>None</SerialPortHandshake>
    </SerialEndpointAddress>
  </PedEndpointAddress>          
  <AuthorizationConnectionType>OnlineAuthorization</AuthorizationConnectionType>
  <TransactionAmount currency="GBP">20.00</TransactionAmount>
  <TransactionReference>Refund</TransactionReference>
  <TransactionDateTime>2018-02-07T16:20:16.3964394+00:00</TransactionDateTime>
  <TransactionType>Refund<TransactionType>
</IccTransactionRequest>

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 Refund IccTransactionRequest 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>Approved</ResponseCode>
  <FaultResponseCode>0</FaultResponseCode>
  <ResponseMessage>Transaction Approved</ResponseMessage>
  <ReceiptInfo xsi:type="IccReceiptInfo">
    <CardNumber>541333******0185</CardNumber>
    <ExpiryDate year="49" month="12" />
    <TransactionAmount currency="GBP">15.00</TransactionAmount>
    <TransactionReference>Refund</TransactionReference>
    <PreAuthTransactionReference>Refund</PreAuthTransactionReference>
    <MerchantId>2100112262</MerchantId>
    <TerminalId>210011226201</TerminalId>
    <CardScheme code="MSC" creditDebitIndicator="CREDIT">Mastercard</CardScheme>
    <CaptureMethod>Swiped</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>
    <TransactionDateTime>2018-02-14T17:08:44.7720907+00:00</TransactionDateTime>
    <TransactionType>Refund</TransactionType>
    <AuthorisationResponseCode>3030</AuthorisationResponseCode>
  </ReceiptInfo>
  <Token>cf72a0c6-f797-4377-a178-f9a0b1cf654f</Token>
  <TokenisedCardNumber>9946000000000150185</TokenisedCardNumber>
  <AuthorityCode>224126</AuthorityCode>
  <AuthorityMethod>Pseudo</AuthorityMethod>
  <TfsEligible>false</TfsEligible>
  <PedInfo>
    <SerialNumber>325-283-122</SerialNumber>
  </PedInfo>
</IccTransactionResponse>