Инструменты страницы
Request for operation completion with the full pre-authorization amount, monetary funds, shopping cart (deposit.do)
The request used for debiting the full pre-authorized amount is deposit.do
. This operation can be performed provided that the merchant has the corresponding permissions in the system.
When orders are completed, the cart is passed in the element deposititems
.
- In the case of completing an order with a full pre-authorized amount, passing the cart data is optional.
- The operation completion amount in the cart must not exceed the pre-authorized amount of the order.
- When completing an order for an amount that differs from the amount of the pre-authorization (apart from passing the 0 value), the data about the cart of items must mandatory be passed.
- 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).
- It is prohibited to pass in the cart new items, which are missing from the original order. A check is carried out whether given item in the request 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 cart in the registration order. - The value of the
quantity
element in the cart of the completion request must not exceed the value of the same parameter in the cart of the registration order request. - The
itemAmount
element value of theitems
block must not exceed the value of the same parameter in the original order. - A passed value of the
quantity
parameter is to be checked for each line item. If the value is too large or too small, the request will fail. - All the parameters of the cart are to be checked for meeting the required format (length).
If at least one of the above conditions is not met, the order completion request is considered incorrectly formed and the payment gateway returns 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 |
---|---|---|---|
|
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 |
|
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 |
To complete the operation with the full pre-authorization amount, it is necessary to send the full amount of the order or 0. |
|
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 |
---|---|---|---|
|
N3 | Yes |
Error code. Can be missing if the result has not caused an error. |
|
|
No |
|
Error codes
Value | Description |
---|---|
0 |
The request has been processed without system errors. |
5 |
The deposit amount exceeds the amount put on hold. |
5 |
The deposit amount must be equal to zero or not less than one roble. |
5 |
Access denied. |
5 |
The user must change the password. |
6 |
Wrong order number. |
6 |
|
7 |
Payment must be in the correct state. |
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
POST request example
currency=643&language=ru&orderId=f57db9df-5885-483d-8d5e-8e592d60ec9d&amount=0
Response example
{"errorCode":"0","errorMessage":"Success"}