The method used for making a refund is autoRefund.do
. The request contains the total amount of the refund, 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 |
---|---|---|---|
|
AN..30 | Yes | Login issued to the Store upon integration with the Payment Gateway. |
|
AN..30 | Yes | Password issued to the Store upon integration with the Payment Gateway. |
|
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. |
|
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 | Yes |
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..12 | No | Amount in points. |
|
AN..512 | Yes |
A feature of the success of the operation, the following values are possible:
. |
Request example:
https://3dsec.sberbank.ru/payment/rest/autoRefund.do?userName=login&password=password&orderId=62945d2e-3da5-42cf-b9c1-d456227ab51a&compositeRefundAmount=100000
Response example:
{"operations":[{"pcId":2699144,"operation":"REFUND_PAYMENT","amount":1960,"successful":true,"transactionId":"1652"}, {"pcId":2699145,"operation":"REFUND_AWARD","amount":98040,"successful":true,"transactionId":"1653"}],"errorCode":"0"}