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



Request for order payment reversal (reverseOrder)

The request used for cancelling an order payment is reverseOrder. The reversal function is available for a limited time after payment, the exact terms must be specified in Sberbank.

Use the following URL to connect to the Test Service (WSDL):
https://3dsec.sberbank.ru/payment/webservices/merchant-ws?wsdl.

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.

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

orderId

ANS36

Yes

Identifier of the order in the payment system. It is unique within the system. The identifier is missing if the order registration failed due to an error detailed in errorCode.

language

A2

No

Language code in accordance with ISO 639-1. If this parameter is not specified, it is considered that the language is Russian. An error message will be returned in this language.

Response parameters

The response parameters are given in table below.

Name Type Mandatory Description

errorCode

N3

No

Error code.

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.

7

Invalid operation for the current order status.

7

System error.

7 Reversal is impossible because of incorrect internal parameter values. Hold amount and deposit amoint must be equal for the refund operation
7 Transaction is being processed now. Please try again later
7 The order is in an incorrect state
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.

Examples

Request example

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mer="http://engine.paymentgate.ru/webservices/merchant">
    <soapenv:Header/>
    <soapenv:Body>
       <mer:reverseOrder>
          <order language="ru" orderId="f88a2bbf-2021-4ccc-8783-8a13068a89f9">
             <!-- Zero or more repetitions: -->
             <params name="param1" value="paramValue1"/>
          </order>
       </mer:reverseOrder>
    </soapenv:Body>
 </soapenv:Envelope>

Response example

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
       <ns1:reverseOrderResponse xmlns:ns1="http://engine.paymentgate.ru/webservices/merchant">
          <return errorCode="7" errorMessage="Invalid operation for the current order status"/>
       </ns1:reverseOrderResponse>
    </soap:Body>
 </soap:Envelope>