Skip to content

Reversal

Mohamed Osman edited this page Sep 30, 2019 · 11 revisions

For a transaction to be reversed, it must be in the PREAUTH state.

  • Secret key is used to validate the API key. Then, the API key is mapped to the correct merchant.
  • PSP test mode flag is sent to validate the transaction mode on the PSP side.

A new transaction is then created using the same information from the transaction with the PREAUTH state. The transaction state is updated to REVERSAL and the latest payment information is used by parsing the merchant PSP configuration.

Note: A transaction can't be reversed more than once.

Operations

Reverse Transaction

A transaction can be reversed by providing the following parameters in a request header:

Parameter Name Description Type Required
Secret-Key The secret API key defined for the merchants String Yes
PSP-Test-Mode A flag defining if the alias is for the PSP test mode Boolean No

URL path:

Parameter Name Description Type Required
Transaction-Id Id of the transaction that will be captured String Yes

Response body:

Parameter Name Description Type
transactionId Stash! transaction id String
amount Amount in smallest currency unit (e.g. cent) Int
currency Currency String
status SUCCESS or FAIL or PENDING String
action REVERSAL String

The Swagger documentation can be found here.

Clone this wiki locally