Инструменты страницы
Request for declining an unpaid order (decline.do)
The request used for declining an incomplete order is decline.do
. After successful execution of this request, the order is transferred to the Reversed state.
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 |
---|---|---|---|
|
AN..30 | Yes |
Login of the service account of the merchant. If login and password are used for authentication during token registration, then the |
|
AN..30 | Yes |
Merchant's service account password. If login and password are used for authentication during token registration, then the |
|
ANS..255 | No |
Specify the merchant name for which you want to decline the order. This can be either the main merchant's username or the child merchant's username. |
|
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. |
|
ANS36 | orderId or orderNumber must be specified |
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. |
|
ANS..32 | orderId or orderNumber must be specified |
Order number in the store system. |
Response parameters
The response parameters are given in table below.
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS..3 | Yes |
Error code. Can be missing if the result has not caused an error. |
|
|
Yes |
|
|
|
No |
|
Error codes
Error code | Error text |
---|---|
8 | The order is in a status that is not suitable for this action |
8 | The current user does not have access to the specified order |
8 | The merchant does not have access to the specified order or the order does not exist |
8 | Order parameters [orderNumber] or [orderId] not set |
8 | User does not have permission to decline orders |
Examples
POST request example
https://server_and_context/rest/decline.do?userName=username&password=password&orderId=8cf0409e-857e-7f95-8ab1-b6810009d884&merchantLogin=merch_test418&language=ru&orderNumber=12345678
Пример ответа
{"errorCode":"0","errorMessage":"Success"}