The request used for registering an order on payment system side is register.do
.
Requests for registration of an order (with- and without pre-authorization) pass the cart data in the orderBundle
parameter.
quantity
parameter is to be checked for each line item. If the value is too large or too small, the request will result in an error.If at least one of the above conditions is not met, the order is considered incorrectly generated and the payment gateway returns an error.
In this document, the following data type conventions are used when describing request and response parameters:
The request parameters are given in table below.
If the cart and fiscalization data are not passed in the request, the default values specified in the personal account are passed to the Fiscal Data Operator (see setting up fiscalization data for more details).
Name | Type | Mandatory | Description | FFD version |
---|---|---|---|---|
|
AN..30 | Yes |
Login of the service account of the merchant. If login and password are used for authentication during token registration, then the |
All versions. |
|
AN..30 | Yes |
Merchant's service account password. If login and password are used for authentication during token registration, then the |
All versions. |
|
AN..30 | See description |
A value that is used to authenticate the merchant when sending requests to the payment gateway. When passing this parameter, the parameters To get the public key, contact technical support. |
All versions. |
|
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. |
All versions. |
|
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. |
All versions. |
|
N3 | No |
ISO 4217 code of the payment currency. If not specified, default value is used. |
All versions. |
|
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 |
All versions. |
|
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 |
All versions. |
|
ANS..512 | No |
Description of the order in free form. To enable sending this field to the processing system, contact the technical support service. |
All versions. |
|
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. |
All versions. |
|
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. |
All versions. |
|
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. |
All versions. |
|
ANS..255 | No |
To register an order on behalf of a child Merchant, specify the Merchant login in this parameter. |
All versions. |
|
String | No |
Additional parameters of the request. Format: {«Name1»: «Value1», «Name2»: «Value2»}. In the app2app and back2app payment scenario, the following parameters are also passed (see the table below). It is forbidden to pass reserved names in the parameter (if they are passed, the order may be rejected):
|
All versions. |
|
N..10 | 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. |
All versions. |
|
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, |
All versions. |
|
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: |
All versions. |
|
Data block for transferring additional parameters of the OFD | No |
Some parameters of The transfer of this block is possible only when using the following OFDs:
| |
|
Not applicable | Yes |
Block containg the cart of items of the order. The description of the attributes is given below. |
All versions. |
|
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). |
All versions. |
|
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 |
All versions. |
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).
Name | Type | Required | Description |
---|---|---|---|
|
Boolean | No |
Attribute indicating the payment method through the SBOL application (app2app). The following values are available:
To use this parameter, the merchant must have the corresponding permission enabled. |
|
ANS..32 | See description |
OS type. The possible values are:
Required only if |
|
ANS..255 | See description |
Link to the merchant's application for a return with successful payment.
Required only if |
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). |
orderBundle
contains the following elements.
Name | Type | Mandatory | Description | FFD version |
---|---|---|---|---|
|
ANS..21 | No |
Order creation date in the format YYYY-MM-DDTHH:MM:SS. |
All versions. |
|
Not applicable | No |
Block containing attributes with data about the customer. The description of the attributes is given below. |
All versions. |
|
Not applicable | Yes |
Block with the attributes of the items in the cart. The description of the attributes is given below. |
All versions. |
customerDetails
contains the following elements.
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS..40 | No |
Customer's preferred way of communication. |
|
ANS..40 | Yes |
Customer's email address, to which the receipt will be sent.
It is mandatory to pass one of the two parameters: |
|
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
When using ATOL fiscalization, the |
|
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. |
|
see description | No |
Block containing the attributes of the delivery address. The description of the attributes is given below. |
Operator of Fiscal Data requires that either email
or phone
must be sent. If these parameters are not passed in the request, the data specified in the fiscalization setting of the personal account are passed to the Operator of Fiscal Data instead (for more details, see the instructions for working with the personal account).
delivery_info
contains the following elements.
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS..40 | Yes, if the delivery_info block is passed |
Delivery city. |
|
A..2 | Yes, if the delivery_info block is passed |
Delivery country. |
|
ANS..20 | No |
The type of delivery. |
|
ANS..255 | Yes, if the delivery_info block is passed |
Delivery address. |
A parameter included in a block and indicated as mandatory is only mandatory within that block. If the section is optional and missing, then the parameters included in it should not be passed.
cartItems
contains the following elements.
A parameter included in a block and indicated as mandatory is only mandatory within that block. If the section is optional and missing, then the parameters included in it should not be passed.
Name | Type | Mandatory | Description | FFD version |
---|---|---|---|---|
|
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. |
All versions. |
items
contains the following elements.
A parameter included in a block and indicated as mandatory is only mandatory within that block. If the section is optional and missing, then the parameters included in it should not be passed.
Name | Type | Mandatory | Description | FFD version |
---|---|---|---|---|
|
ANS..12 | Yes |
Unique identifier of a line item within the order cart. |
All versions. |
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 |
Name or the description of an item in any format.
Use |
All versions. |
|
Not applicable | No |
Additional block containing the parameters describing a line item. The description of the attributes is given below. The field size limit is 1024 bytes. |
All versions. |
|
N..18 | Yes |
Element describing the total of items of one |
All versions. |
|
N..12 | No |
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. |
All versions. |
|
N3 | No |
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. |
All versions. |
|
ANS..100 | Yes |
Number (identifier) of a line item in the store system. |
All versions. |
|
Not applicable | Only for stores with enabled fiscalization settings |
An additional tag with attributes describing the tax. Nested tags are described below. |
All versions. |
|
N..18 | Only for stores with enabled fiscalization settings |
The cost of one line item in minimum currency units. Mandatory for merchants using fiscalization.
|
All versions. |
|
See description. | Only for stores with enabled fiscalization settings |
Block containing the attributes of the item. See description below. |
1.05 and later versions. |
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:
Values are passed in the following priority (indicated in descending order of priority):
For paymentMethod, the default value is 1 (full prepayment before the transfer of the payment item). |
1.05 and later versions. |
|
N..2 |
Yes |
Type of item being paid for. Possible values:
Values are passed in the following priority (indicated in descending order of priority):
The default value for paymentObject is 1 (item). |
1.05 and later versions. |
|
ANS | yes (if markQuantity is passed) |
Trade item code in text representation. Maximum length – 32 bytes. |
1.05 and later versions. |
|
| No |
Fractional quantity of the labeled item. |
1.2 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. |
|
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. |
|
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. |
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. |
quantity
contains the following elements.
A parameter included in a block and indicated as mandatory is only mandatory within that block. If the section is optional and missing, then the parameters included in it should not be passed.
Name | Type | Mandatory | Description | FFD version |
---|---|---|---|---|
|
N..18 | Yes |
Quantity of line items in given |
All versions. |
|
ANS..20 | Yes |
The unit of measurement for the quantity of line item instances. |
All versions. |
If the FFD is version 1.2 or later, then the following parameters are passed here:
Name | Type | Mandatory | Description | FFD version |
---|---|---|---|---|
|
N1 | Yes |
Quantity of line items in given |
1.2 and later versions. |
|
N..3 | Yes |
Unit of measurement for the quantity of the payment subject. In case of FFD version 1.2+, if the 'nomenclature' and 'markQuantity' parameters are passed, the value is always 0. In other cases, it can have some value. below |
1.2 and later versions. |
Possible values of measure
Value | Description |
---|---|
0 | Used for payment subjects that can be sold individually or in units (as well as in the event that the payment subject is a product subject to mandatory labeling with an identification tool (which can be known from mark_code being passed)) |
10 | Gram |
11 | Kilogram |
12 | Ton |
20 | Centimeter |
21 | Decimeter |
22 | Meter |
30 | Square centimeter |
31 | Square decimeter |
32 | Square meter |
40 | Milliliter |
41 | Liter |
42 | Cubic meter |
50 | Kilowatt hour |
51 | Gigacalorie |
70 | Day (24h) |
71 | Hour |
72 | Minute |
73 | Second |
80 | Kilobyte |
81 | Megabyte |
82 | Gigabyte |
83 | Terabyte |
255 | Applicable when using other units of measurement |
Parameters of markQuantity tag:
A parameter included in a tag and indicated as mandatory is only mandatory within that tag. If the tag itself is not mandatory and is not passed, its included parameters should not be passed.
Name | Type | Mandatory | Description |
---|---|---|---|
|
N..12 | yes |
The numerator of the fractional part of the payment subject. |
|
N..12 | yes |
The denominator of the fractional part of the payment subject. |
itemDetails
contains the following elements.
A parameter included in a block and indicated as mandatory is only mandatory within that block. If the section is optional and missing, then the parameters included in it should not be passed.
Name | Type | Mandatory | Description | FFD version |
---|---|---|---|---|
|
ANS..255 | Yes |
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. |
All versions. |
itemDetailsParams
contains the following elements.
A parameter included in a block and indicated as mandatory is only mandatory within that block. If the section is optional and missing, then the parameters included in it should not be passed.
Name | Type | Mandatory | Description | FFD version |
---|---|---|---|---|
|
ANS..255 | Conditional. Mandatory if itemDetailsParams parameter is present. |
Additional information on a line item. |
All versions. |
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 |
AN..255 | Conditional. Mandatory if itemDetailsParams parameter is present. |
Name of the parameter describing the details of a line item |
All versions. |
tax
contains the following elements.
Name | Type | Mandatory | Description | FFD version |
---|---|---|---|---|
|
N..2 | No |
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). |
All versions. |
|
N..18 | No |
Amount of the tax calculated by the merchant. The amount is specified in minimum currency units |
All versions. |
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. |
The response parameters are given in table below.
Name | Type | Mandatory | Description | FFD version |
---|---|---|---|---|
|
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. |
All versions. |
|
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. |
All versions. |
|
ANS..3 | No |
Error code. Can be missing if the result has not caused an error. |
All versions. |
|
|
No |
|
All versions. |
Error code | Error text |
---|---|
0 |
The request has been processed without system errors. |
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 |
Access denied. |
5 |
The user is inactive. |
7 |
System error. |
8 |
|
8 |
Additional parameter |
8 |
|
amount=47000&returnUrl=http://kzntest.ru/&failUrl=https://ya.ru/&password=testPwd&userName=username-api&orderBundle={"customerDetails":{"phone":"%2B79888888877","inn":"516974792202","passport":"4507 443564"},"cartItems":{"items":[{"positionId":1,"name":"По-аджарски \"Лодочка\" SMALL","quantity":{"value":"1","measure":"0"},"itemCode":"270_235.00","itemPrice":23500,"tax":{"taxType":0,"taxSum":0},"itemAttributes":{"attributes":[{"name":"nomenclature","value":"010463003407001221CMK45BrhN0WLf"},{"name":"paymentMethod","value":"1"},{"name":"paymentObject","value":"30"},{"name":"agent_info.type","value":"7"},{"name":"agent_info.paying.operation","value":"test operation"},{"name":"agent_info.paying.phones","value":"%2B79161234123"},{"name":"agent_info.paymentsOperator.phones","value":"%2B79161234456"},{"name":"agent_info.MTOperator.phones","value":"%2B79161234789"},{"name":"agent_info.MTOperator.name","value":"MT operator"},{"name":"agent_info.MTOperator.address","value":"Moscow"},{"name":"agent_info.MTOperator.inn","value":"8634330204"},{"name":"supplier_info.phones","value":"%2B79161234333"},{"name":"supplier_info.name","value":"Supplier"},{"name":"supplier_info.inn","value":"287381373424"},{"name":"excise","value":"10.0"},{"name":"country_code","value":"810"},{"name":"declaration_number","value":"12332234533"},{"name":"userData","value":"user data"},{"name":"markQuantity.numerator","value":"1"},{"name":"markQuantity.denominator","value":"2"},{"name":"sectoralItemProps[0].federalId","value":"001"},{"name":"sectoralItemProps[0].date","value":"10.10.2021"},{"name":"sectoralItemProps[0].number","value":"123/4567"},{"name":"sectoralItemProps[0].value","value":"value1"},{"name":"sectoralItemProps[1].federalId","value":"003"},{"name":"sectoralItemProps[1].date","value":"11.10.2021"},{"name":"sectoralItemProps[1].number","value":"321/4567"},{"name":"sectoralItemProps[1].value","value":"value2"}]}},{"positionId":2,"name":"Пирожок","quantity":{"value":"1","measure":"0"},"itemCode":"270_235.00","itemPrice":23500,"tax":{"taxType":0,"taxSum":0},"itemAttributes":{"attributes":[{"name":"nomenclature","value":"010463003407001221CMK45BrhN0WLf"},{"name":"paymentMethod","value":"1"},{"name":"paymentObject","value":"30"},{"name":"agent_info.type","value":"7"},{"name":"agent_info.paying.operation","value":"test operation"},{"name":"agent_info.paying.phones","value":"%2B79161234123"},{"name":"agent_info.paymentsOperator.phones","value":"%2B79161234456"},{"name":"agent_info.MTOperator.phones","value":"%2B79161234789"},{"name":"agent_info.MTOperator.name","value":"MT operator"},{"name":"agent_info.MTOperator.address","value":"Moscow"},{"name":"agent_info.MTOperator.inn","value":"8634330204"},{"name":"supplier_info.phones","value":"%2B79161234333"},{"name":"supplier_info.name","value":"Supplier"},{"name":"supplier_info.inn","value":"287381373424"},{"name":"excise","value":"10.0"},{"name":"country_code","value":"810"},{"name":"declaration_number","value":"12332234533"},{"name":"userData","value":"user data"},{"name":"markQuantity.numerator","value":"1"},{"name":"markQuantity.denominator","value":"2"},{"name":"sectoralItemProps[0].federalId","value":"001"},{"name":"sectoralItemProps[0].date","value":"10.10.2021"},{"name":"sectoralItemProps[0].number","value":"123/4567"},{"name":"sectoralItemProps[0].value","value":"value1"},{"name":"sectoralItemProps[1].federalId","value":"003"},{"name":"sectoralItemProps[1].date","value":"11.10.2021"},{"name":"sectoralItemProps[1].number","value":"321/4567"},{"name":"sectoralItemProps[1].value","value":"value2"}]}}]}}
{"orderId":"d296be1d-c092-773b-ab2c-68e60128092a","formUrl":"https://3dsec.sberbank.ru/payment/789/payment_ru.html?mdOrder=d296be1d-c092-773b-ab2c-68e60128092a"}