Refund

Refund

The Refund method issues a credit card refund to a customer.

Arguments

Name Type Description
Credentials MerchantCredentials A MerchantCredentials object used to authenticate against Merchantware.
PaymentData PaymentData A PaymentData object containing the payment 
Request RefundRequest A RefundRequest object containing the transactional data used to perform a refund.

Response

A TransactionResponse45 object is returned.

Allowed Payment Data Sources

Reader, Keyed, PreviousTransaction

Notes

Credit refunds can be partial and are specified by the amount parameter.
The lookup can be performed either by invoice number or token. They cannot both be blank. If both are presented, token is used.

This method issues a refund to a credit or debit card from a prior sale transaction. While it is possible to set a custom amount, this method is limited to the original amount of the sale transaction by default. It is possible to enable an override on a per account basis so that refunds for higher than the original amount can be made. No on-hand credit card information is required to use this method.

For example, with a prior sale for $10.00, you may reuse the token from that sale transaction to issue refunds up until the original total has been met, whether all at once ($10.00) or over several transactions ($5.00, $3.00, $2.00). Unless the account has had refunds for higher than the original amount enabled.

This method is useful in cases where you need to return money to a credit card and you have already batched the original sale. Using this method allows you to better support your customers without having to store card data.

On the other hand, if the original sale has not been batched yet, it is better to void the sale to return money or undo a transaction, as this will prevent activity at the processor and thus avoid incurring transaction fees.
 

Example Keyed SOAP Request

Sample Request Packet (raw)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   <soap:Body>
      <Refund xmlns="http://schemas.merchantwarehouse.com/merchantware/v45/">
         <Credentials>
            <MerchantName>Zero Inc</MerchantName>
            <MerchantSiteId>00000000</MerchantSiteId>
            <MerchantKey>00000-00000-00000-00000-00000</MerchantKey>
         </Credentials>
         <PaymentData>
            <Source>Keyed</Source>
            
            <!--Keyed Fields-->
            <CardNumber>4012000033330026</CardNumber>
            <ExpirationDate>1218</ExpirationDate>
            <CardHolder>John Doe</CardHolder>
            <!-- AVS and CVV values are not checked as part of a Refund transaction-->
         </PaymentData>
         <Request>
            <Amount>4.01</Amount>
            <InvoiceNumber>1701</InvoiceNumber>
            <RegisterNumber>35</RegisterNumber>
            <MerchantTransactionId>165901</MerchantTransactionId>
            <CardAcceptorTerminalId>3</CardAcceptorTerminalId>
         </Request>
      </Refund>
   </soap:Body>
</soap:Envelope>
Sample Return Packet
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <RefundResponse xmlns="http://schemas.merchantwarehouse.com/merchantware/v45/">
         <RefundResult>
            <ApprovalStatus>APPROVED</ApprovalStatus>
            <Token>608963</Token>
            <AuthorizationCode/>
            <TransactionDate>3/14/2016 8:12:50 PM</TransactionDate>
            <Amount>4.01</Amount>
            <RemainingCardBalance/>
            <CardNumber>************0026</CardNumber>
            <Cardholder>John Doe</Cardholder>
            <CardType>4</CardType>
            <FsaCard/>
            <ReaderEntryMode>1</ReaderEntryMode>
            <AvsResponse/>
            <CvResponse/>
            <ErrorMessage/>
            <ExtraData/>
            <Rfmiq>10000ABCDE</Rfmiq>
         </RefundResult>
      </RefundResponse>
   </soap:Body>
</soap:Envelope>

Example Encrypted Keyed SOAP Request

Sample Request Packet (raw)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   <soap:Body>
      <Refund xmlns="http://schemas.merchantwarehouse.com/merchantware/v45/">
         <Credentials>
            <MerchantName>Zero Inc</MerchantName>
            <MerchantSiteId>00000000</MerchantSiteId>
            <MerchantKey>00000-00000-00000-00000-00000</MerchantKey>
         </Credentials>
         <PaymentData>
            <Source>Keyed</Source>
            
            <!--Keyed Fields-->
            <CardNumber>4012000033330026</CardNumber>
            <ExpirationDate>1218</ExpirationDate>
            <CardHolder>John Doe</CardHolder>
            <EncryptedKeyedData>02B600C037001C101692;4012********0026=1812:***?*126=09876543210=FDB4CAC2FAF2483D4A68A4195273CFEAB03EDFC6819AD552631AAC0E9A47C4A63B14D241942C38F2A07CAFF696AE6387211133EC62994900580004600216713B03</EncrptedKeyedData>
            <!-- AVS and CVV values are not checked as part of a Refund transaction-->
         </PaymentData>
         <Request>
            <Amount>4.01</Amount>
            <InvoiceNumber>1701</InvoiceNumber>
            <RegisterNumber>35</RegisterNumber>
            <MerchantTransactionId>165901</MerchantTransactionId>
            <CardAcceptorTerminalId>3</CardAcceptorTerminalId>
         </Request>
      </Refund>
   </soap:Body>
</soap:Envelope>
Sample Return Packet
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <RefundResponse xmlns="http://schemas.merchantwarehouse.com/merchantware/v45/">
         <RefundResult>
            <ApprovalStatus>APPROVED</ApprovalStatus>
            <Token>608963</Token>
            <AuthorizationCode/>
            <TransactionDate>3/14/2016 8:12:50 PM</TransactionDate>
            <Amount>4.01</Amount>
            <RemainingCardBalance/>
            <CardNumber>************0026</CardNumber>
            <Cardholder>John Doe</Cardholder>
            <CardType>4</CardType>
            <FsaCard/>
            <ReaderEntryMode>1</ReaderEntryMode>
            <AvsResponse/>
            <CvResponse/>
            <ErrorMessage/>
            <ExtraData/>
            <Rfmiq>10000ABCDE</Rfmiq>
         </RefundResult>
      </RefundResponse>
   </soap:Body>
</soap:Envelope>

Example Previous Transaction SOAP Request

Sample Request Packet (raw)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   <soap:Body>
      <Refund xmlns="http://schemas.merchantwarehouse.com/merchantware/v45/">
         <Credentials>
            <MerchantName>Zero Inc</MerchantName>
            <MerchantSiteId>00000000</MerchantSiteId>
            <MerchantKey>00000-00000-00000-00000-00000</MerchantKey>
         </Credentials>
         <PaymentData>
            <Source>PreviousTransaction</Source>
            
            <!--Previous Transaction Field-->
            <Token>608957</Token>
         </PaymentData>
         <Request>
            <InvoiceNumber>1703</InvoiceNumber>
            <RegisterNumber>35</RegisterNumber>
            <MerchantTransactionId>165902</MerchantTransactionId>
            <CardAcceptorTerminalId>3</CardAcceptorTerminalId>
         </Request>
      </Refund>
   </soap:Body>
</soap:Envelope>

Sample Return Packet
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <RefundResponse xmlns="http://schemas.merchantwarehouse.com/merchantware/v45/">
         <RefundResult>
            <ApprovalStatus>APPROVED</ApprovalStatus>
            <Token>608964</Token>
            <AuthorizationCode>OK775C</AuthorizationCode>
            <TransactionDate>3/14/2016 8:13:13 PM</TransactionDate>
            <Amount/>
            <RemainingCardBalance/>
            <CardNumber/>
            <Cardholder/>
            <CardType>4</CardType>
            <FsaCard/>
            <ReaderEntryMode>1</ReaderEntryMode>
            <AvsResponse/>
            <CvResponse/>
            <ErrorMessage/>
            <ExtraData/>
            <Rfmiq>10000ABCDE</Rfmiq>
         </RefundResult>
      </RefundResponse>
   </soap:Body>
</soap:Envelope>

Example Swiped Reader SOAP Request

Sample Request Packet (raw)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   <soap:Body>
      <Refund xmlns="http://schemas.merchantwarehouse.com/merchantware/v45/">
         <Credentials>
            <MerchantName>Zero Inc</MerchantName>
            <MerchantSiteId>00000000</MerchantSiteId>
            <MerchantKey>00000-00000-00000-00000-00000</MerchantKey>
         </Credentials>
         <PaymentData>
            <Source>READER</Source>
            
            <!--Reader Fields-->
            <TrackData>%B4012000033330026^TEST CARD/GENIUS^181210054321000000000000000 150 A?;4012000033330026=18121011000012345678?</TrackData>
         </PaymentData>
         <Request>
            <Amount>1.48</Amount>
            <InvoiceNumber>3141</InvoiceNumber>
            <RegisterNumber>35</RegisterNumber>
            <MerchantTransactionId>215003</MerchantTransactionId>
            <CardAcceptorTerminalId>3</CardAcceptorTerminalId>
         </Request>
      </Refund>
   </soap:Body>
</soap:Envelope>

Sample Return Packet
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <RefundResponse xmlns="http://schemas.merchantwarehouse.com/merchantware/v45/">
         <RefundResult>
            <ApprovalStatus>APPROVED</ApprovalStatus>
            <Token>608967</Token>
            <AuthorizationCode/>
            <TransactionDate>3/14/2016 8:15:59 PM</TransactionDate>
            <Amount>1.48</Amount>
            <RemainingCardBalance/>
            <CardNumber>************0026</CardNumber>
            <Cardholder>TEST CARD/GENIUS</Cardholder>
            <CardType>4</CardType>
            <FsaCard/>
            <ReaderEntryMode>2</ReaderEntryMode>
            <AvsResponse/>
            <CvResponse/>
            <ErrorMessage/>
            <ExtraData/>
            <Rfmiq>10000ABCDE</Rfmiq>
         </RefundResult>
      </RefundResponse>
   </soap:Body>
</soap:Envelope>

Example Vault SOAP Request

Sample Request Packet (raw)
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   <soap:Body>
      <Refund xmlns="http://schemas.merchantwarehouse.com/merchantware/v45/">
         <Credentials>
            <MerchantName>Zero Inc</MerchantName>
            <MerchantSiteId>00000000</MerchantSiteId>
            <MerchantKey>00000-00000-00000-00000-00000</MerchantKey>
         </Credentials>
         <PaymentData>
            <Source>Vault</Source>
            
            <!--Vault Fields-->
            <VaultToken>22222222</VaultToken>
         </PaymentData>
         <Request>
            <Amount>1.83</Amount>
            <CashbackAmount>0.00</CashbackAmount>
            <SurchargeAmount>0.00</SurchargeAmount>
            <TaxAmount>0.00</TaxAmount>
            <InvoiceNumber>1559</InvoiceNumber>
            <Amount>1.83</Amount>
            <PurchaseOrderNumber>17809</PurchaseOrderNumber>
            <CustomerCode>23</CustomerCode>
            <RegisterNumber>35</RegisterNumber>
            <MerchantTransactionId>166909</MerchantTransactionId>
            <CardAcceptorTerminalId>3</CardAcceptorTerminalId
            <EnablePartialAuthorization>False</EnablePartialAuthorization>
            <ForceDuplicate>False</ForceDuplicate>
         </Request>
      </Refund>
   </soap:Body>
</soap:Envelope>
Sample Return Packet
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <RefundResponse xmlns="http://schemas.merchantwarehouse.com/merchantware/v45/">
         <RefundResult>
            <ApprovalStatus>APPROVED</ApprovalStatus>
            <Token>822621046</Token>
            <AuthorizationCode>OK9999</AuthorizationCode>
            <TransactionDate>9/5/2017 5:46:30 PM</TransactionDate>
            <Amount>1.83</Amount>
            <RemainingCardBalance/>
            <CardNumber>************0026</CardNumber>
            <Cardholder>Test</Cardholder>
            <CardType>3</CardType>
            <FsaCard>False</FsaCard>
            <ReaderEntryMode>1</ReaderEntryMode>
            <AvsResponse/>
            <CvResponse/>
            <ErrorMessage/>
            <ExtraData/>
            <Rfmiq>100GQ4B22C</Rfmiq>
            <DebitTraceNumber/>
         </RefundResult>
      </RefundResponse>
   </soap:Body>
</soap:Envelope>