ScenarioBen makes a purchase from Maple Street Coffee, one of Clearpath Payment’s acceptors. After he finishes checking out, he realizes he already bought the same item last week and cancels the order minutes later. Because the authorization has not been captured yet, Clearpath Payments is able to reverse the authorization on behalf of Maple Street Coffee.
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