The description (WSDL) of the service is located on the test server, which is available at https://3dsec.sberbank.ru/payment/webservices/merchant-loyalty-ws.
The request used for making a refund is autoRefund
. Upon this request, the funds for the specified order are to be returned to the payer. When a request is sent, the total refund amount gets set, consisting of the amount in money and the amount of points.
In case of full refund, the funds and bonus points are refunded in the same amounts as in payment. In case of a partial refund, the amounts are distributed according to the proportion of money and points upon payment.
The request will end with an error if the funds have not been debited for this order. Multiple refunds are available, but not exceeding the initial amount debited.
This operation can be performed provided that the merchant has the corresponding permissions in the system.
In this document, the following data type conventions are used when describing request and response parameters:
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..20 | Yes |
Refund amount, consisting of the amount in money and the amount of points. 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. |
Response parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS..3 | No |
Error code. . |
|
|
No |
. |
operations block |
|||
|
AN..512 | No |
Loyalty processing transaction identifier. . |
|
AN..512 | Yes |
Operation type, the following values are possible:
. |
|
AN..512 | No |
The identifier of the transaction in the payment gateway. . |
|
N..20 | No | Amount in points. |
|
AN..512 | Yes |
A feature of the success of the operation, the following values are possible:
. |
Request example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:loy="http://engine.paymentgate.ru/webservices/merchant/loyalty"> <soapenv:Header/> <soapenv:Body> <loy:autoRefund> <autoRefundRequest orderId="fd9788c5-702a-442b-b47b-2b9acd77a7f1" compositeRefundAmount="13500" language="ru"> </autoRefundRequest> </loy:autoRefund> </soapenv:Body> </soapenv:Envelope>
Response example:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns1:autoRefundResponse xmlns:ns1="http://engine.paymentgate.ru/webservices/merchant/loyalty"> <return errorCode="0" errorMessage="Success"> <operations xsi:type="ns3:sbrfSpasiboLoyaltyOperation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://engine.paymentgate.ru/webservices/merchant/loyalty"> <amount>1575</amount> <operation>REFUND_PAYMENT</operation> <successful>true</successful> <transactionId>1032227</transactionId> <pcId>27406579</pcId> </operations> <operations xsi:type="ns3:sbrfSpasiboLoyaltyOperation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://engine.paymentgate.ru/webservices/merchant/loyalty"> <amount>11925</amount> <operation>REFUND_AWARD</operation> <successful>true</successful> <transactionId>1032228</transactionId> <pcId>27406580</pcId> </operations> </return> </ns1:autoRefundResponse> </soap:Body> </soap:Envelope>