-
Notifications
You must be signed in to change notification settings - Fork 0
Reversal
Doruk Coskun edited this page Jul 11, 2019
·
11 revisions
In order for a transaction to be reversed, it must be in the PREAUTH
state.
- The secret key is used to validate the API key. Then, the API key is mapped to the correct merchant.
- The 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.
The 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.