Инструменты страницы
Request for order registration with shopping cart, Online Lending (register.do)
The request used for registering an order on payment system side is register.do
. The shopping cart is passed in the orderBundle
parameter. The registration request must meet the requirements below.
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. |
|
AN..30 | Yes |
Merchant's service account password. |
|
ANS..32 | Yes |
Number (identifier) of the order in the store system. It is unique for every store within the Payment Gateway. If the order number is generated on the Payment Gateway side, this parameter is not mandatory. |
|
N..12 | Yes |
Payment amount in minimum currency units (kopecks, cents, etc.). Must match the total amount for all line items in the shopping cart. Before summing up all line items, the product of quantity and price for each good item is rounded to an integer. If the value is followed by 5 or greater after the decimal point, it is rounded up. Below there are examples of rounding.
Therefore, the «amount» parameter value must be equal to the sum of the line items rounded. |
|
N3 | Yes |
ISO 4217 code of the payment currency. If not specified, default value is used. |
|
ANS..512 | Yes |
The URL to which the user is to be redirected in case of a successful payment (and also in case of a failed payment where the |
|
ANS..512 | No |
The address to which the user is to be redirected in case of a failed payment. The address must be specified in full including the protocol used (for example, https://test.ru instead of test.ru). Otherwise, the user will be redirected to the address of the following type: http://<payment_gateway_address>/<merchant_address>.
The parameter is optional. In this case, an unsuccessful payment will lead to a redirect to |
|
ANS..512 | No |
Description of the order in free form. To enable sending this field to the processing system, contact the technical support service. |
|
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. |
|
ANS..20 | No |
The value of this parameter defines what kind of pages of the payment interface will be loaded for the Customer. The available values are:
Where:
If the parameter is missing or its value is in incorrect format, the default value is pageView=DESKTOP. |
|
ANS..255 | No |
Identifier of the Customer in the Store system. This parameter is used for the binding functionality. May be present if the store is allowed to create bindings. Specifying this parameter when processing payments with the use of bindings is mandatory. Otherwise, a payment will be unsuccessful. |
|
AN..255 | No |
To register an order on behalf of a child Merchant, specify the Merchant login in this parameter. |
|
String | No |
Block for transferring additional parameters of the merchant. Fields of additional information for further storage are transferred in the following form.
These fields can be transferred to the bank processing for subsequent display in the registers. The inclusion of this functionality is possible by agreement with the bank during the integration period.
If sending notifications from merchant to customer is enabled, the customer's email address must be passed in this block in the The following can be passed as additional parameters:
It is forbidden to pass reserved names in the parameter (if they are passed, the order may be rejected):
|
|
N..9 | No |
Order lifetime in seconds. If the parameter is not specified, the value specified in the Merchant settings or the default value (1200 seconds = 20 minutes) will be used. If the request contains the expirationDate parameter, then the value of sessionTimeoutSecs parameter is disregarded. |
|
UTC | No |
The date and time of the order lifetime expiration. Format: yyyy-MM-ddTHH:mm:ss.
If this parameter is not passed in the request, |
|
AN..255 | No |
The identifier of the previously created binding. Can only be used if the merchant has permission to work with bindings. If this parameter is passed in the given request, it means that: |
|
N4 | No |
Attribute for enabling the test «stub». To enable test
|
|
Not applicable | Yes |
Block containg the cart of items of the order. The description of the attributes is given below. |
|
N..2 | No |
Tax system. The following values are available:
If the cart and fiscalization data are not included in the request, then the default values specified in the personal account are passed to the Fiscal Data Operator (see User Manual for personal account). |
| No |
A block with parameters required by OFD. To pass N parameters, a request must contain N «params» blocks, where the «name» attribute contains the parameter name and the value contains its value. The transfer of this block is possible only when using the following OFDs:
|
|
|
See description | No |
Customer's registration data (street address, postal code). Required for AVS/AVV checks. Mandatory if «AVS/AVV use allowed» permission is enabled for merchant |
By default, the following fields are passed to the Bank processing system:
orderNumber
– order number in the store system;description
– order description (no more than 24 characters; %, +, carriage return \r, and line feed \n cannot be used).
billingPayerData
billingPayerData block parameters
Name | Type | Mandatory | Description |
---|---|---|---|
|
AN..50 | No |
City registered for the card at the Issuer Bank. |
|
AN..50 | No |
|
|
AN..50 | No |
Address registered for the card at the Issuer Bank. Line 1. Mandatory if «AVS/AVV use allowed» permission is enabled for merchant. |
|
AN..50 | No |
Address registered for the card at the Issuer Bank. Line 2. |
|
AN..50 | No |
Address registered for the card at the Issuer Bank. Line 3. |
|
AN..50 | No |
Postal code registered for the card at the Issuer Bank. Mandatory if «AVS/AVV use allowed» permission is enabled for merchant. |
|
AN..50 | No |
State registered for the card at the Issuer Bank (ISO 3166-2). |
additionalOfdParams
additionalOfdParams
contains the following elements.
Name | Type | Mandatory | Description | FFD version |
---|---|---|---|---|
|
N..2 | Mandatory if agent_info object is passed. |
Agent type. The following values are available:
|
1.05 and later versions. |
|
|
No |
|
1.05 and later versions. |
|
|
No |
|
1.05 and later versions. |
|
Array ANS..19 | No |
Phone numbers array of the payments operator in +N format. |
1.05 and later versions. |
|
ANS..256 | No |
Money Transfer operator address. |
1.05 and later versions. |
|
N10..12 | No |
Money Transfer operator TIN. |
1.05 and later versions. |
|
ANS..64 | No |
Money Transfer operator name. |
1.05 and later versions. |
|
array ANS..19 | No |
An array of Money Transfer operator phone numbers in +N format. |
1.05 and later versions. |
|
Array ANS..19 | No |
An array of supplier phone numbers in +N format. |
1.05 and later versions. |
|
A..256 | No |
Cashier full name |
1.05 and later versions. |
|
ANS..16 | No |
Additional property of the receipt. |
1.05 and later versions. |
|
ANS..24 | No |
Name of the additional property of the user. |
1.05 and later versions. |
|
ANS..24 | No |
Value of the additional property of the user. |
1.05 and later versions. |
|
N..12 | No |
Cashier's INN |
1.2 and later versions. |
|
ANS..256 | No |
Customer address. |
1.2 and later versions. |
|
NS10 | No |
Customer birth date as dd.mm.yyyy |
1.2 and later versions. |
|
N3 | No |
Country numeric code of the county of Customer's citizenship. The country code is specified according to All-Russian World Countries Classifier (OKSM) |
1.2 and later versions. |
|
N2 | No |
Identification document type numeric code (for example, 21 stands for Russian Passport). |
1.2 and later versions. |
|
NS11 | No |
Series and number of the payer's passport: |
1.2 and later versions. |
|
ANS..64 | No |
Customer's email address. Exactly one of the two fields must be passed: |
1.2 and later versions. |
|
NS..19 | No |
Customer's phone number. Must be passed with the country code without spaces and additional characters (except for + character). For example, the number «+371 2 1234567» should be passed as «+37121234567»). Exactly one of the two fields must be passed: |
1.2 and later versions. |
|
N12 | No |
INN of the buyer. |
1.2 and later versions. |
|
ANS..256 | No |
Customer name. |
1.2 and later versions. |
|
|
No |
|
1.2 and later versions. |
|
|
No |
|
1.2 and later versions. |
|
|
No |
|
1.2 and later versions. |
|
|
No |
|
1.2 and later versions. |
|
NS10 | No |
Date of the legislative act of the federal body of executive power that sets forth the requirements for assigning the value of «sectoral attribute». Format: |
1.2 and later versions. |
|
ANS | No |
Identifier of federal body of executive power. Must be one of the values from directory of federal bodies of executive power |
1.2 and later versions. |
|
N..32 | No |
Number of the legislative act of the federal body of executive power that sets forth the requirements for assigning the value of «sectoral attribute». |
1.2 and later versions. |
|
ANS..256 | No |
A set of values defined by the legislative act of the federal body of executive power. |
1.2 and later versions. |
orderBundle
orderBundle
contains the following elements.
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS..21 | No |
Order creation date in the format YYYY-MM-DDTHH:MM:SS. |
|
Not applicable | No |
Block containing attributes with data about the customer. The description of the attributes is given below. |
|
Not applicable | Yes |
Block with the attributes of the items in the cart. The description of the attributes is given below. |
|
No longer relevant | Conditional Mandatory when providing the buyer with the possibility Online Lending |
Section where parameters of the type of online credit granting are specified. The description is given below. |
installments
Parameters of the installments
section
Name | Type | Mandatory | Description |
---|---|---|---|
|
A..11 | Yes |
Sign of buying on credit. The following values are available:
|
|
ANS..12 | Yes |
Use the value |
|
ANS…255 | No |
Desired loan term in months. Multiple comma separated values can be passed. The attribute is passed if
|
customerDetails
A parameter included in a block and indicated as mandatory is only mandatory within that block. If the block itself is not mandatory and is not passed, its included parameters should not be passed.
customerDetails
contains the following elements.
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS..40 | No |
Customer's email address, to which the receipt will be sent. Most OFDs support delivery of receipt only to one email address. Some OFDs allow receipt delivery to multiple emails. In this case, the emails should be separated by commas without spaces. Contact your OFD for availability of receipt delivery to multiple emails. It is mandatory to pass one of the two parameters: email or phone. |
|
NS..12 | No |
Customer's phone number. It can be of the following format:
If the number is passed in a separate parameter and in additional parameters, the number specified in this |
|
ANS..40 | No |
Customer's preferred way of communication. |
|
ANS..100 | No |
Payer's first name, last name, and patronymic. |
|
ANS..100 | No |
The series and number of the payer's passport in the following format: |
|
N..12 | No |
Taxpayer identification number. From 10 to 12 digits can be passed. |
|
|
No |
deliveryInfo
A parameter included in a block and indicated as mandatory is only mandatory within that block. If the block itself is not mandatory and is not passed, its included parameters should not be passed.
deliveryInfo
contains the following elements.
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS..20 | No |
Delivery method. |
|
A..2 | Yes |
The two-letter country code for the delivery country. |
|
ANS..40 | Yes |
Delivery city. |
|
ANS..255 | Yes |
Delivery address. |
cartItems
A parameter included in a block and indicated as mandatory is only mandatory within that block. If the block itself is not mandatory and is not passed, its included parameters should not be passed.
cartItems
contains the following elements.
Name | Type | Mandatory | Description |
---|---|---|---|
|
Not applicable | Yes |
Array of blocks describing line items in the cart. Information about every line item in the cart is passed in a separate block that is included in items. Do not use «‘)«character combination inside this section, or it will cause an error on the gateway side. |
items
items« contains the following elements.
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS..12 | Yes |
Unique identifier of a line item within the order cart. |
Name
TypeANS..100 DescriptionRESTName or the description of an item in any format.
Use REST Online LendingFor Online Lending functionality, it's necessary to specify a description of the line item in accordance with the Yandex.Market catalog, subject to the following requirements:
WSName or the description of an item in any format.
Use WS Online LendingFor online crediting functionality it's necessary to specify a description of the good item in accordance with the Yandex.Market. |
ANS..100 | Yes |
For Online Lending functionality, it's necessary to specify a description of the line item in accordance with the Yandex.Market catalog, subject to the following requirements:
|
|
Not applicable | No |
Additional block containing the parameters describing a line item. The description of the attributes is given below. |
|
N..18 | Yes |
Element describing the total of items of one |
|
N..18 | Conditional Mandatory when providing the customer with the possibility of Online Lending. |
The sum of the cost of all line items of one When calculating itemAmount = itemPrice*quantity parameter, the result is rounded up to the second digit after the decimal point. For example, if the calculation result is 100.255, then final value will be 100.26. If all the items in the request are delivered without payment (a gift to customer), the value 0 should be passed. |
|
N..18 | Yes |
The cost of one line item in minimum currency units. Mandatory for merchants using fiscalization.
If the item is delivered without payment (a gift to customer), the value 0 should be passed. |
|
N3 | Conditional Mandatory when providing the customer with the possibility of Online Lending. |
Currency code of a line item according to ISO 4217. If the parameter is not specified, it is considered to be equal to the order currency. |
|
ANS..100 | Yes |
Number (identifier) of a line item in the store system. |
|
Not applicable | Yes – for fiscalization |
An additional tag with attributes describing the tax. Nested tags are described below. |
|
See description. | Yes |
Tag that serves to pass a set of attributes of the line item. Attributes must be specified as follows.
|
==== quantity ====
A parameter included in a block and indicated as mandatory is only mandatory within that block. If the block itself is not mandatory and is not passed, its included parameters should not be passed.
quantity contains the following elements.
Name | Type | Mandatory | Description |
---|---|---|---|
|
N..18 | Yes |
Quantity of line items in given |
|
ANS..20 | Yes |
The unit of measurement for the quantity of line item instances. |
==== itemDetails ====
A parameter included in a block and indicated as mandatory is only mandatory within that block. If the block itself is not mandatory and is not passed, its included parameters should not be passed.
'itemDetails contains the following elements.
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS..255 | Conditional. Mandatory when providing the buyer with the possibility Online Lending |
Additional information on a line item. The parameter represents an array of blocks each of which contains information on a certain characteristic of the line item. |
itemDetailsParams
A parameter included in a block and indicated as mandatory is only mandatory within that block. If the block itself is not mandatory and is not passed, its included parameters should not be passed.
'itemDetailsParams contains the following elements.
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS..255 | Conditional. Mandatory if itemDetailsParams parameter is present. |
Additional information on a line item. |
Name
TypeAN..255 Type2ANS..255 DescriptionRESTName of the parameter describing the details of a line item WSName of the parameter describing the details of a line item |
ANS..255 | Conditional. Mandatory if itemDetailsParams parameter is present. |
Name of the parameter describing the details of a line item |
Given below are the parameters of tax block.
A parameter included in a block and indicated as mandatory is only mandatory within that block. If the block itself is not mandatory and is not passed, its included parameters should not be passed.
Name | Type | Mandatory | Description |
---|---|---|---|
|
N..2 | Yes |
VAT rate. The following values are available:
If the cart and fiscalization data are not included in the request, then the default values specified in the personal account are passed to the Fiscal Data Operator (see User Manual for personal account). |
|
N..18 | Yes |
Amount of the tax calculated by the merchant. The amount is specified in minimum currency units |
Given below are the parameters of itemAttributes block. The itemAttributes'' parameter must contain the attributes array, and this array contains the attributes of the line item (see the example and the table below).
«itemAttributes»:{«attributes»:[{«name»:«paymentMethod»,»value«:«1»},{«name»:«paymentObject»,»value«:«1»}]}
Name | Type | Mandatory | Description | FFD version |
---|---|---|---|---|
|
N..2 | Yes |
Payment type. Possible values:
| 1.05 and later versions. |
|
N..2 | Yes |
Type of item being paid for. Possible values:
| 1.05 and later versions. |
|
ANS | No |
Trade item code in text representation. Maximum length – 32 bytes. | 1.05 and later versions. |
|
ANS..64 | No |
Value of user details. May be transferred only after approval by Federal Tax Service. | 1.05 and later versions. |
|
| Mandatory if agent_info object is passed. |
Agent type. The following values are available:
| 1.05 and later versions. |
|
|
No |
|
1.05 and later versions. |
|
|
No |
|
1.05 and later versions. |
|
Array ANS..19 | No |
Phone numbers array of the payments operator in +N format. | 1.05 and later versions. |
|
array ANS..19 | No |
An array of Money Transfer operator phone numbers in +N format. | 1.05 and later versions. |
|
ANS..64 | No |
Money Transfer operator name. | 1.05 and later versions. |
|
ANS..256 | No |
Money Transfer operator address. | 1.05 and later versions. |
|
N10..12 | No |
Money Transfer operator TIN. | 1.05 and later versions. |
|
Array ANS..19 | No |
An array of supplier phone numbers in +N format. POST method must be used for passing this parameter. Example: «supplier_info.phones»: «+79123456789, +79123456790, +79123456791, +79123456792, +79123456793, +79123456794» | 1.05 and later versions. |
|
ANS..256 | No |
Supplier name. | 1.05 and later versions. |
|
N10..12 | No |
Supplier TIN. | 1.05 and later versions. |
Response parameters
The response parameters are given in table below.
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS36 | No |
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. |
|
AN..512 | No |
Payment form URL to redirect the client's browser to. This parameter is not returned if the registration of the order was not successful due to the error described in To be able to accept payment in this way, you must have the respective rights in the system. If in doubt, contact technical support. |
|
ANS..3 | No |
Error code. Can be missing if the result has not caused an error. |
|
|
No |
|
Error codes
Error code | Error text |
---|---|
1 |
An order with this number has already been processed. |
1 |
Wrong order number. |
3 |
Unknown currency. |
4 |
Order number is empty |
4 |
Merchant name cannot be empty. |
4 |
The amount is missing. |
4 |
Empty return URL |
4 |
Password cannot be empty. |
5 |
A parameter value has been specified incorrectly. |
5 |
Access denied. |
5 |
The user is inactive. |
7 |
System error. |
8 |
A mandatory parameter of theCart is missing . |
8 |
|
8 |
The currency of the cart does not match the currency of the order. |
8 |
Incorrect format of the cart. |
8 |
|
Examples
POST request example
amount=3200000¤cy=643&language=ru&password=testPwd&returnUrl=http://yoursite.com&userName=username&description=INSTALLMENT с несколькими сроками кредита&orderBundle={"cartItems":{"items":[ "itemAmount":"3000000", "itemCode":"123", "itemCurrency":"643", "itemDetails":{}, "itemPrice":"3000000", "name":"carrotsbox", "positionId":"Первая", "quantity":{"measure":"kg", "value":1 } }, "itemAmount":"100000", "itemCode":"456", "itemCurrency":"643", "itemDetails":{}, "itemPrice":"50000", "name":"applesbox1", "positionId":"Second", "quantity":{"measure":"шт.", "value":2 } }, "itemAmount":"100000", "itemCode":"789", "itemCurrency":"643", "itemDetails":{}, "itemPrice":"100000", "name":"applesbox2", "positionId":"Третья", "quantity":{"measure":"шт.", "value":1 } } ] }, "customerDetails":{"contact":"NatalieBianko", "deliveryInfo":{"city":"Moscow", "country":"RU", "deliveryType":"courier", "postAddress":"Delivery address, 1"}, "email":"email@mail.com", "phone":"%2B1234567"}, "installments":{"productID":"12", "productType":"INSTALLMENT","rightTerms":[24,5]}, "orderCreationDate":"2019-02-04T13:51:00"}&jsonParams={"backToShopUrl":"https://www.google.com/","backToShopName":"Назад в гугл", "CMS":"Joomla"}&dummy=true
Пример ответа
{ "errorCode": 0, "errorMessage": null, "formUrl": "https://3dsec.sberbank.ru/payment/789/payment_ru.html?mdOrder=8f556e30-7298-7067-83f0-603c0009e855&language=ru&dummy=true", "orderId": "8f556e30-7298-7067-83f0-603c0009e855" }