Skip to main content

Pricing Endpoint

Re-prices the chosen itinerary against the provider, applies margins and currency conversion, and opens a pricing session that checkout will book against.

  • Endpoint: /api/v1/flights/pricing
  • Method: POST

This call is mandatory. The session_id it returns is the value you must send as products[0].solution_id at Checkout and Checkout Confirm.

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
solution_idStringYesThe solutionId from Search.
adultsIntegerOptionalDefault 1.
childrenIntegerOptionalDefault 0.
infantsIntegerOptionalDefault 0.

Passenger counts must match what you will send at checkout — the price is calculated from them.

Sample Payload

{
"solution_id": "HITIT_9f2c1b7d4e8a3f6c0d5b2a91e7c48d63",
"adults": 1,
"children": 0,
"infants": 0
}

Response

FieldTypeDescription
data.session_idStringThe pricing session. Send this as products[0].solution_id at checkout.
data.product_typeStringAlways pd9.
data.solutionObjectThe full itinerary — same shape as an enriched Search solution, with converted fees and display policies.
data.pricingDetailsObjectAuthoritative price breakdown. See below.
data.flightDetailsArrayPre-formatted per-journey summary (see Enrich).
data.luggageDirectInfoArray/ObjectThrough-baggage transfer information, when the provider supplies it.
data.pricing_metaObjectCart-level totals. Mirrored into the top-level meta.
metaObjectSame content as data.pricing_meta.

pricingDetails

Both display-currency and THB values are returned side by side.

FieldTypeDescription
adults.countIntegerNumber of adults.
adults.fareFloatPer-adult fare with margin, display currency.
adults.taxFloatPer-adult tax, display currency.
adults.totalFloat(fare + tax) × count, display currency.
adults.fare_thb / adults.tax_thb / adults.total_thbFloatThe same values in THB.
adults.admin_margin_thb / adults.partner_margin_thbFloatMargin components in THB.
children / infantsObjectSame structure, present only when count > 0.
infantObjectDuplicate of infants, kept for backward compatibility. Ignore it when summing.
total_passengersIntegerSum of all passenger counts.
grand_totalFloatTicket total in display currency, excluding bank fee.
grand_total_thbFloatTicket total in THB.
currency_codeStringDisplay currency.
bank_fee_amountIntegerBank fee percentage. Currently 3.
bank_fee_priceFloatBank fee in display currency.
bank_fee_price_thbFloatBank fee in THB.
margin_detailsObjectExchange rates, provider original prices and margin components. Useful for reconciliation.

pricing_meta / meta

FieldTypeDescription
currency_codeStringDisplay currency.
sub_totalFloatTicket total before bank fee, display currency.
grand_totalFloatSame as sub_total at this stage — bank fee is listed separately.
sub_total_thb / grand_total_thbFloatTHB equivalents.
bank_fee_amountIntegerBank fee percentage (3).
bank_fee_price / bank_fee_price_thbFloatCalculated bank fee.
bank_fee_sub_total / bank_fee_grand_totalFloatTotals including bank fee, display currency.
bank_fee_sub_total_thb / bank_fee_grand_total_thbFloatThe same including bank fee, in THB.

:::tip Which number do I show the customer? bank_fee_grand_total is the amount payable including the bank fee. grand_total is the ticket price alone. Both are in the currency you requested via X-Currency. :::

Sample Response

Truncated.

{
"result": 1,
"message": "Pricing retrieved successfully",
"data": {
"session_id": "HITIT_67f4c0a91e2b8d3a5c60f7b4",
"product_type": "pd9",
"solution": {
"solutionId": "HITIT_9f2c1b7d4e8a3f6c0d5b2a91e7c48d63",
"provider": "HITIT",
"currency_code": "THB",
"currency_symbol": "THB",
"journeyList": [ ],
"segmentBaggageMappingList": [ ],
"segmentRefundChangeRuleMappingList": [ ]
},
"pricingDetails": {
"adults": {
"count": 1,
"fare": 7200.00,
"tax": 1250.00,
"total": 8450.00,
"fare_thb": 7200.00,
"tax_thb": 1250.00,
"total_thb": 8450.00,
"admin_margin_thb": 400.00,
"partner_margin_thb": 200.00
},
"total_passengers": 1,
"grand_total": 8450.00,
"grand_total_thb": 8450.00,
"currency_code": "THB",
"bank_fee_amount": 3,
"bank_fee_price": 253.50,
"bank_fee_price_thb": 253.50,
"margin_details": {
"exchange_rates": {
"provider_to_thb": 36.5,
"thb_to_display": 1,
"provider_currency": "USD",
"display_currency": "THB"
}
}
},
"flightDetails": [ ],
"luggageDirectInfo": [ ],
"pricing_meta": {
"currency_code": "THB",
"sub_total": 8450.00,
"grand_total": 8450.00,
"sub_total_thb": 8450.00,
"grand_total_thb": 8450.00,
"bank_fee_amount": 3,
"bank_fee_price": 253.50,
"bank_fee_price_thb": 253.50,
"bank_fee_sub_total": 8450.00,
"bank_fee_grand_total": 8703.50,
"bank_fee_sub_total_thb": 8450.00,
"bank_fee_grand_total_thb": 8703.50
}
},
"meta": {
"currency_code": "THB",
"sub_total": 8450.00,
"grand_total": 8450.00,
"bank_fee_amount": 3,
"bank_fee_price": 253.50,
"bank_fee_grand_total": 8703.50
}
}

Session Expiry

The pricing session is stored server-side and is short-lived. If the customer lingers on the passenger form, call this endpoint again before checkout to refresh it. Using an expired session produces:

{
"result": 0,
"message": "Flight pricing details not found or expired. Please search again."
}

Next Step

Optionally offer add-ons via Ancillary and Seat Map, then proceed to Checkout.