/v1/orders
Buyurtma yaratish so‘rovi. Buyurtma uchun to‘lov havolasini qaytaradi.
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
Savat Example
|
|
currencyCode |
Type: string Buyurtma valyutasining uch harfli kodi (ISO 4217). Enum: Max length: |
|
orderId |
Type: string Sotuvchi tizimidagi buyurtma identifikatori (unikal bo‘lishi shart). To‘lov so‘rovi bo‘yicha keyingi barcha jarayonlar aynan shu identifikator orqali amalga oshiriladi. Ushbu identifikator solishtirish jarayonlarida ham ishlatiladi Max length: Example: |
|
availablePaymentMethods |
Type: string[] To‘lov formasida xaridorga mavjud bo‘ladigan to‘lov usullari Yandex Split orqali. Mumkin bo‘lgan variantlar:
Default: Min items: Example
|
|
billingPhone |
Type: string Mijoz telefon raqami. Avtorizatsiyani soddalashtirish uchun ishlatiladi hamda Split orqali tasdiqlanish ehtimolini oshirishi mumkin. Telefon raqami uchun quyidagi formatlardan foydalanish tavsiya etiladi: Masalan, quyidagi yuborilgan qiymatlar: Max length: Example: |
|
extensions |
All of 1 type
Oflayn buyurtmani rasmiylashtirish uchun qo‘shimcha parametrlar Default: |
|
isPrepayment |
Type: boolean Buyurtma “kechiktirilgan to‘lov” oqimi bo‘yicha amalga oshiriladimi. Agar parametr |
|
metadata |
Type: string Buyurtma bo‘yicha ichki foydalanish uchun ixtiyoriy ma’lumotlar. Max length: Example: |
|
orderSource |
Type: string Buyurtma yaratilishi boshlangan platforma yoki interfeys Keyingi tahlillar uchun zarur WEBSITE: Tugma veb-saytda joylashtirilgan. To‘lov havolasi foydalanuvchi saytda amal bajarganidan (tugmani bosganidan) keyin shakllantirilgan APP: Tugma mobil ilovada joylashtirilgan. To‘lov havolasi foydalanuvchi ilova ichida amal bajarganidan (tugmani bosganidan) keyin shakllantirilgan CRM: To‘lov havolasi CRM tizimida yoki boshqa administrator panelida menejer tomonidan yaratilgan CASH_REGISTER: To‘lov havolasi oflayn kassada ko‘rsatish uchun shakllantirilgan CMS_PLUGIN: To‘lov havolasi CMS uchun plagin ichida shakllantirilgan TV: To‘lov havolasi TV-platformada ko‘rsatish uchun shakllantirilgan. Default: Enum: |
|
preferredPaymentMethod |
Type: string Afzal to‘lov usuli. Uzatilgan to‘lov usuli, agar u Enum: |
|
publicConstructor |
Type: string Split orqali to‘lash uchun oldindan tanlangan reja konstruktori. Faqat kelishuv asosida mavjud Example: |
|
purpose |
Type: string To‘lov maqsadi Max length: Example: |
|
redirectUrls |
All of 1 type
To‘lov shaklidan foydalanuvchini qayta yo‘naltirish havolalari. Onlayn do‘konlar uchun majburiy. Example
|
|
risk |
All of 1 type
Splitni tasdiqlash ehtimolini oshirishi mumkin boʻlgan qoʻshimcha maʼlumotlar. To‘liq hajmda faqat onlayn-do‘konlar uchun mavjud. Example
|
|
ttl |
Type: integer Parametr foydalanuvchi buyurtma to‘lov sahifasiga havoladan foydalanishi mumkin bo‘lgan vaqtni belgilaydi. Belgilangan vaqt tugagach, foydalanuvchi “To‘lov vaqti tugadi” degan xabarni ko‘radi. Agar foydalanuvchi havoladan vaqt tugashidan oldin foydalangan bo‘lsa, to‘lovni yakunlash uchun qo‘shimcha 15 daqiqa beriladi. Agar qo‘shimcha vaqt tugagandan keyin ham to‘lov amalga oshirilmasa, buyurtma yakuniy ravishda to‘lanmagan deb hisoblanadi. Bu holat buyurtma holatining Amal qilish muddati (sek.): Amal qilish muddati (shaxsiy kabinetda to‘lov havolasi yaratilganda, sek.): Default: |
CartItemFeatures
|
Name |
Description |
|
pointsDisabled |
Type: boolean O‘zbekistonda mavjud emas. Default: |
|
tariffModifier |
Type: string Komissiyani hisoblash uchun tarif modifikatori. Savatdagi pozitsiyani qayta ishlash uchun komissiya hisoblanayotganda qaysi tarif qo‘llanishini belgilaydi. Enum: Example: |
Example
{
"pointsDisabled": false,
"tariffModifier": "VERY_LOW"
}
ItemQuantity
|
Name |
Description |
|
count |
Type: string<double> Buyurtmadagi mahsulot miqdori Example: |
|
available |
Type: string<double> Mahsulot uchun maksimal mavjud miqdor Example: |
Example
{
"available": "123.45",
"count": "123.45"
}
RenderedCartItem
|
Name |
Description |
|
productId |
Type: string Sotuvchi tizimidagi mahsulot ID raqami. So‘rov parametrlarida har bir mahsulot identifikatori Max length: Example: |
|
quantity |
All of 1 type
Buyurtmadagi mahsulot miqdori Example
|
|
title |
Type: string Mahsulot nomi Max length: Example: |
|
total |
Type: string<double> Pozitsiya bo‘yicha chegirmalar hisobga olingan umumiy narx Example: |
|
description |
Type: string Mahsulot tavsifi Max length: Example: |
|
discountedUnitPrice |
Type: string<double> Bir pozitsiya uchun chegirmalarni hisobga olgan holda mahsulot birligining narxi Example: |
|
features |
All of 1 type
Mahsulot promo parametrlari Example
|
|
skuId |
Type: string Assortiment birligini tavsiflovchi noyob ID raqam. Individual tarifni qo‘llash uchun zarur. Max length: Example: |
|
subtotal |
Type: string<double> Chegirmalarsiz pozitsiya bo‘yicha umumiy narx Example: |
|
unitPrice |
Type: string<double> Chegirmasiz bir dona mahsulotning to‘liq narxi Example: |
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"
}
CartTotal
|
Name |
Description |
|
amount |
Type: string<double> Barcha chegirmalar hisobga olingan savat qiymati. Example: |
Example
{
"amount": "123.45"
}
RenderedCart
Sharh
Yetkazish narxini items ichida alohida mahsulot sifatida kiriting.
|
Name |
Description |
|
items |
Type: RenderedCartItem[] Savatdagi mahsulotlar ro‘yxati. Example
|
|
total |
All of 1 type
Buyurtma qiymati bo‘yicha yakuniy ma’lumot. Example
|
|
externalId |
Type: string Savat identifikatori – sotuvchi tomonida. Max length: Example: |
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"
}
}
BillingReport
|
Name |
Description |
|
branchId |
Type: string Faqat oflayn doʻkonlar uchun majburiy maydon. Savdo nuqtasi identifikatori Default: Max length: |
|
managerId |
Type: string Faqat oflayn doʻkonlar uchun majburiy maydon. Menejer identifikatori Default: Max length: |
Example
{
"branchId": "null",
"managerId": "null"
}
PaymentData
|
Name |
Description |
|
saleToken |
Type: string Har bir to‘lov operatsiyasi uchun kassa tomonidan yaratiladigan noyob ID Max length: Example: |
Example
{
"saleToken": "example"
}
QRData
|
Name |
Description |
|
token |
Type: string QR token Max length: Example: |
Example
{
"token": "example"
}
SMSOffer
|
Name |
Description |
|
phone |
Type: string SMS orqali xabarnoma yuborish uchun mijoz telefon raqami (masalan: Max length: Pattern: Example: |
Example
{
"phone": "example"
}
OrderExtensions
|
Name |
Description |
|
billingReport |
All of 1 type
Buyurtmani rasmiylashtirish joyi va mas’ul shaxs haqida ma’lumot. Example
|
|
paymentData |
All of 1 type
To‘lovning qo‘shimcha parametrlari. Example
|
|
qrData |
All of 1 type
QR yordamida to‘lov havolasini yuborish uchun qo‘shimcha parametrlar. Example
|
|
smsOffer |
All of 1 type
SMS orqali to‘lov havolasini yuborish uchun qo‘shimcha parametrlar. Faqat oflayn doʻkonlar uchun majburiy maydon. Example
|
Example
{
"billingReport": {
"branchId": "null",
"managerId": "null"
},
"paymentData": {
"saleToken": "example"
},
"qrData": {
"token": "example"
},
"smsOffer": {
"phone": "example"
}
}
MerchantRedirectUrls
|
Name |
Description |
|
onError |
Type: string Faqat onlayn do‘konlar uchun majburiy maydon. To‘lov vaqtida noma’lum xatolik yuz bersa yoki to‘lov havolasining amal qilish muddati tugasa, foydalanuvchini qayta yo‘naltirish uchun havola. Max length: Example: |
|
onSuccess |
Type: string Faqat onlayn do‘konlar uchun majburiy maydon. To‘lov muvaffaqiyatli yakunlanganda foydalanuvchini qayta yo‘naltirish uchun havola. Max length: Example: |
|
onAbort |
Type: string To‘lov jarayoni bekor qilinganda foydalanuvchini qayta yo‘naltirish uchun havola. To‘lovni bekor qilish foydalanuvchi tomonidan to‘lov formasida amalga oshiriladi. Max length: Example: |
Example
{
"onAbort": "example",
"onError": "example",
"onSuccess": "example"
}
CustomerAggregates
|
Name |
Description |
|
amountFirstSuccessfulOrder |
Type: string<double> Birinchi muvaffaqiyatli buyurtma summasi Example: |
|
amountLatestSuccessfulOrder |
Type: string<double> Oxirgi muvaffaqiyatli buyurtma summasi Example: |
|
cookie |
Type: string Cookie fayllar Max length: Example: |
|
daysSinceLastPasswordReset |
Type: integer Parol oxirgi marta tiklanganidan beri o‘tgan kunlar soni |
|
failedLoginAttemptsOneDay |
Type: integer So‘nggi 1 kun ichida muvaffaqiyatsiz kirish urinishlari soni |
|
failedLoginAttemptsSevenDays |
Type: integer So‘nggi 7 kun ichida muvaffaqiyatsiz kirishga urinishlar soni |
|
firstSuccessfulOrderDate |
Type: string<date> Tarixdagi birinchi muvaffaqiyatli buyurtma sanasi Example: |
|
historicalCookieLogin |
Type: boolean Saqlangan cookie orqali kirish (foydalanuvchi avval buyurtma uchun to‘lov qilgan) |
|
historicalDeviceLogin |
Type: boolean Saqlangan qurilma orqali kirish (foydalanuvchi avval buyurtma uchun to‘lov qilgan) |
|
lastPasswordResetDate |
Type: string<date> Parol oxirgi marta tiklangan sana Example: |
|
latestSuccessfulOrderLastYearDate |
Type: string<date> So‘nggi bir yil ichidagi oxirgi muvaffaqiyatli buyurtma sanasi Example: |
|
previousSuccessfulOrdersAtSameAddress |
Type: boolean Foydalanuvchi joriy manzil bo‘yicha ilgari muvaffaqiyatli buyurtma qilganmi |
|
redemptionRateLastHalfYear |
Type: string<double> So‘nggi yarim yil ichidagi xaridni yakunlash foizi Example: |
|
registrationDate |
Type: string<date> Sotuvchi saytida ro‘yxatdan o‘tgan sana Example: |
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"
}
PeriodCheckAggregates
|
Name |
Description |
|
successfulOrdersCountNineMonths |
Type: integer So‘nggi 9 oy ichidagi muvaffaqiyatli buyurtmalar soni |
|
successfulOrdersCountOneMonth |
Type: integer So‘nggi 1 oy ichidagi muvaffaqiyatli buyurtmalar soni |
|
successfulOrdersCountSixMonths |
Type: integer So‘nggi 6 oy ichidagi muvaffaqiyatli buyurtmalar soni |
|
successfulOrdersCountThreeMonths |
Type: integer So‘nggi 3 oy ichidagi muvaffaqiyatli buyurtmalar soni |
|
successfulOrdersCountTwelveMonths |
Type: integer So‘nggi 12 oy ichidagi muvaffaqiyatli buyurtmalar soni |
|
totalAmountSuccessfulOrdersNineMonths |
Type: string<double> So‘nggi 9 oy ichidagi muvaffaqiyatli buyurtmalar summasi Example: |
|
totalAmountSuccessfulOrdersOneMonth |
Type: string<double> So‘nggi bir oy ichidagi muvaffaqiyatli buyurtmalar summasi Example: |
|
totalAmountSuccessfulOrdersSixMonths |
Type: string<double> So‘nggi 6 oy ichidagi muvaffaqiyatli buyurtmalar summasi Example: |
|
totalAmountSuccessfulOrdersThreeMonths |
Type: string<double> So‘nggi 3 oy ichidagi muvaffaqiyatli buyurtmalar summasi Example: |
|
totalAmountSuccessfulOrdersTwelveMonths |
Type: string<double> So‘nggi 12 oy ichidagi muvaffaqiyatli buyurtmalar summasi Example: |
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"
}
MerchantRiskInfo
|
Name |
Description |
|
billingPhone |
Type: string DEPRECATED Mijoz telefon raqami. Max length: Example: |
|
customerAggregates |
All of 1 type
Mijoz haqida umumlashtirilgan ma’lumotlar Example
|
|
deviceId |
Type: string Mijoz qurilmasi identifikatori (device_id/gaid/idfa/ifv) Max length: Example: |
|
isExpressShipping |
Type: boolean Ekspress yetkazish belgisi |
|
merchantMcc |
Type: string Merchant MCC kodi Max length: Example: |
|
merchantName |
Type: string Merchant nomi Max length: Example: |
|
merchantOfflinePosLegalAddress |
Type: string Oflayn savdo nuqtasining yuridik manzili Max length: Example: |
|
merchantTaxRefNumber |
Type: string Merchantning soliq raqami Max length: Example: |
|
periodCheckAggregates |
All of 1 type
Turli davrlar bo‘yicha chek agregatlari. Example
|
|
qrcId |
Type: string QR kod raqami Max length: Example: |
|
qrType |
Type: string QR kod turi Enum: Example: |
|
shippingAddress |
Type: string Yetkazish manzili Agar buyurtmani olish usuli ( Max length: Example: |
|
shippingPhone |
Type: string Qabul qiluvchining telefon raqami (masalan: +998123456789). Max length: Example: |
|
shippingType |
Type: string Buyurtmani olish usuli Enum: Example: |
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"
}
Responses
200 OK
Body
application/json
{
"code": 200,
"data": {
"paymentUrl": "example"
},
"status": "success"
}
|
Name |
Description |
|
data |
Type: CreateOrderResponseData Example
|
|
code |
Type: unknown Default: |
|
status |
Type: string Default: Const: |
RenderedCartItem
|
Name |
Description |
|
productId |
Type: string Sotuvchi tizimidagi mahsulot ID raqami. So‘rov parametrlarida har bir mahsulot identifikatori Max length: Example: |
|
quantity |
All of 1 type
Buyurtmadagi mahsulot miqdori Example
|
|
title |
Type: string Mahsulot nomi Max length: Example: |
|
total |
Type: string<double> Pozitsiya bo‘yicha chegirmalar hisobga olingan umumiy narx Example: |
|
description |
Type: string Mahsulot tavsifi Max length: Example: |
|
discountedUnitPrice |
Type: string<double> Bir pozitsiya uchun chegirmalarni hisobga olgan holda mahsulot birligining narxi Example: |
|
features |
All of 1 type
Mahsulot promo parametrlari Example
|
|
pointsAmount |
Type: string<double> O‘zbekistonda mavjud emas. Example: |
|
skuId |
Type: string Assortiment birligini tavsiflovchi noyob ID raqam. Individual tarifni qo‘llash uchun zarur. Max length: Example: |
|
subtotal |
Type: string<double> Chegirmalarsiz pozitsiya bo‘yicha umumiy narx Example: |
|
unitPrice |
Type: string<double> Chegirmasiz bir dona mahsulotning to‘liq narxi Example: |
Example
{
"description": "example",
"discountedUnitPrice": "123.45",
"features": {
"pointsDisabled": false,
"tariffModifier": "VERY_LOW"
},
"pointsAmount": "123.45",
"productId": "example",
"quantity": {
"available": "123.45",
"count": "123.45"
},
"skuId": "example",
"subtotal": "123.45",
"title": "example",
"total": "123.45",
"unitPrice": "123.45"
}
CartTotal
|
Name |
Description |
|
amount |
Type: string<double> Barcha chegirmalar hisobga olingan savat qiymati. Example: |
|
pointsAmount |
Type: string<double> O‘zbekistonda mavjud emas. Example: |
Example
{
"amount": "123.45",
"pointsAmount": "123.45"
}
RenderedCart
Sharh
Yetkazish narxini items ichida alohida mahsulot sifatida kiriting.
|
Name |
Description |
|
items |
Type: RenderedCartItem[] Savatdagi mahsulotlar ro‘yxati. Example
|
|
total |
All of 1 type
Buyurtma qiymati bo‘yicha yakuniy ma’lumot. Example
|
|
externalId |
Type: string Savat identifikatori – sotuvchi tomonida. Max length: Example: |
Example
{
"externalId": "example",
"items": [
{
"description": "example",
"discountedUnitPrice": "123.45",
"features": {
"pointsDisabled": false,
"tariffModifier": "VERY_LOW"
},
"pointsAmount": "123.45",
"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",
"pointsAmount": "123.45"
}
}
CreateOrderResponseData
|
Name |
Description |
|
paymentUrl |
Type: string Buyurtma uchun to‘lov havolasi Max length: Example: |
Example
{
"paymentUrl": "example"
}