Skip to main content

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

HeaderValueRequiredDescription
Partner-Access-TokenBase64 StringYesYour encrypted AES-256 time-sensitive token.
X-CurrencyCurrency CodeOptionalDisplay currency. Defaults to your partner currency, then THB.
Accept-LanguageLanguage CodeOptionale.g. en, th, my.
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes

Payload Parameters

ParameterTypeRequiredDescription
buyerObjectYesThe person paying. See below.
productsArrayYesProducts to book.
payment_methodStringYesSee Checkout for valid values.
payment_optionStringYesMust be valid for the chosen payment_method.
coupon_codeStringOptionalCampaign coupon to redeem.
user_idIntegerOptionalEnd-user identifier.
nameStringOptionalCardholder name for card payments.
card_numberStringConditionalRequired for gb_prime_pay + card_payment.
expiration_monthStringConditionalRequired for gb_prime_pay + card_payment.
expiration_yearStringConditionalRequired for gb_prime_pay + card_payment.
security_codeStringConditionalRequired for gb_prime_pay + card_payment.
payment_typeStringOptionalktc_pay only: full_payment or installment.
payment_periodStringConditionalktc_pay only. Required when payment_type is installment. Values 110.

buyer

ParameterTypeRequiredDescription
first_nameStringYes
last_nameStringYes
emailStringYesValid email. Booking confirmation is sent here.
nationalityStringYes2-letter country code, e.g. MM.
phone_codeStringYesDial code, digits only, max 5, e.g. 66.
phone_numberStringYesDigits only, max 15.

Flight product (pd9)

ParameterTypeRequiredDescription
product_typeStringYespd9.
solution_idStringYesThe session_id from Pricing.
trip_typeStringYes1 One Way, 2 Round Trip, 3 Multi City.
contact_first_nameStringYesFlight contact person.
contact_last_nameStringYes
contact_emailStringYesValid email.
contact_mobile_country_codeStringOptionalDigits only.
contact_mobile_phone_numberStringOptionalDigits only.
is_mm_nationalityBooleanOptionalMyanmar-national fare flag.
passengersArrayYesAt least one. See below.
order_noteStringOptionalStored on the booking item.

Passenger object

ParameterTypeRequiredDescription
first_nameStringYesExactly as printed in the travel document.
last_nameStringYesExactly as printed in the travel document.
birth_dateStringYesY-m-d.
typeStringYesadult, child or infant.
genderStringYesmale or female.
nationality_codeStringYes2-letter country code.
document_typeStringYespassport or nrc.
document_numberStringYesValidated against document_type — see below.
document_issue_place_codeStringYes2-letter country code.
document_expire_dateStringConditionalY-m-d. Required when document_type is passport.
mobile_country_codeStringOptionalDigits only.
mobile_phone_numberStringOptionalDigits only.
ancillaryObjectOptional{ "ancillary_id": "...", "session_id": "..." }. Both keys required together.
ancillariesObject/ArrayOptionalMultiple add-ons keyed by segment. See Ancillary.
selected_seatsArrayOptionalChosen seats. See Seat Map.
seat_numberStringOptionalLegacy single-seat form; applies to segment 0-0.

ADT, CHD and INF are also accepted as type values.

Document number formats

document_typePatternExampleFailure message
passport5–15 alphanumeric charactersAB1234567The document number must be a valid Passport format.
nrcMyanmar NRC1/AhGaYa(N)123456The 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"
}
}
FieldTypeDescription
invoice_noStringPayment reference. Use it as invoice_no at Booking Result.
booking_numberStringThe booking number. For a flight-only cart this is the airline booking number.
grand_totalFloatTotal including bank fee.
currency_codeStringCurrency 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

HTTPBodyCause
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.