/v1/orders

Request to create an order. Returns a payment link for the order.

Request

POST

https://pay.yandex.uz/api/merchant/v1/orders

Production

POST

https://sandbox.pay.yandex.uz/api/merchant/v1/orders

Sandbox

Body

application/json
{
  "availablePaymentMethods": null,
  "billingPhone": "example",
  "cart": {
    "externalId": "example",
    "items": [
      {
        "description": "example",
        "discountedUnitPrice": "123.45",
        "features": null,
        "productId": "example",
        "quantity": null,
        "skuId": "example",
        "subtotal": "123.45",
        "title": "example",
        "total": "123.45",
        "unitPrice": "123.45"
      }
    ],
    "total": {
      "amount": "123.45"
    }
  },
  "currencyCode": "RUB",
  "extensions": null,
  "isPrepayment": true,
  "metadata": "example",
  "orderId": "example",
  "orderSource": "null",
  "preferredPaymentMethod": "FULLPAYMENT",
  "publicConstructor": "example",
  "purpose": "example",
  "redirectUrls": {
    "onAbort": "example",
    "onError": "example",
    "onSuccess": "example"
  },
  "risk": {
    "billingPhone": "example",
    "customerAggregates": {
      "amountFirstSuccessfulOrder": "123.45",
      "amountLatestSuccessfulOrder": "123.45",
      "cookie": "example",
      "daysSinceLastPasswordReset": 0,
      "failedLoginAttemptsOneDay": 0,
      "failedLoginAttemptsSevenDays": 0,
      "firstSuccessfulOrderDate": "2025-01-01",
      "historicalCookieLogin": true,
      "historicalDeviceLogin": true,
      "lastPasswordResetDate": "2025-01-01",
      "latestSuccessfulOrderLastYearDate": "2025-01-01",
      "previousSuccessfulOrdersAtSameAddress": true,
      "redemptionRateLastHalfYear": "123.45",
      "registrationDate": "2025-01-01"
    },
    "deviceId": "example",
    "isExpressShipping": true,
    "merchantMcc": "example",
    "merchantName": "example",
    "merchantOfflinePosLegalAddress": "example",
    "merchantTaxRefNumber": "example",
    "periodCheckAggregates": {
      "successfulOrdersCountNineMonths": 0,
      "successfulOrdersCountOneMonth": 0,
      "successfulOrdersCountSixMonths": 0,
      "successfulOrdersCountThreeMonths": 0,
      "successfulOrdersCountTwelveMonths": 0,
      "totalAmountSuccessfulOrdersNineMonths": "123.45",
      "totalAmountSuccessfulOrdersOneMonth": "123.45",
      "totalAmountSuccessfulOrdersSixMonths": "123.45",
      "totalAmountSuccessfulOrdersThreeMonths": "123.45",
      "totalAmountSuccessfulOrdersTwelveMonths": "123.45"
    },
    "qrType": "static",
    "qrcId": "example",
    "shippingAddress": "example",
    "shippingPhone": "example",
    "shippingType": "COURIER"
  },
  "ttl": 1800
}

Name

Description

cart

All of 1 type
  • Type: object

    items

    Type: object[]

    productId

    Type: string

    Product ID in the merchant system. Make sure that each productId in the request parameters is unique.

    Max length: 2048

    Example: example

    quantity

    All of 1 type
    • Type: object

      count

      Type: string<double>

      Product quantity in the order

      Example: 123.45

      available

      Type: string<double>

      Maximum available product quantity

      Example: 123.45

      Example
      {
        "available": "123.45",
        "count": "123.45"
      }
      

    Product quantity in the order

    Example
    {
      "available": "123.45",
      "count": "123.45"
    }
    

    title

    Type: string

    Product name

    Max length: 2048

    Example: example

    total

    Type: string<double>

    Total item price including item-level discounts

    Example: 123.45

    description

    Type: string

    Product description

    Max length: 2048

    Example: example

    discountedUnitPrice

    Type: string<double>

    Price per product unit with discount per item

    Example: 123.45

    features

    All of 1 type
    • Type: object

      pointsDisabled

      Type: boolean

      Unavailable in Uzbekistan.

      Default: false

      tariffModifier

      Type: string

      Rate modifier used for fee calculation. Determines the rate to be applied when calculating the fee for handling a cart item.

      Enum: VERY_LOW, LOW, MEDIUM, HIGH, VERY_HIGH, null

      Example: VERY_LOW

      Example
      {
        "pointsDisabled": false,
        "tariffModifier": "VERY_LOW"
      }
      

    Product promo parameters

    Example
    {
      "pointsDisabled": false,
      "tariffModifier": "VERY_LOW"
    }
    

    skuId

    Type: string

    Unique ID that describes a product range unit. Required when applying individual rates.

    Max length: 2048

    Example: example

    subtotal

    Type: string<double>

    Total price per item without discount

    Example: 123.45

    unitPrice

    Type: string<double>

    Full unit price excluding discounts

    Example: 123.45

    List of cart items

    Example
    [
      {
        "description": "example",
        "discountedUnitPrice": "123.45",
        "features": {
          "pointsDisabled": false,
          "tariffModifier": "VERY_LOW"
        },
        "productId": "example",
        "quantity": {
          "available": "123.45",
          "count": "123.45"
        },
        "skuId": "example",
        "subtotal": "123.45",
        "title": "example",
        "total": "123.45",
        "unitPrice": "123.45"
      }
    ]
    

    total

    All of 1 type
    • Type: object

      amount

      Type: string<double>

      Cart cost with all discounts

      Example: 123.45

      Example
      {
        "amount": "123.45"
      }
      

    Final order cost.

    Example
    {
      "amount": "123.45"
    }
    

    externalId

    Type: string

    Cart ID on the merchant side

    Max length: 2048

    Example: example

    Note

    Pass the delivery cost in items as a separate product.

    Example
    {
      "externalId": "example",
      "items": [
        {
          "description": "example",
          "discountedUnitPrice": "123.45",
          "features": {
            "pointsDisabled": false,
            "tariffModifier": "VERY_LOW"
          },
          "productId": "example",
          "quantity": {
            "available": "123.45",
            "count": "123.45"
          },
          "skuId": "example",
          "subtotal": "123.45",
          "title": "example",
          "total": "123.45",
          "unitPrice": "123.45"
        }
      ],
      "total": {
        "amount": "123.45"
      }
    }
    

Cart

Example
{
  "externalId": "example",
  "items": [
    {
      "description": "example",
      "discountedUnitPrice": "123.45",
      "features": null,
      "productId": "example",
      "quantity": null,
      "skuId": "example",
      "subtotal": "123.45",
      "title": "example",
      "total": "123.45",
      "unitPrice": "123.45"
    }
  ],
  "total": {
    "amount": "123.45"
  }
}

currencyCode

Type: string

Three-letter code of the order currency code (ISO 4217)

Enum: RUB, UZS

Max length: 2048

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: 2048

Example: example

availablePaymentMethods

Type: string[]

Payment methods that will be available to the customer in the Yandex Split payment form.

Possible values:

  • ["SPLIT"]: Split only.

Default: null

Min items: 1

Example
[
  "CARD"
]

billingPhone

Type: string

Customer phone number.

Used for simplified authorization and may make Split approval more likely.

Recommended phone number format: +998123456789 or 998123456789. The string may contain other characters. However, any characters, except numbers, are ignored.

For example, values like 998123456789, +998123456789, or +998 (12) 345-67-89 will be processed as 998123456789.

Max length: 2048

Example: example

extensions

All of 1 type
  • Type: object

    billingReport

    All of 1 type
    • Type: object

      branchId

      Type: string

      The field is required for offline stores only. ID of the point of sale

      Default: null

      Max length: 2048

      managerId

      Type: string

      The field is required for offline stores only. Manager ID

      Default: null

      Max length: 2048

      Example
      {
        "branchId": "null",
        "managerId": "null"
      }
      

    Information about where the order was placed and who placed it.

    Example
    {
      "branchId": "null",
      "managerId": "null"
    }
    

    paymentData

    All of 1 type
    • Type: object

      saleToken

      Type: string

      Unique ID generated by the cash register for each payment transaction

      Max length: 2048

      Example: example

      Example
      {
        "saleToken": "example"
      }
      

    Additional payment parameters

    Example
    {
      "saleToken": "example"
    }
    

    qrData

    All of 1 type
    • Type: object

      token

      Type: string

      QR token

      Max length: 2048

      Example: example

      Example
      {
        "token": "example"
      }
      

    Additional parameters for sending a link for payment via QR code.

    Example
    {
      "token": "example"
    }
    

    smsOffer

    All of 1 type
    • Type: object

      phone

      Type: string

      Customer phone number (such as +998123456789) for SMS notifications. For offline stores only.

      Max length: 2048

      Pattern: ^\+\d+$

      Example: example

      Example
      {
        "phone": "example"
      }
      

    Additional parameters for sending a link for payment via SMS.

    The field is required for offline stores only.

    Example
    {
      "phone": "example"
    }
    
    Example
    {
      "billingReport": {
        "branchId": "null",
        "managerId": "null"
      },
      "paymentData": {
        "saleToken": "example"
      },
      "qrData": {
        "token": "example"
      },
      "smsOffer": {
        "phone": "example"
      }
    }
    

Additional parameters for placing an offline order

Default: null

isPrepayment

Type: boolean

Flag indicating whether to process the order using the "deferred payment" flow.

If set to true, deferred payment is enabled for the order.

metadata

Type: string

Arbitrary order data for internal use

Max length: 2048

Example: example

orderSource

Type: string

Indicates where order creation was initialized.

Used for subsequent analysis


WEBSITE: The button is placed on a website. A payment link is generated after certain user actions (clicking the button) on the website

APP: The button is placed in a 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

CMS_PLUGIN: A payment link is generated in the CMS plugin

TV: A payment link is generated to be displayed on a TV platform

Default: null

Enum: WEBSITE, APP, CRM, CASH_REGISTER, CMS_PLUGIN

preferredPaymentMethod

Type: string

Preferred payment method.

The provided method will be automatically selected in the payment form if it does not conflict with the methods specified in availablePaymentMethods.

Enum: FULLPAYMENT, SPLIT

publicConstructor

Type: string

Constructor of the preselected Split payment plan.

Available only upon approval

Example: example

purpose

Type: string

Purpose of payment

Max length: 1000

Example: example

redirectUrls

All of 1 type
  • Type: object

    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: 2048

    Example: example

    onSuccess

    Type: string

    The field is required for online stores only. Link to redirect the user on payment success.

    Max length: 2048

    Example: example

    onAbort

    Type: string

    Link to redirect the user on payment cancellation. Payment can be canceled by the user in the payment form.

    Max length: 2048

    Example: example

    Example
    {
      "onAbort": "example",
      "onError": "example",
      "onSuccess": "example"
    }
    

Links for redirecting the user from the payment form. Required for online stores.

Example
{
  "onAbort": "example",
  "onError": "example",
  "onSuccess": "example"
}

risk

All of 1 type
  • Type: object

    billingPhone

    Type: string

    DEPRECATED Customer phone number.
    Use the field with the same name one level up instead.

    Max length: 2048

    Example: example

    customerAggregates

    All of 1 type
    • Type: object

      amountFirstSuccessfulOrder

      Type: string<double>

      Amount of the first successful order

      Example: 123.45

      amountLatestSuccessfulOrder

      Type: string<double>

      Amount of the last successful order

      Example: 123.45

      cookie

      Type: string

      Cookies

      Max length: 2048

      Example: example

      daysSinceLastPasswordReset

      Type: integer

      How many days have passed since the last password reset

      failedLoginAttemptsOneDay

      Type: integer

      Number of failed login attempts over the past day

      failedLoginAttemptsSevenDays

      Type: integer

      Number of failed login attempts over the past 7 days

      firstSuccessfulOrderDate

      Type: string<date>

      Date of the first successful order in the order history

      Example: 2025-01-01

      historicalCookieLogin

      Type: boolean

      Login with saved cookies (user previously paid for an order)

      historicalDeviceLogin

      Type: boolean

      Login from a saved device (user previously paid for an order)

      lastPasswordResetDate

      Type: string<date>

      Date of the last password reset

      Example: 2025-01-01

      latestSuccessfulOrderLastYearDate

      Type: string<date>

      Date of the last successful order over the past year

      Example: 2025-01-01

      previousSuccessfulOrdersAtSameAddress

      Type: boolean

      Whether the user has previously completed a successful order at the current address

      redemptionRateLastHalfYear

      Type: string<double>

      Buyout percentage over the past 6 months

      Example: 123.45

      registrationDate

      Type: string<date>

      Date of user registration on the merchant's website

      Example: 2025-01-01

      Example
      {
        "amountFirstSuccessfulOrder": "123.45",
        "amountLatestSuccessfulOrder": "123.45",
        "cookie": "example",
        "daysSinceLastPasswordReset": 0,
        "failedLoginAttemptsOneDay": 0,
        "failedLoginAttemptsSevenDays": 0,
        "firstSuccessfulOrderDate": "2025-01-01",
        "historicalCookieLogin": true,
        "historicalDeviceLogin": true,
        "lastPasswordResetDate": "2025-01-01",
        "latestSuccessfulOrderLastYearDate": "2025-01-01",
        "previousSuccessfulOrdersAtSameAddress": true,
        "redemptionRateLastHalfYear": "123.45",
        "registrationDate": "2025-01-01"
      }
      

    Aggregate customer data

    Example
    {
      "amountFirstSuccessfulOrder": "123.45",
      "amountLatestSuccessfulOrder": "123.45",
      "cookie": "example",
      "daysSinceLastPasswordReset": 0,
      "failedLoginAttemptsOneDay": 0,
      "failedLoginAttemptsSevenDays": 0,
      "firstSuccessfulOrderDate": "2025-01-01",
      "historicalCookieLogin": true,
      "historicalDeviceLogin": true,
      "lastPasswordResetDate": "2025-01-01",
      "latestSuccessfulOrderLastYearDate": "2025-01-01",
      "previousSuccessfulOrdersAtSameAddress": true,
      "redemptionRateLastHalfYear": "123.45",
      "registrationDate": "2025-01-01"
    }
    

    deviceId

    Type: string

    Customer device ID (device_id/gaid/idfa/ifv)

    Max length: 2048

    Example: example

    isExpressShipping

    Type: boolean

    Express delivery flag

    merchantMcc

    Type: string

    Merchant category code (MCC)

    Max length: 2048

    Example: example

    merchantName

    Type: string

    Merchant name

    Max length: 2048

    Example: example

    merchantOfflinePosLegalAddress

    Type: string

    Offline POS legal address

    Max length: 2048

    Example: example

    merchantTaxRefNumber

    Type: string

    Merchant tax ID

    Max length: 2048

    Example: example

    periodCheckAggregates

    All of 1 type
    • Type: object

      successfulOrdersCountNineMonths

      Type: integer

      Number of successful orders over the past 9 months

      successfulOrdersCountOneMonth

      Type: integer

      Number of successful orders over the past month

      successfulOrdersCountSixMonths

      Type: integer

      Number of successful orders over the past 6 months

      successfulOrdersCountThreeMonths

      Type: integer

      Number of successful orders over the past 3 months

      successfulOrdersCountTwelveMonths

      Type: integer

      Number of successful orders over the past 12 months

      totalAmountSuccessfulOrdersNineMonths

      Type: string<double>

      Total amount of successful orders over the past 9 months

      Example: 123.45

      totalAmountSuccessfulOrdersOneMonth

      Type: string<double>

      Total amount of successful orders over the past month

      Example: 123.45

      totalAmountSuccessfulOrdersSixMonths

      Type: string<double>

      Total amount of successful orders over the past 6 months

      Example: 123.45

      totalAmountSuccessfulOrdersThreeMonths

      Type: string<double>

      Total amount of successful orders over the past 3 months

      Example: 123.45

      totalAmountSuccessfulOrdersTwelveMonths

      Type: string<double>

      Total amount of successful orders over the past 12 months

      Example: 123.45

      Example
      {
        "successfulOrdersCountNineMonths": 0,
        "successfulOrdersCountOneMonth": 0,
        "successfulOrdersCountSixMonths": 0,
        "successfulOrdersCountThreeMonths": 0,
        "successfulOrdersCountTwelveMonths": 0,
        "totalAmountSuccessfulOrdersNineMonths": "123.45",
        "totalAmountSuccessfulOrdersOneMonth": "123.45",
        "totalAmountSuccessfulOrdersSixMonths": "123.45",
        "totalAmountSuccessfulOrdersThreeMonths": "123.45",
        "totalAmountSuccessfulOrdersTwelveMonths": "123.45"
      }
      

    Aggregate data on receipts over different periods

    Example
    {
      "successfulOrdersCountNineMonths": 0,
      "successfulOrdersCountOneMonth": 0,
      "successfulOrdersCountSixMonths": 0,
      "successfulOrdersCountThreeMonths": 0,
      "successfulOrdersCountTwelveMonths": 0,
      "totalAmountSuccessfulOrdersNineMonths": "123.45",
      "totalAmountSuccessfulOrdersOneMonth": "123.45",
      "totalAmountSuccessfulOrdersSixMonths": "123.45",
      "totalAmountSuccessfulOrdersThreeMonths": "123.45",
      "totalAmountSuccessfulOrdersTwelveMonths": "123.45"
    }
    

    qrcId

    Type: string

    QR code ID

    Max length: 2048

    Example: example

    qrType

    Type: string

    QR code type

    Enum: static, dynamic, null

    Example: static

    shippingAddress

    Type: string

    Delivery address. If the PICKUP order delivery method is selected, specify the pickup point address.

    Max length: 2048

    Example: example

    shippingPhone

    Type: string

    Recipient phone number (e.g., +998123456789)

    Max length: 2048

    Example: example

    shippingType

    Type: string

    Order delivery method

    Enum: COURIER, PICKUP, null

    Example: COURIER

    Example
    {
      "billingPhone": "example",
      "customerAggregates": {
        "amountFirstSuccessfulOrder": "123.45",
        "amountLatestSuccessfulOrder": "123.45",
        "cookie": "example",
        "daysSinceLastPasswordReset": 0,
        "failedLoginAttemptsOneDay": 0,
        "failedLoginAttemptsSevenDays": 0,
        "firstSuccessfulOrderDate": "2025-01-01",
        "historicalCookieLogin": true,
        "historicalDeviceLogin": true,
        "lastPasswordResetDate": "2025-01-01",
        "latestSuccessfulOrderLastYearDate": "2025-01-01",
        "previousSuccessfulOrdersAtSameAddress": true,
        "redemptionRateLastHalfYear": "123.45",
        "registrationDate": "2025-01-01"
      },
      "deviceId": "example",
      "isExpressShipping": true,
      "merchantMcc": "example",
      "merchantName": "example",
      "merchantOfflinePosLegalAddress": "example",
      "merchantTaxRefNumber": "example",
      "periodCheckAggregates": {
        "successfulOrdersCountNineMonths": 0,
        "successfulOrdersCountOneMonth": 0,
        "successfulOrdersCountSixMonths": 0,
        "successfulOrdersCountThreeMonths": 0,
        "successfulOrdersCountTwelveMonths": 0,
        "totalAmountSuccessfulOrdersNineMonths": "123.45",
        "totalAmountSuccessfulOrdersOneMonth": "123.45",
        "totalAmountSuccessfulOrdersSixMonths": "123.45",
        "totalAmountSuccessfulOrdersThreeMonths": "123.45",
        "totalAmountSuccessfulOrdersTwelveMonths": "123.45"
      },
      "qrType": "static",
      "qrcId": "example",
      "shippingAddress": "example",
      "shippingPhone": "example",
      "shippingType": "COURIER"
    }
    

Additional info specifying which may make Split approval more likely. Fully available for online stores only.

Example
{
  "billingPhone": "example",
  "customerAggregates": {
    "amountFirstSuccessfulOrder": "123.45",
    "amountLatestSuccessfulOrder": "123.45",
    "cookie": "example",
    "daysSinceLastPasswordReset": 0,
    "failedLoginAttemptsOneDay": 0,
    "failedLoginAttemptsSevenDays": 0,
    "firstSuccessfulOrderDate": "2025-01-01",
    "historicalCookieLogin": true,
    "historicalDeviceLogin": true,
    "lastPasswordResetDate": "2025-01-01",
    "latestSuccessfulOrderLastYearDate": "2025-01-01",
    "previousSuccessfulOrdersAtSameAddress": true,
    "redemptionRateLastHalfYear": "123.45",
    "registrationDate": "2025-01-01"
  },
  "deviceId": "example",
  "isExpressShipping": true,
  "merchantMcc": "example",
  "merchantName": "example",
  "merchantOfflinePosLegalAddress": "example",
  "merchantTaxRefNumber": "example",
  "periodCheckAggregates": {
    "successfulOrdersCountNineMonths": 0,
    "successfulOrdersCountOneMonth": 0,
    "successfulOrdersCountSixMonths": 0,
    "successfulOrdersCountThreeMonths": 0,
    "successfulOrdersCountTwelveMonths": 0,
    "totalAmountSuccessfulOrdersNineMonths": "123.45",
    "totalAmountSuccessfulOrdersOneMonth": "123.45",
    "totalAmountSuccessfulOrdersSixMonths": "123.45",
    "totalAmountSuccessfulOrdersThreeMonths": "123.45",
    "totalAmountSuccessfulOrdersTwelveMonths": "123.45"
  },
  "qrType": "static",
  "qrcId": "example",
  "shippingAddress": "example",
  "shippingPhone": "example",
  "shippingType": "COURIER"
}

ttl

Type: integer

This parameter defines how long the user can use the payment link to access the order payment form.

After expiration, the user will see the message: "Payment time expired".

If the user follows the link before expiration, 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 Order.paymentStatus value that changes to FAILED. In addition, a notification about the order payment status change is sent. If the merchant reserved the item, the order can be canceled after the status changes.

Time-to-live (seconds): 180 <= ttl <= 604800

Time-to-live (when generating a link in the personal account, seconds): 86400

Default: 1800

Responses

200 OK

Body

application/json
{
  "code": 200,
  "data": {
    "paymentUrl": "example"
  },
  "status": "success"
}

Name

Description

data

Type: object

paymentUrl

Type: string

Link to paying for the order

Max length: 2048

Example: example

Example
{
  "paymentUrl": "example"
}

code

Type: unknown

Default: 200

status

Type: string

Default: success

Const: success