FILTER BY TAG

Refund a Payment

You can refund a completed payment for the full amount or a partial amount by sending a refund request. Twint supports multiple refund requests when the total amount of all of the refund requests is less than the captured amount.
Requesting a refund requires the request ID from the sale response. The request ID is located in the
requestID
response field.

Endpoints

Set the
apRefundService_run
field to
true
, and send the request to one of these endpoints:
Production:
https://ics2ws.ic3.com/commerce/1.x/transactionProcessor
Test:
https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor

Response Statuses

Cybersource
responds to your refund request with one of these statuses as the
apRefundReply_status
field value:
  • FAILED
    : The refund request failed.
  • REFUNDED
    : The refund request is accepted but is not completed. Request the check status service to retrieve status updates. For more information, see Check a Transaction Status.
The refund service also responds with a reason code as the
apRefundReply_reasonCode
field value.
For more information about reason codes, see Reason Codes and Response Codes.
When you send a check status request to retrieve an updated refund status, these are the possible responses:
  • FAILED
    : The refund request failed.
  • REFUNDED
    : The settled payment is successfully refunded.

Required Fields for Refunding a Payment

Example: Refunding a Payment

Request
<requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.215"> <merchantID>test_merchant</merchantID> <merchantReferenceCode>refnum-1234</merchantReferenceCode> <purchaseTotals> <currency>CHF</currency> <grandTotalAmount>220.00</grandTotalAmount> </purchaseTotals> <apPaymentType>TWN</apPaymentType> <apRefundService run="true"> <refundRequestID>6953229557336619903008</refundRequestID> </apRefundService> </requestMessage>
Response to a Successful Request
<replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.215"> <merchantReferenceCode>refnum-1234</merchantReferenceCode> <requestID>6953231301306139703011</requestID> <decision>ACCEPT</decision> <reasonCode>100</reasonCode> <requestToken>AxjnrwSTeO939L1XjnbjANgZYjWmdqbQhOJDNsojmiG+pv0h9XwMwIZNJMvRiy0P/Sbx3uHfMaEAQD4A8Q9I</requestToken> <purchaseTotals> <currency>CHF</currency> </purchaseTotals> <apRefundReply> <reasonCode>100</reasonCode> <transactionID>315778574151</transactionID> <status>REFUNDED</status> <processorResponse>00006</processorResponse> <amount>220.00</amount> <dateTime>2023-09-21T19:05:32Z</dateTime> <reconciliationID>XFZ3ZMPB8H36</reconciliationID> <returnRef>XFZ40MPBIPMM</returnRef> <paymentStatus>refunded</paymentStatus> <responseCode>00006</responseCode> </apRefundReply> </replyMessage>