HTS APIs
Every endpoint, schema and error code, rendered from the published OpenAPI files, in the order you integrate them.
/orders/{id}/purchaseRetrievePurchase a CFAR Order
Purchase a CFAR Order. When HTS is merchant of record, HTS will charge the customer during this request.
Parameters
idThe ID of the CFAR order.
Request body application/json · required
booking_referencesIDs that are relevant to the booking. It's a dictionary of key/value pairs. Check with HTS for examples of supported keys.
Responses
200The purchased CFAR order
idThe order ID that groups all contracts together.
paymentsList of payment methods used to pay for this order, for all contracts, including both the unit and any other charges in the same booking. If the partner is MOR on CFAR payment, this should also include CFAR's cost. All amount must be in the same currency as the one specified on the order. This is from the point of view of the end user.
Show fields
type:alternate_payment_method (alternate_payment_method) alternate_payment_method
typeA payment that cannot be tokenized. eg: ApplePay.
amountmethodThe method of payment.
Show fields
The method of payment.
type:apple_pay (apple_pay) apple_pay
typevalue: apple_pay
other (other) other
typevalue: other
nameName of the alternate payment method for unsupported types, e.g. Bank Transfer.
paypal (paypal) paypal
typevalue: paypal
venmo (venmo) venmo
typevalue: venmo
loyalty_program (loyalty_program) loyalty_program
typevalue: loyalty_program
amountnameThe name of the of the loyalty program, e.g. points, miles, cash_rewards, etc. Required, to ensure that the amounts are refunded to the same loyalty program used during purchase.
unitsThe unit to currency exchange rate is implicit from the amount in the Payment object and this number of points.
non_refundable_discounts (non_refundable_discounts) non_refundable_discounts
typeA discount to the booking that won't be refunded if the booking is canceled or CFAR is exercised. eg: $5 off first time booking.
amountnameThe name of the non-refundable discount, e.g. first time booker incentive, etc. Set if useful for refund during exercise, e.g. for display, book keeping, etc.
not_provided (not_provided2) not_provided2
typevalue: not_provided
amountpayment_card (payment_card) payment_card
typeA credit or debit card. Must be tokenized (refer to above documentation).
amountidentifierShow fields
type:details (details) details
typevalue: details
last_four_digitsLast four digits of the payment card.
[0-9]{4}expiration_monthTwo digits expiration month of the payment card.
[0-9]{2}expiration_yearFour digits expiration year of the payment card.
[0-9]{4}token (token) token
typevalue: token
valueThe token representing a credit card or a debit card. Used to process refunds to the original form of payment.
reseller_controlled (reseller_controlled) reseller_controlled
typeThe partner does not charge the user directly and thus does not have payment information.
amountcontractsThe list of contracts included in this order.
Show fields
idCFAR contract ID
pricePrice for CFAR.
Show fields
total_amountThe total amount for CFAR, including base and taxes.
base_amountThe base amount for CFAR.
taxesThe taxes for this price.
Show fields
codeCode representing this tax.
amountTotal amount of the tax.
payoutBreakdown of what will be paid upon exercise.
Show fields
amountThe maximum amount to issue to the user if they exercise CFAR.
percentageThe payout defined as a percentage of the unit's booking_amount. Must be a number between 0 and 100.
price_includedIf CFAR price is included in the payout amount.
expires_atThe instant the purchased contract will expire as a UTC (RFC3339) datetime.
statusCurrent status of the contract.
draftedconfirmedexercisedvoidedcanceledcurrencyCurrency of all money values in this contract. 3-letter ISO 4217 code.
unit_reservation_id The ID of the unit reservation (in the partner's system) associated with this contract.
For single-unit bookings, this may be the same as reservation_id.
agent_commissionCommission payable to the travel agent.
Show fields
amountMonetary amount payable to the agent, in the offer's currency.
payable_dateInforms the agent of when their commission becomes payable — agents should not expect payment before this date. Commissions are not paid if the reservation is cancelled - the traveller must check-in.
currencyCurrency of all money values in this order and associated contracts. 3-letter ISO 4217 code.
reservation_idThe ID of the reservation (in the partner's system) associated with this order.
400Syntactic errors were encountered while handling the request
messagecodeExample
[
{
"message": "string",
"code": "string"
}
]401The client could not be authenticated
403The authenticated client does not have permission to call this endpoint
404The requested resource could not be found
422Semantic errors were encountered while handling the request
code:contract_not_found (contract_not_found) contract_not_found
messageA human-readable message describing the error
codeoffer_already_purchased (offer_already_purchased1) offer_already_purchased1
messageA human-readable message describing the error
codeExample
[
{
"message": "string",
"code": "string"
}
]499The client cancelled the request
500The server encountered an internal error
curl -X PUT "https://fintech.staging.htsapis.com/lodging-cfar/v2/orders/<id>/purchase" \
-H "X-Api-Key: $HTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"booking_references": {}
}'{
"id": "string",
"payments": [
{
"type": "alternate_payment_method",
"amount": "173.24",
"method": {
"type": "string"
}
}
],
"contracts": [
{
"id": "string",
"price": {
"total_amount": "12.00",
"base_amount": "10.00",
"taxes": [
{
"code": "VAT",
"amount": "20.00"
}
]
},
"payout": {
"amount": "450",
"percentage": 100,
"price_included": true
},
"expires_at": "2026-12-10T15:00:00Z",
"unit_reservation_id": "string",
"status": "drafted",
"agent_commission": {
"amount": "1.20",
"payable_date": "2026-08-15"
},
"currency": "USD"
}
],
"reservation_id": "string",
"currency": "USD"
}Examples are generated from the schema where the spec publishes none; field values are illustrative.
