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
| 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 |
|---|---|---|---|
solution_id | String | Yes | The solutionId from Search. |
adults | Integer | Optional | Default 1. |
children | Integer | Optional | Default 0. |
infants | Integer | Optional | Default 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
| Field | Type | Description |
|---|---|---|
data.session_id | String | The pricing session. Send this as products[0].solution_id at checkout. |
data.product_type | String | Always pd9. |
data.solution | Object | The full itinerary — same shape as an enriched Search solution, with converted fees and display policies. |
data.pricingDetails | Object | Authoritative price breakdown. See below. |
data.flightDetails | Array | Pre-formatted per-journey summary (see Enrich). |
data.luggageDirectInfo | Array/Object | Through-baggage transfer information, when the provider supplies it. |
data.pricing_meta | Object | Cart-level totals. Mirrored into the top-level meta. |
meta | Object | Same content as data.pricing_meta. |
pricingDetails
Both display-currency and THB values are returned side by side.
| Field | Type | Description |
|---|---|---|
adults.count | Integer | Number of adults. |
adults.fare | Float | Per-adult fare with margin, display currency. |
adults.tax | Float | Per-adult tax, display currency. |
adults.total | Float | (fare + tax) × count, display currency. |
adults.fare_thb / adults.tax_thb / adults.total_thb | Float | The same values in THB. |
adults.admin_margin_thb / adults.partner_margin_thb | Float | Margin components in THB. |
children / infants | Object | Same structure, present only when count > 0. |
infant | Object | Duplicate of infants, kept for backward compatibility. Ignore it when summing. |
total_passengers | Integer | Sum of all passenger counts. |
grand_total | Float | Ticket total in display currency, excluding bank fee. |
grand_total_thb | Float | Ticket total in THB. |
currency_code | String | Display currency. |
bank_fee_amount | Integer | Bank fee percentage. Currently 3. |
bank_fee_price | Float | Bank fee in display currency. |
bank_fee_price_thb | Float | Bank fee in THB. |
margin_details | Object | Exchange rates, provider original prices and margin components. Useful for reconciliation. |
pricing_meta / meta
| Field | Type | Description |
|---|---|---|
currency_code | String | Display currency. |
sub_total | Float | Ticket total before bank fee, display currency. |
grand_total | Float | Same as sub_total at this stage — bank fee is listed separately. |
sub_total_thb / grand_total_thb | Float | THB equivalents. |
bank_fee_amount | Integer | Bank fee percentage (3). |
bank_fee_price / bank_fee_price_thb | Float | Calculated bank fee. |
bank_fee_sub_total / bank_fee_grand_total | Float | Totals including bank fee, display currency. |
bank_fee_sub_total_thb / bank_fee_grand_total_thb | Float | The 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.