Checkout Confirm Endpoint
Creates the booking. This is the call that produces a PNR with the airline, persists the booking, and sends the pending-booking email to the contact address.
- Endpoint:
/api/v1/unified-booking/checkout/confirm - Method:
POST - Rate limit: 20 requests per 2 minutes.
Send the same products array you sent at Checkout, now with full passenger
details, plus a buyer object.
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 |
|---|---|---|---|
buyer | Object | Yes | The person paying. See below. |
products | Array | Yes | Products to book. |
payment_method | String | Yes | See Checkout for valid values. |
payment_option | String | Yes | Must be valid for the chosen payment_method. |
coupon_code | String | Optional | Campaign coupon to redeem. |
user_id | Integer | Optional | End-user identifier. |
name | String | Optional | Cardholder name for card payments. |
card_number | String | Conditional | Required for gb_prime_pay + card_payment. |
expiration_month | String | Conditional | Required for gb_prime_pay + card_payment. |
expiration_year | String | Conditional | Required for gb_prime_pay + card_payment. |
security_code | String | Conditional | Required for gb_prime_pay + card_payment. |
payment_type | String | Optional | ktc_pay only: full_payment or installment. |
payment_period | String | Conditional | ktc_pay only. Required when payment_type is installment. Values 1–10. |
buyer
| Parameter | Type | Required | Description |
|---|---|---|---|
first_name | String | Yes | |
last_name | String | Yes | |
email | String | Yes | Valid email. Booking confirmation is sent here. |
nationality | String | Yes | 2-letter country code, e.g. MM. |
phone_code | String | Yes | Dial code, digits only, max 5, e.g. 66. |
phone_number | String | Yes | Digits only, max 15. |
Flight product (pd9)
| Parameter | Type | Required | Description |
|---|---|---|---|
product_type | String | Yes | pd9. |
solution_id | String | Yes | The session_id from Pricing. |
trip_type | String | Yes | 1 One Way, 2 Round Trip, 3 Multi City. |
contact_first_name | String | Yes | Flight contact person. |
contact_last_name | String | Yes | |
contact_email | String | Yes | Valid email. |
contact_mobile_country_code | String | Optional | Digits only. |
contact_mobile_phone_number | String | Optional | Digits only. |
is_mm_nationality | Boolean | Optional | Myanmar-national fare flag. |
passengers | Array | Yes | At least one. See below. |
order_note | String | Optional | Stored on the booking item. |
Passenger object
| Parameter | Type | Required | Description |
|---|---|---|---|
first_name | String | Yes | Exactly as printed in the travel document. |
last_name | String | Yes | Exactly as printed in the travel document. |
birth_date | String | Yes | Y-m-d. |
type | String | Yes | adult, child or infant. |
gender | String | Yes | male or female. |
nationality_code | String | Yes | 2-letter country code. |
document_type | String | Yes | passport or nrc. |
document_number | String | Yes | Validated against document_type — see below. |
document_issue_place_code | String | Yes | 2-letter country code. |
document_expire_date | String | Conditional | Y-m-d. Required when document_type is passport. |
mobile_country_code | String | Optional | Digits only. |
mobile_phone_number | String | Optional | Digits only. |
ancillary | Object | Optional | { "ancillary_id": "...", "session_id": "..." }. Both keys required together. |
ancillaries | Object/Array | Optional | Multiple add-ons keyed by segment. See Ancillary. |
selected_seats | Array | Optional | Chosen seats. See Seat Map. |
seat_number | String | Optional | Legacy single-seat form; applies to segment 0-0. |
ADT, CHD and INF are also accepted as type values.
Document number formats
document_type | Pattern | Example | Failure message |
|---|---|---|---|
passport | 5–15 alphanumeric characters | AB1234567 | The document number must be a valid Passport format. |
nrc | Myanmar NRC | 1/AhGaYa(N)123456 | The document number must be a valid Myanmar NRC format (e.g. 1/AhGaYa(N)123456). |
Sample Payload
{
"buyer": {
"first_name": "Alex",
"last_name": "Doe",
"email": "buyer@example.com",
"nationality": "MM",
"phone_code": "66",
"phone_number": "800000001"
},
"products": [
{
"product_type": "pd9",
"solution_id": "HITIT_67f4c0a91e2b8d3a5c60f7b4",
"trip_type": "1",
"contact_first_name": "Alex",
"contact_last_name": "Doe",
"contact_email": "buyer@example.com",
"contact_mobile_country_code": "66",
"contact_mobile_phone_number": "800000001",
"order_note": "Window seat preferred",
"passengers": [
{
"first_name": "John",
"last_name": "Doe",
"birth_date": "1990-05-14",
"type": "adult",
"gender": "male",
"nationality_code": "TH",
"document_type": "passport",
"document_number": "AB1234567",
"document_issue_place_code": "TH",
"document_expire_date": "2030-01-31",
"mobile_country_code": "66",
"mobile_phone_number": "800000000",
"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"
}
Sample Response
{
"result": 1,
"message": "Booking processed successfully",
"data": {
"invoice_no": "7992370634757",
"booking_number": "650E23E81BFC54D8",
"grand_total": 10124.90,
"currency_code": "THB"
}
}
| Field | Type | Description |
|---|---|---|
invoice_no | String | Payment reference. Use it as invoice_no at Booking Result. |
booking_number | String | The booking number. For a flight-only cart this is the airline booking number. |
grand_total | Float | Total including bank fee. |
currency_code | String | Currency of grand_total. |
:::note Booking number For a flight booking the master booking number is replaced with the provider's flight booking number after the PNR is created, so the value you get back is the one to use everywhere else — including Booking Detail. :::
Add-on Pricing Is Re-derived
Every ancillary and seat price is recalculated server-side from the session_id you supplied
and the stored priced snapshot. Prices sent by the client are ignored. If a session has
expired, the add-on is dropped or the booking fails rather than being charged at a stale
price.
Errors
| HTTP | Body | Cause |
|---|---|---|
200 | {"result": 0, "message": "Invalid booking data"} | Validation of the product payload failed at the service layer. |
200 | {"result": 0, "message": "Flight pricing details not found or expired. Please search again."} | Pricing session expired. Re-run Pricing. |
422 | {"message": "...", "errors": {...}} | Field validation failed. Keys are dotted paths, e.g. products.0.passengers.0.document_number. |
An unpaid booking is automatically cancelled after the configured hold window (30 minutes by default), so complete payment promptly.
Next Step
Call the Payment Request API (/api/v1/unified-payment/request) to take payment, then
Booking Result to read the final status.