The request used for making a refund is refund.do
.
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.
To carry out a refund operation, it is necessary to have the corresponding permissions in the system.
In this document, the following data type conventions are used when describing request and response parameters:
The request parameters are given in table below.
Name | Type | Mandatory | Description |
---|---|---|---|
|
AN..30 | Yes |
Login of the service account of the merchant. |
|
AN..30 | Yes |
Merchant's service account password. |
|
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..12 | Yes |
The refund amount in minimum currency units. |
|
Not applicable |
Block containg the cart of items of the order. The description of the attributes is given below. |
|
|
String | Yes |
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):
|
The response parameters are given in table below.
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS..3 | No |
Error code. Can be missing if the result has not caused an error. |
|
|
No |
|
Error code | Error text |
---|---|
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 |
Invalid refund amount (less than one ruble). |
7 |
System error. |
amount=500¤cy=643&language=ru&orderId=ORDER_NUMBER&jsonParams={"phone":"79268936532"}& orderBundle={ "cartItems": { "items": [ { "positionId": "1", "name": "Siemens WS12T460OE", "itemDetails": {}, "quantity": { "value": 1, "measure": "pcs" }, "itemAmount": 8000000, "itemCode": "78864","itemPrice":"8000000" }, { "positionId": "2", "name": "Service – Delivery", "itemDetails": { }, "quantity": { "value": 1, "measure": "pcs" }, "itemAmount": 1000000, "itemCode": "0000","itemPrice": "1000000" }, { "positionId": "3", "name": "Delivery", "itemDetails": { }, "quantity": { "value": 1, "measure": "pcs" },"itemAmount": 1000000, "itemCode": "0000", "itemPrice": "1000000" }] } }&installments={"productID":"10","productType":"INSTALLMENT"}}
{"errorCode":0}