Skip to content

Complete sale / Payment by gift card

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 }'

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.

order_id
required
string

Taken from the path; the value from the body is ignored

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

Platform identifier. A static value is used for integrations.

Media typeapplication/json
object
payments
required

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.

Array<object>
object
id
string
company_payment_type_id
required

Company payment type

string format: uuid
payment_sub_type_id
string
payment_sub_type_name
string
paid_amount
required

Paid amount

number
returned_amount

Returned amount

number
gift_card_id

Internal gift card id

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

Amount paid with customer bonuses

number format: double
0
without_cashback

Do not accrue cashback

boolean
comment

Sale comment

string
skip_ofd

Do not send the receipt to the fiscal data operator (OFD)

boolean
cashbox_id

Cash register

string
sold_at

Sale date

string
insufficient_amounts

Items with fields payment_type_id, payment_type_name, amount

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

Parent order identifier

string
order_number

Order number

string
order_integratons_info

The field name is exactly order_integratons_info, with the typo

object
key
additional properties
any
upsert_payment_infos
boolean
is_precheck

Pre-receipt flag

boolean
terminal_id

Terminal identifier

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
}

Successful response

Media typeapplication/json
object
order_type

Sale type, for example SALE

string
should_print_cheque

Whether to print the receipt

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