ScenarioBen buys a mechanical keyboard from CoolTechGear.com. After he finishes
checking out, he realizes he bought the exact model last week, and cancels the
order minutes later. Because the authorization has not been captured yet,
CoolTechGear.com is able to reverse the authorization.
Steps
-
Retrieve the
transactionIdfrom the previous transaction you need to reverse. This is how we link the reversal to its previous transaction.Reversal mutations differ from the other transaction mutations (i.e., captures, incremental authorizations, and refunds) in that you must reference the previous transaction’stransactionIdinstead of thepaymentId. This is becausetransactionIdtargets the specific transaction in the payment life cycle to be reversed, whereaspaymentIdidentifies the cohort of related transactions within a payment. -
Run the reverseTransaction mutation, passing in the pertinent inputs
Required input Description transactionIdThe unique “payment ID” returned on the original, approved authorization, used to tie that transaction together with this incremental authorization. acceptorIDThe unique, 36 character identifier assigned to the entity providing the goods or services to the cardholder. Other processors may refer to this as the Merchant ID (MID), Outlet ID, or Customer number. transactionReferenceThe unique transaction identifier created by YOU to distiniguish this transaction from another. transactionAmountDetailsThe transaction currency and amount to be refunded. You can refund the full amount or only a portion of it. If you do not specify an amount, Tesouro will by default refund the full amount.