Skip to content

Reversal

Mohamed Osman edited this page Apr 8, 2019 · 11 revisions

In order for a transaction to be reversed, it must be in an PREAUTH state and there must not be another transaction with the same transaction ID that is in a REVERSE state. If that is true, we don't create a new transaction as it has already been reversed. Next, api key is validated using the passed in secret key to make sure it exists and maps to the correct merchant. Also, the PSP test mode flag will be sent along with a reason, so the transaction mode can be validated on the PSP side. If all these checks have passed in, a new transaction is created using the same information from the transaction with the PREAUTH state but we update the state to REVERSAL and use the latest payment information by parsing PSP configuration data from the merchant.

Operations

Reverse Transaction

Using secret key, PSP test mode flag, transaction ID and a ReversalRequestModel a transaction can be captured. Returned will be generated transaction ID, amount, currency, status, and action.

Clone this wiki locally