Kontentga o'tish

Sotuvni yakunlash / Sovg'a kartasi bilan to'lash

POST
/v2/order-payment/{order_id}
curl --request POST \
--url https://api-admin.billz.ai/v2/order-payment/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01' \
--data '{ "payments": [ { "company_payment_type_id": "c6e84d9b-0ef0-4d5a-886d-147c74a9b051", "paid_amount": 10000, "returned_amount": 0 }, { "company_payment_type_id": "fe95ebe4-ae02-47d2-8d72-3c030a8a1035", "paid_amount": 100000, "returned_amount": 0 } ], "comment": "test123", "with_cashback": 0, "without_cashback": false, "skip_ofd": false }'

Xato kodlari: 400 — kiruvchi ma’lumotlar validatsiya xatosi; 404 — obyekt topilmadi; 401, 403, 429, 500 — barcha metodlar uchun umumiy. Tana formatlari va semantikasi: Javob kodlari va xatolar.

order_id
required
string

Yo’ldan olinadi; tanadagi qiymat e’tiborga olinmaydi

platform-id
string
default: 7d4a4c38-dd84-4902-b744-0488b80a4c01

Platforma identifikatori. Integratsiyalar uchun statik qiymat ishlatiladi.

Media typeapplication/json
object
payments
required

Sotuv to’lovlari. Minimal holatda company_payment_type_id va paid_amount yetarli; to’lovlar summasi sotuv summasiga teng bo’lishi kerak, aks holda 400. elementlar: id, company_payment_type_id, payment_sub_type_id, payment_sub_type_name, company_payment_type{id,name,payment_type_id}, paid_amount, returned_amount, gift_card_id, is_certificate, is_voucher, is_ingenico, card_type, card_rrn, card_number, qr_payment_*, pptid, document_number, operation_id, stan, approval_code, ref_number, terminal_id, merchant_id va boshqalar

Array<object>
object
id
string
company_payment_type_id
required

Kompaniya to’lov turi

string format: uuid
payment_sub_type_id
string
payment_sub_type_name
string
paid_amount
required

To’langan summa

number
returned_amount

Qaytarilgan summa

number
gift_card_id

Sovg’a kartasining ichki id si

integer
is_certificate
boolean
is_voucher
boolean
is_ingenico
boolean
card_type
string
card_rrn
string
card_number
string
document_number
string
operation_id
string
terminal_id
string
merchant_id
string
with_cashback

Mijoz bonuslari bilan to’lov summasi

number format: double
0
without_cashback

Keshbekni hisoblamaslik

boolean
comment

Sotuvga izoh

string
skip_ofd

Chekni OFDga yubormaslik

boolean
cashbox_id

Kassa

string
sold_at

Sotuv sanasi

string
insufficient_amounts

Payment_type_id, payment_type_name, amount maydonlariga ega elementlar

Array<object>
object
payment_type_id
string
payment_type_name
string
amount
number
skip_deleted_company_payment_type_check
Array<string>
parent_id

Ota buyurtma identifikatori

string
order_number

Buyurtma raqami

string
order_integratons_info

Maydon nomi aynan order_integratons_info, imlo xatosi bilan

object
key
additional properties
any
upsert_payment_infos
boolean
is_precheck

Dastlabki chek belgisi

boolean
terminal_id

Terminal identifikatori

string
Examples
{
"payments": [
{
"company_payment_type_id": "c6e84d9b-0ef0-4d5a-886d-147c74a9b051",
"paid_amount": 10000,
"returned_amount": 0
},
{
"company_payment_type_id": "fe95ebe4-ae02-47d2-8d72-3c030a8a1035",
"paid_amount": 100000,
"returned_amount": 0
}
],
"comment": "test123",
"with_cashback": 0,
"without_cashback": false,
"skip_ofd": false
}

Muvaffaqiyatli javob

Media typeapplication/json
object
order_type

Sotuv turi, masalan SALE

string
should_print_cheque

Chekni chop etish kerakmi

boolean
Examplegenerated
{
"order_type": "example",
"should_print_cheque": true
}