Checkout Endpoint
Builds the cart, re-validates the priced flight and returns the totals the customer should review before confirming. Nothing is booked at this stage.
- Endpoint:
/api/v1/unified-booking/checkout - Method:
POST
A flight can be sent alone or alongside other Onlynx products in the same products array —
they will share one booking and one payment.
:::danger solution_id at checkout
products[].solution_id must be the session_id returned by Pricing —
not the solutionId from Search. Sending the search value fails with
Flight pricing details not found or expired. Please search again.
:::
Headers
| Header | Value | Required | Description |
|---|---|---|---|
Partner-Access-Token | Base64 String | Yes | Your encrypted AES-256 time-sensitive token. |
X-Currency | Currency Code | Optional | Display currency. Defaults to your partner currency, then THB. |
Accept-Language | Language Code | Optional | e.g. en, th, my. |
Content-Type | application/json | Yes | |
Accept | application/json | Yes |
Payload Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
products | Array | Yes | At least one product. |
products[].product_type | String | Yes | pd9 for flights, all providers. |
products[].solution_id | String | Yes | The pricing session_id. |
products[].session_id | String | Optional | Provider session reference, when supplied by pricing. |
products[].passengers | Array | Optional | If sent, each entry must carry a valid passenger_type. |
products[].passengers[].passenger_type | String | Conditional | ADT, CHD or INF. Required when passengers is present. |
products[].order_note | String | Optional | Free-text note stored on the booking item. |
checkout_session_id | String | Optional | Returned in meta by a previous checkout call. Pass it back to reuse the same session instead of re-pricing. |
payment_method | String | Optional | See the payment table below. Defaults to two_c2p for fee calculation. |
payment_option | String | Optional | Must be valid for the chosen payment_method. |
coupon_code | String | Optional | Campaign coupon to preview a discount. |
:::note Passengers at checkout
Full passenger details are only required at Checkout Confirm. At
checkout you may send a minimal passengers array (just passenger_type per traveller) to
preview add-on pricing, or omit it entirely.
:::
Payment methods and options
payment_method | Valid payment_option values |
|---|---|
two_c2p | card_payment, qr_payment, online_payment, two_c2p, and other configured options |
gb_prime_pay | card_payment, qr_payment |
ktc_pay | card_payment, alipay |
tcc_pay | wechat_pay, alipay |
ksher | qr_payment, online_payment |
mm_qr | mm_qr |
aya_mm_qr | aya_mm_qr |
kbz_pay | kbz_pay_pgw |
pay_later | pay_later |
custom_guarantee | custom_guarantee |
Bank fee
A 3% bank fee is added to the payable amount, except for these combinations, which are fee-free:
pay_latertwo_c2p+qr_paymentksher+qr_paymentmm_qr+mm_qraya_mm_qr+aya_mm_qrkbz_pay+kbz_pay_pgw
Sample Payload
{
"products": [
{
"product_type": "pd9",
"solution_id": "HITIT_67f4c0a91e2b8d3a5c60f7b4",
"order_note": "Window seat preferred",
"passengers": [
{ "passenger_type": "ADT" }
]
}
],
"payment_method": "two_c2p",
"payment_option": "card_payment"
}
With add-ons
To have baggage, meals and seats reflected in the checkout total, include them on the passengers exactly as you will at confirm:
{
"products": [
{
"product_type": "pd9",
"solution_id": "HITIT_67f4c0a91e2b8d3a5c60f7b4",
"passengers": [
{
"passenger_type": "ADT",
"ancillary": {
"ancillary_id": "BAG_XBAG_20",
"session_id": "HITIT_67f4c0b21e2b8d3a5c60f7c9"
},
"ancillaries": { "0-0": "BAG_XBAG_20" },
"selected_seats": [
{
"seatNumber": "12A",
"segmentId": "0-0",
"session_id": "HITIT_67f4c0d31e2b8d3a5c60f8a2"
}
]
}
]
}
],
"payment_method": "two_c2p",
"payment_option": "card_payment"
}
Response
:::warning Keys are snake_cased here
All three /unified-booking/* endpoints pass their response through a snake-case converter.
Fields that are camelCase on the flight endpoints arrive snake_cased here:
On /flights/* | On /unified-booking/* |
|---|---|
solutionId | solution_id |
journeyList | journey_list |
segmentList | segment_list |
pricingDetails | pricing_details |
flightDetails | flight_details |
segmentBaggageMappingList | segment_baggage_mapping_list |
departureAirport | departure_airport |
All-uppercase keys (ADT, CHD) and keys containing punctuation or spaces ("0-0",
"Checked Baggage") are left untouched.
:::
data is an array with one entry per product. A flight entry is the full pricing snapshot
plus these cart fields:
| Field | Type | Description |
|---|---|---|
puid | String | Product unique ID within this cart. |
product_type | String | pd9. |
sub_total | Float | Flight total in display currency, including selected add-ons. |
grand_total | Float | Same as sub_total for a flight line. |
display_sub_total / display_grand_total | Float | Explicit display-currency totals. |
display_currency | String | Display currency code. |
session_id | String | The pricing session. |
solution | Object | Full itinerary. |
pricing_details | Object | Price breakdown, display and THB. See Pricing. |
flight_details | Array | Pre-formatted journey summaries. |
meta
| Field | Type | Description |
|---|---|---|
currency_code | String | Display currency. |
sub_total | Float | Sum of all product totals. |
grand_total | Float | sub_total minus discount, before bank fee. |
discount_amount | Float | Coupon discount applied. |
bank_fee_type | String|null | percentage when a fee applies, otherwise null. |
bank_fee_amount | Float | Fee percentage, e.g. 3. |
bank_fee_price | Float | Calculated fee. |
bank_fee_sub_total | Float | Payable before fee. |
bank_fee_grand_total | Float | Final amount payable, including bank fee. |
payable | Float | Same as bank_fee_grand_total. |
coupon_code | String|null | Echo of the submitted coupon. |
payment_method / payment_option | String|null | Echo of the submitted payment selection. |
checkout_session_id | String | Pass back on the next checkout call to reuse this session. |
expires_at | String | ISO-8601 expiry of the checkout session. |
Sample Response
Truncated.
{
"result": 1,
"message": "Checkout updated. Please review your details before continuing",
"data": [
{
"puid": "0G7KY9KNb6",
"product_type": "pd9",
"session_id": "HITIT_67f4c0a91e2b8d3a5c60f7b4",
"sub_total": 9830.00,
"grand_total": 9830.00,
"display_sub_total": 9830.00,
"display_grand_total": 9830.00,
"display_currency": "THB",
"solution": { },
"pricing_details": {
"adults": {
"count": 1,
"fare": 7200.00,
"tax": 1250.00,
"total": 8450.00,
"total_thb": 8450.00
},
"grand_total": 8450.00,
"grand_total_thb": 8450.00,
"currency_code": "THB"
},
"flight_details": [ ]
}
],
"meta": {
"currency_code": "THB",
"sub_total": 9830.00,
"grand_total": 9830.00,
"discount_amount": 0,
"bank_fee_type": "percentage",
"bank_fee_amount": 3,
"bank_fee_price": 294.90,
"bank_fee_sub_total": 9830.00,
"bank_fee_grand_total": 10124.90,
"payable": 10124.90,
"coupon_code": null,
"payment_method": "two_c2p",
"payment_option": "card_payment",
"checkout_session_id": "01JQ8R3V7K2M9XPD4T6Z0YHB5C",
"expires_at": "2026-08-26T09:15:00+07:00"
}
}
Errors
| Message | Cause |
|---|---|
Flight pricing details not found or expired. Please search again. | solution_id is not a valid pricing session, or the session expired. |
Unsupported product type: {type} | product_type is not a recognised product. |
HTTP 422 with errors | Validation failed — e.g. missing solution_id, invalid passenger_type. |
Next Step
Call Checkout Confirm with full passenger and buyer details.