On This Page
Reverse an Authorized Payment
The authorization-reversal request enables you to reverse a transaction's authorized
amount. You may need to reverse an authorized payment when either you or the customer
decide to cancel a payment. Requesting an authorization-reversal requires the
requestID
from the
authorization response.Calculating the Grand Total
Include the grand total in the request by using the
purchaseTotals_grandTotalAmount
field. For information about how to calculate the grand total, see Calculating the Grand Total for Line Items.
Endpoints
Set the
apAuthReversalService_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
The authorization-reversal service responds with
one of these statuses as the
apAuthReversalReply_status
field value:- AUTH_REVERSED: The authorization is successfully reversed.
- FAILED: The authorization-reversal failed.
apAuthReversalreply_reasonCode
field value.
For more information on
reason codes, see the Reason Codes for the Simple Order
API.
Required Fields for Reversing an Authorized
Payment
Include these required fields to reverse an authorization.
- Set the field value to the request ID included in the authorization response.
- Set the field value totrue.
- Set the field value toONY.
- Set toEUR.
Simple Order API Example: Reversing an Authorized
Payment
Simple Order API
Example: Reversing an Authorized
PaymentRequest
<requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.213"> <merchantID>test_merchant</merchantID> <merchantReferenceCode>refnum-1234</merchantReferenceCode> <purchaseTotals> <currency>EUR</currency> <grandTotalAmount>220</grandTotalAmount> </purchaseTotals> <apPaymentType>ONY</apPaymentType> <apAuthReversalService run="true"> <authRequestID>6953229325326859903007</authRequestID> </apAuthReversalService> </requestMessage>
Response to a Successful Request
<replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.213"> <merchantReferenceCode>ref1695323540</merchantReferenceCode> <requestID>6953235404876719203008</requestID> <decision>ACCEPT</decision> <reasonCode>100</reasonCode> <requestToken>AxjnrwSTeO+GiOpSQiLAANgZYjWmdmbQg1aUaGojmiHA8v0h9XwMwIZNJMvRiy0P/Sbx3v0EGI7a+MYAsACd</requestToken> <purchaseTotals> <currency>EUR</currency> </purchaseTotals> <apAuthReversalReply> <reasonCode>100</reasonCode> <status>AUTH_REVERSED</status> <processorResponse>00007</processorResponse> <amount>220.00</amount> <dateTime>2023-09-21T19:12:26Z</dateTime> <paymentStatus>auth_reversed</paymentStatus> <responseCode>00007</responseCode> <reconciliationID>XFZ3YMPAURFC</reconciliationID> </apAuthReversalReply> </replyMessage>