Инструменты страницы



Request for order payment reversal (reverse.do)

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.

Orders that initiate recurring payments cannot be reversed and refunded, as in these cases there is no real debiting.


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.

When making a partial reversal (reversal of a part of the payment), the amount of the partial reversal is passed in the optional parameter amount. Partial reversal is possible if the store has the respective permission in the system. Partial reversal is not possible for orders with fiscalization, shopping cart and loyalty.

In this document, the following data type conventions are used when describing request and response parameters:

  • A<n> – a sequence of Latin letters of length <n>;
  • A..<n> – a sequence of Latin letters with a length not exceeding <n>;
  • N<n> – a sequence of digits of length <n>;
  • N..<n> – a sequence of digits with a length not exceeding <n>;
  • AN<n> – a sequence of Latin letters and numbers of fixed length <n>;
  • AN.. <n> – a sequence of Latin letters and numbers with a length not exceeding <n>;
  • ANS<n> – a sequence of Latin letters, numbers and characters of fixed length <n>
  • ANS.. <n> – a sequence of Latin letters, numbers and characters with a length not exceeding <n>;
  • UTC – date and time, in this case: the date must be passed without specifying the time zone, Moscow time, for the SOAP protocol, the standard encoding xs: dateTime is used.

Request parameters

The request parameters are given in table below.

Name Type Mandatory Description

userName

AN..30

Yes

Login of the service account of the merchant. If login and password are used for authentication during token registration, then the token parameter does not need to be passed.

password

AN..30

Yes

Merchant's service account password. If login and password are used for authentication during token registration, then the token parameter does not need to be passed.

amount

N..12

No

Partial reversal amount. Parameter required for partial reversal.

orderId

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.

jsonParams

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):

  • sbrf_spasibo:amount_bonus
  • sbrf_sbermiles:amount_bonus
  • loyaltyId

language

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.

Response parameters

The response parameters are given in table below.

Name Type Mandatory Description

errorCode

N3

No

Error code. Can be missing if the result has not caused an error.

errorMessage

AN..512

No

Error description in the language passed in the language parameter in the request.

Error codes

Error code Error text
0

The request has been processed without system errors.

5

Access denied.

5

The user must change the password.

5

[orderId] is empty.

5

Unsuccessful.

6

Wrong order number.

6

Unregistered orderId.

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.

Examples

POST request example

language=ru&orderId=9231a838-ac68-4a3e-bddb-d9781433d852

Response example

{"errorCode":"0","errorMessage":"Success"}