/v1/orders
Request to create a link for order payment.
The request is used to create and obtain a link to pay for the order.
Request
POST
https://pay.yandex.ru/api/merchant/v1/orders
Production
POST
https://sandbox.pay.yandex.ru/api/merchant/v1/orders
Sandbox
Body
application/json
{
"availablePaymentMethods": null,
"billingPhone": "string",
"cart": {
"externalId": "string",
"items": [
{
"description": "string",
"discountedUnitPrice": "123.45",
"pointsAmount": "123.45",
"productId": "string",
"quantity": {
"available": "123.45",
"count": "123.45",
"label": "string"
},
"receipt": {
"agent": {
"agentType": 1,
"operation": "string",
"paymentsOperator": {
"phones": [
"string"
]
},
"phones": [
"string"
],
"transferOperator": {
"address": "string",
"inn": "string",
"name": "string",
"phones": [
"string"
]
}
},
"excise": "123.45",
"markQuantity": {
"denominator": 0,
"numerator": 0
},
"measure": 0,
"paymentMethodType": 1,
"paymentSubjectType": 1,
"productCode": "string",
"supplier": {
"inn": "string",
"name": "string",
"phones": [
"string"
]
},
"tax": 1,
"title": "string"
},
"subtotal": "123.45",
"title": "string",
"total": "123.45",
"unitPrice": "123.45"
}
],
"total": {
"amount": "123.45",
"label": "string",
"pointsAmount": "123.45"
}
},
"currencyCode": "RUB",
"extensions": {
"billingReport": {
"branchId": null,
"managerId": null
},
"qrData": {
"token": "string"
},
"smsOffer": {
"phone": "string"
}
},
"isPrepayment": false,
"metadata": "string",
"orderId": "string",
"orderSource": "WEBSITE",
"preferredPaymentMethod": "FULLPAYMENT",
"publicConstructor": "2",
"purpose": "string",
"redirectUrls": {
"onAbort": "string",
"onError": "string",
"onSuccess": "string"
},
"risk": {
"billingPhone": "string",
"deviceId": "string",
"shippingAddress": "string",
"shippingPhone": "string",
"shippingType": "COURIER"
},
"ttl": 1800,
"uniqrMetadata": {
"uniQrId": "string"
}
}
Name |
Description |
cart* |
Type: RenderedCart Cart |
currencyCode* |
Type: string Three-letter code of the order currency code (ISO 4217) Max length: Enum: |
orderId* |
Type: string Order ID on the merchant side (it should be unique). Further interaction on the payment request will be carried out using this ID. The ID will also be used at reconciliation Max length: |
availablePaymentMethods |
Type: string[] Payment methods available in the Yandex Pay payment form. If you are integrating payments only with one method (for example, Card), specify a single method ( Enum: Default: Min items: |
billingPhone |
Type: string Customer phone number. Used for simplified authorization and may make Split approval more likely. Recommended phone number format: For example, passed values such as Max length: |
extensions |
Type: OrderExtensions Additional parameters for placing an offline order |
isPrepayment |
Type: boolean Whether to transfer an order based on the "deferred payment" flow. If the parameter value is set to |
metadata |
Type: string Arbitrary order data for internal use Max length: |
orderSource |
Type: string Indicates where order creation was initialized Used for subsequent analysis WEBSITE: The button is placed on the website. A payment link is generated after certain user actions (clicking the button) on the website APP: The button is placed in the mobile app. A payment link is generated after certain user actions (tapping the button) in the app CRM: A payment link is generated by a manager in the CRM system or another admin panel CASH_REGISTER: A payment link is generated to be displayed in the offline cash register. Default: Enum: |
preferredPaymentMethod |
Type: string Preferred payment method. The passed method will be selected automatically in the payment form provided that it is on the list of allowed payment methods. Card by default. Enum: |
publicConstructor |
Type: string Constructor of the preselected Split payment plan. Available only upon approval Enum: |
purpose |
Type: string Purpose of payment Max length: |
redirectUrls |
Type: MerchantRedirectUrls Links for redirecting the user from the payment form. Required for online stores |
risk |
Type: MerchantRiskInfo Additional info specifying which may make Split approval more likely. Fully available for online stores only. |
ttl |
Type: integer<int32> The parameter sets the time that the user is given to follow the link to the order payment form. When expired, the user will see a message saying "Payment time expired". If the user follows the link before the expiry, they will be given another 15 minutes to make a payment. If no payment is made during the additional time, the order is finally considered unpaid. This is indicated in the Time-to-live (seconds): Time-to-live (when generating a link in the personal account, seconds): Default: |
uniqrMetadata |
Type: UniqrMetadata Additional uniqr data |
RenderedCart
Name |
Description |
items* |
Type: RenderedCartItem[] Cart items that the customer pays for. |
total* |
Type: CartTotal Final order cost. |
externalId |
Type: string Cart ID passed by the merchant Max length: |
OrderExtensions
Name |
Description |
billingReport |
Type: BillingReport Information about where the order was placed and who placed it. |
qrData |
Type: QRData Additional parameters for sending a link for payment via QR code |
smsOffer |
Type: SMSOffer Additional parameters for sending a link for payment via SMS. The field is required for offline stores only. |
MerchantRedirectUrls
Name |
Description |
onError* |
Type: string The field is required for online stores only. A link to redirect the user in case of a payment error or TTL expiry for a payment link Max length: |
onSuccess* |
Type: string The field is required for online stores only. Link to redirect the user on payment success. Max length: |
onAbort |
Type: string Link to redirect the user on payment cancellation. Payment can be canceled by the user in the payment form. Max length: |
MerchantRiskInfo
Name |
Description |
billingPhone |
Type: string DEPRECATED Customer phone number. Max length: |
deviceId |
Type: string Customer device ID (device_id/gaid/idfa/ifv) Max length: |
shippingAddress |
Type: string Delivery address Max length: |
shippingPhone |
Type: string Recipient phone number (e.g., +71234567890) Max length: |
shippingType |
Type: string Order delivery method Enum: |
UniqrMetadata
Name |
Description |
uniQrId* |
Type: string Max length: |
RenderedCartItem
Name |
Description |
productId* |
Type: string Product ID in the merchant system Make sure that each Max length: |
quantity* |
Type: ItemQuantity Product quantity in the order |
title* |
Type: string Product name Max length: |
total* |
Type: string<double> Total price per item with item discount Example: |
description |
Type: string Product description Max length: |
discountedUnitPrice |
Type: string<double> Price per product unit with discount per item Example: |
pointsAmount |
Type: string<double> Number of Plus points Example: |
receipt |
Type: ItemReceipt Data for receipt generation |
subtotal |
Type: string<double> Total price per item without discount Example: |
unitPrice |
Type: string<double> Total price per product unit without discount Example: |
CartTotal
Name |
Description |
amount* |
Type: string<double> Cart cost with all discounts Example: |
label |
Type: string Name of measurement units, for example, "kg" or "pcs" Max length: |
pointsAmount |
Type: string<double> Number of plus points Example: |
BillingReport
Name |
Description |
branchId |
Type: string The field is required for offline stores only. ID of the point of sale Default: Max length: |
managerId |
Type: string The field is required for offline stores only. Manager ID Default: Max length: |
QRData
Name |
Description |
token* |
Type: string QR token Max length: |
SMSOffer
Name |
Description |
phone* |
Type: string Customer phone number (e.g., Max length: Pattern: |
ItemQuantity
Name |
Description |
count* |
Type: string<double> Product quantity in the order Example: |
available |
Type: string<double> Maximum available product quantity Example: |
label |
Type: string Name of measurement units, for example, "kg" or "pcs" Max length: |
ItemReceipt
Name |
Description |
tax* |
Type: integer Value description: Link Enum: |
agent |
Type: Agent |
excise |
Type: string<double> It shouldn't include more than two decimal digits. For example: 1.12, 5.1, 10, 11.00 . Example: |
markQuantity |
Type: MarkQuantity |
measure |
Type: integer Value description: Link Enum: |
paymentMethodType |
Type: integer Value description: Link Enum: |
paymentSubjectType |
Type: integer Value description: Link Enum: |
productCode |
Type: string<base64> Product code (a base64-encoded array of 1 to 32 bytes) |
supplier |
Type: Supplier |
title |
Type: string Max length: |
Agent
Name |
Description |
agentType* |
Type: integer Agent type by taxable object. See values Enum: |
operation |
Type: string Max length: |
paymentsOperator |
Type: PaymentsOperator |
phones |
Type: string[] Max length: |
transferOperator |
Type: TransferOperator |
MarkQuantity
Name |
Description |
denominator* |
Type: integer<int32> |
numerator* |
Type: integer<int32> |
Supplier
Name |
Description |
inn |
Type: string Max length: |
name |
Type: string Max length: |
phones |
Type: string[] Max length: |
PaymentsOperator
Name |
Description |
phones |
Type: string[] Max length: |
TransferOperator
Name |
Description |
address |
Type: string Max length: |
inn |
Type: string Max length: |
name |
Type: string Max length: |
phones |
Type: string[] Max length: |
Responses
200 OK
Body
application/json
{
"code": 200,
"data": {
"paymentUrl": "string"
},
"status": "success"
}
Name |
Description |
data* |
Type: CreateOrderResponseData |
code |
Type: number Default: |
status |
Type: string Default: Enum: |
CreateOrderResponseData
Name |
Description |
paymentUrl* |
Type: string Link to paying for the order Max length: |
No longer supported, please use an alternative and newer version.