-
Notifications
You must be signed in to change notification settings - Fork 0
Reversal
Afifa Bakiz edited this page May 21, 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: It is not possible to reverse a transaction twice.
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 | Payment SDK transaction id | String |
amount | Amount in smallest currency unit (e.g. cent) | Int |
currency | Currency | String |
status | SUCCESS or FAIL | String |
action | REVERSAL | String |
The Swagger documentation can be found here.