Инструменты страницы
Request for refund in full amount in monetary funds, shopping cart (refundOrder)
The request used for a full refund is refundOrder
. Upon this request, the funds for the specified order are to be returned to the payer. The request will end with an error if the funds have not been debited for this order.
This operation in available for the users who have the corresponding permissions in the system.
Use the following URL to connect to the Test Service (WSDL):
https://3dsec.sberbank.ru/payment/webservices/merchant-ws?wsdl.
In a refund request, the cart is specified in the refundItems
block.
- In case of a full refund, passing the cart of items data is optional.
- When making a refund for an amount that differs from the amount that has been charged (except for passing the «0» value), the data about the cart of items must be mandatory passed.
- In case of making several refunds for orders with carts, all of those refunds must be performed using the algorithm for making a refund with the cart data passed.
- The refund amount (in money) in the cart must not exceed the confirmed amount of the original order (for
autoRefund
requests, the composite sums of money and points are compared). - Prices of all the items in the cart must be specified in the same currency (if the currency of items is to be specified) and must match the currency of the original order. For Sberbank «Spasibo» the order currency must be Russian rubles (643-RUB).
- Line items missing in the original order are forbidden for passing in the cart. A check is carried out whether given item in the refund cart is present in the original order. The
positionId
,name
, anditemCode
must match. If at least one value does not coincide, it is considered that the line item is missing from the original order. - The value of
quantity
elements in the completion request cart must not exceed the value of the same parameter in the registration order cart. - The
itemAmount
parameter value of theitems
block must not exceed the value of the same parameter in the original order. ForautoRefund
request the system compares the value ofitemAmount
initems
block with the amount of money and points for the same position in the original order. - All cart parameters are checked for compliance with the required format (length).
If at least one of the above conditions is not met, the order refund request is considered to be incorrectly generated and the payment gateway must refund an error.
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
Name | Type | Mandatory | Description |
---|---|---|---|
|
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. |
|
N..12 | Yes |
The refund amount in the order currency. The amount can be equal to or less than the order remaining amount. |
|
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. |
|
Data block for transferring additional parameters of the OFD | Yes |
Some parameters of The transfer of this block is possible only when using the following OFDs:
|
additionalOfdParams
additionalOfdParams
contains the following elements.
Name | Type | Mandatory | Description | FFD version |
---|---|---|---|---|
|
N..2 | Mandatory if agent_info object is passed. |
Agent type. The following values are available:
|
1.05 and later versions. |
|
|
No |
|
1.05 and later versions. |
|
|
No |
|
1.05 and later versions. |
|
Array ANS..19 | No |
Phone numbers array of the payments operator in +N format. |
1.05 and later versions. |
|
ANS..256 | No |
Money Transfer operator address. |
1.05 and later versions. |
|
N10..12 | No |
Money Transfer operator TIN. |
1.05 and later versions. |
|
ANS..64 | No |
Money Transfer operator name. |
1.05 and later versions. |
|
array ANS..19 | No |
An array of Money Transfer operator phone numbers in +N format. |
1.05 and later versions. |
|
Array ANS..19 | No |
An array of supplier phone numbers in +N format. |
1.05 and later versions. |
|
A..256 | No |
Full name of the cashier When requesting a refund, the value of this parameter may differ from that given during the registration of the order. |
1.05 and later versions. |
|
ANS..16 | No |
Additional check details. When requesting a refund, the value of this parameter may differ from that given during the registration of the order. |
1.05 and later versions. |
|
ANS..24 | No |
Name of the additional property of the user. When requesting a refund, the value of this parameter may differ from that given during the registration of the order. |
1.05 and later versions. |
|
ANS..24 | No |
The value of the additional user attribute. When requesting a refund, the value of this parameter may differ from that given during the registration of the order. |
1.05 and later versions. |
|
N..12 | No |
Cashier's INN |
1.2 and later versions. |
|
ANS..256 | No |
Customer address. |
1.2 and later versions. |
|
NS10 | No |
Customer birth date as dd.mm.yyyy |
1.2 and later versions. |
|
N3 | No |
Country numeric code of the county of Customer's citizenship. The country code is specified according to All-Russian World Countries Classifier (OKSM) |
1.2 and later versions. |
|
N2 | No |
Identification document type numeric code (for example, 21 stands for Russian Passport). |
1.2 and later versions. |
|
NS11 | No |
Series and number of the payer's passport: |
1.2 and later versions. |
|
ANS..64 | No |
Customer's email address. Exactly one of the two fields must be passed: |
1.2 and later versions. |
|
NS..19 | No |
Customer's phone number. Must be passed with the country code without spaces and additional characters (except for + character). For example, the number «+371 2 1234567» should be passed as «+37121234567»). Exactly one of the two fields must be passed: |
1.2 and later versions. |
|
N12 | No |
INN of the buyer. |
1.2 and later versions. |
|
ANS..256 | No |
Customer name. |
1.2 and later versions. |
|
|
No |
|
1.2 and later versions. |
|
|
No |
|
1.2 and later versions. |
|
|
No |
|
1.2 and later versions. |
|
|
No |
|
1.2 and later versions. |
|
NS10 | No |
Date of the legislative act of the federal body of executive power that sets forth the requirements for assigning the value of «sectoral attribute». Format: |
1.2 and later versions. |
|
ANS | No |
Identifier of federal body of executive power. Must be one of the values from directory of federal bodies of executive power |
1.2 and later versions. |
|
N..32 | No |
Number of the legislative act of the federal body of executive power that sets forth the requirements for assigning the value of «sectoral attribute». |
1.2 and later versions. |
|
ANS..256 | No |
A set of values defined by the legislative act of the federal body of executive power. |
1.2 and later versions. |
Response parameters
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS..3 | No |
Error code. |
|
|
No |
|
Error codes
Value | Description |
---|---|
0 |
The request has been processed without system errors. |
5 |
Access denied. |
5 |
The user must change the password. |
5 |
|
5 |
Incorrect amount. |
6 |
Wrong order number. |
7 |
Payment must be in the correct state. |
7 |
The refund amount exceeds the debited amount. |
7 |
System error. |
8 |
Specified completion amount does not match the full amount of the order. The cart data is mandatory to complete the operation with a partial pre-authorization amount. |
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:refundOrder> <order language="ru" orderId="48b6acc0-4d08-7207-a398-cb140128092a" refundAmount="23500"> </order> </mer:refundOrder> </soapenv:Body> </soapenv:Envelope>
Пример ответа
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns1:refundOrderResponse xmlns:ns1="http://engine.paymentgate.ru/webservices/merchant"> <return errorCode="0" errorMessage="Successful"/> </ns1:refundOrderResponse> </soap:Body> </soap:Envelope>