Complete sale / Payment by gift card
const url = 'https://api-admin.billz.ai/v2/order-payment/example';const options = { method: 'POST', headers: { 'platform-id': '7d4a4c38-dd84-4902-b744-0488b80a4c01', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"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}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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 }'Error codes: 400 — input validation error; 404 — object not found; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Taken from the path; the value from the body is ignored
Header Parameters
Section titled “Header Parameters”Platform identifier. A static value is used for integrations.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Sale payments. At minimum, company_payment_type_id and paid_amount are sufficient; the sum of payments must match the sale total, otherwise 400. items: 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, etc.
object
Company payment type
Paid amount
Returned amount
Internal gift card id
Amount paid with customer bonuses
Do not accrue cashback
Sale comment
Do not send the receipt to the fiscal data operator (OFD)
Cash register
Sale date
Items with fields payment_type_id, payment_type_name, amount
object
Parent order identifier
Order number
The field name is exactly order_integratons_info, with the typo
object
Pre-receipt flag
Terminal identifier
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}{ "payments": [ { "company_payment_type_id": "429121de-a7ba-4a01-9e3d-d65999778816", "paid_amount": 125000 }, { "company_payment_type_id": "a89c2130-6083-4902-9493-100c31c3b559", "paid_amount": 10000, "gift_card_id": 4405184 } ]}Responses
Section titled “Responses”Successful response
object
Sale type, for example SALE
Whether to print the receipt
Examplegenerated
{ "order_type": "example", "should_print_cheque": true}