The request used for cancelling an order payment is reverse.do
. The reversal function is available for a limited time after payment, the exact terms must be specified in Sberbank.
The reversal operation can be executed only once. If it ends with an error, then subsequent payment reversal operation will not work. This functionality is available for Merchants only upon agreement with the Bank. To execute a reversal operation, a Merchant needs to have the corresponding permissions.
In this document, the following data type conventions are used when describing request and response parameters:
The request parameters are given in table below.
Name | Type | Mandatory | Description |
---|---|---|---|
|
AN..30 | Yes |
Login of the service account of the merchant. |
|
AN..30 | Yes |
Merchant's service account password. |
|
ANS36 | Yes |
Identifier of the order in the payment system. It is unique within the system. Missing if order registration failed due to an error detailed in ErrorCode. |
|
String | No |
Additional parameters of the request. Format: {«Name1»: «Value1», «Name2»: «Value2»}. It is forbidden to pass reserved names in the parameter (if they are passed, the order may be rejected):
|
|
A2 | No |
Language in the ISO 639-1 encoding. If the language is not specified, the default language defined in the store settings is used. |
The response parameters are given in table below.
Name | Type | Mandatory | Description |
---|---|---|---|
|
N3 | No |
Error code. Can be missing if the result has not caused an error. |
|
|
No |
|
Error code | Error text |
---|---|
0 |
The request has been processed without system errors. |
5 |
Access denied. |
5 |
The user must change the password. |
5 |
|
5 |
Unsuccessful. |
6 |
Wrong order number. |
6 |
Unregistered |
7 |
Invalid operation for the current order status. |
7 |
System error. |
7 |
Reversal is impossible because of incorrect internal parameter values. The holding and deposit amounts must be equal for the transaction after the funds are unblocked. |
7 |
Transaction is being processed now. Please try again later. |
7 |
Reversal is impossible because of incorrect internal parameter values. Check the amount put on hold and the deposit amount. |
7 |
Reversal is impossible because of incorrect internal parameter values. The chargeback flag is set for this payment. |
7 | This payment type does not support reversal. |
7 | The order is in an incorrect state |
language=ru&orderId=9231a838-ac68-4a3e-bddb-d9781433d852
{"errorCode":"0","errorMessage":"Success"}