HTS APIs
Every endpoint, schema and error code, rendered from the published OpenAPI files, in the order you integrate them.
/orders/{id}/user_projected_payoutsRetrieveGet User Projected Payouts
Returns the projected outcome for the user if they exercised CFAR on the given contracts within this order,
in the same shape as an exercise quote's user_outcome: the legs the partner refunds by payment method, the
HTS-funded leg, and the property-funded leg, combined across the included contracts. Read-only; does not
create an exercise quote.
The projection is evaluated as of just before the contracts expire, so cancellation penalties are fully accrued. For bookings with a pay-later payment schedule, the projection assumes the schedule is fully paid (the maximum refund); a customer who exercises before completing the schedule would receive less.
With full_order, contracts that cannot be projected (exercised, voided, cancelled, expired or not
purchased) are skipped, and 422 is returned only if none of the order's contracts can be projected. With
by_contracts, 422 is returned if any requested contract cannot be projected. The body carries the
specific reason for each contract.
Parameters
idThe ID of the CFAR order.
Request body application/json · required
type:by_contracts (by_contracts) by_contracts
typevalue: by_contracts
contract_idsfull_order (full_order) full_order
typevalue: full_order
Responses
200The projected payout breakdown. For bookings with a pay-later payment schedule, the breakdown assumes the schedule is fully paid (the maximum refund); a customer who exercises before completing the schedule would receive less.
currencyThe currency all payout amounts are in.
contract_ids The contracts included in this projection. With full_order, contracts that cannot be projected
(exercised, voided, cancelled, expired or not purchased) are left out.
user_outcome The projected outcome for the user across all included contracts, in the same shape as an exercise quote's
user_outcome. Legs refunded on the same payment method are combined into one entry, the same way the
exercise quote combines them: a payment card is matched on its token, or on its last four digits and
expiration if no token was given; a loyalty program on its name, with units summed; an alternate payment
method on its method; reseller-controlled and not-provided legs are each combined into one entry.
Show fields
total_payout_amountTotal amount user will receive upon exercising CFAR. Sum of all other payments in this model.
payouts_from_partnerPayments that will be paid out by the partner.
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.
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.
amountpayout_from_htsPayment that will be paid out by HTS.
Show fields
amountpayout_from_lodging Payment that will be paid out by the lodging property directly to the user.
This may only be defined if merchant_of_record_on_reservation is lodging.
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_exercised (contract_exercised) contract_exercised
messageA human-readable message describing the error
codeexpired (expired1) expired1
messageA human-readable message describing the error
codefully_voided (fully_voided1) fully_voided1
messageA human-readable message describing the error
codenot_purchased (not_purchased3) not_purchased3
messageA human-readable message describing the error
codepurchase_payments_not_on_contract (purchase_payments_not_on_contract) purchase_payments_not_on_contract
messageA human-readable message describing the error
codereservation_cancelled (reservation_cancelled2) reservation_cancelled2
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 POST "https://fintech.staging.htsapis.com/lodging-cfar/v2/orders/<id>/user_projected_payouts" \
-H "X-Api-Key: $HTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "string",
"contract_ids": [
"string"
]
}'{
"currency": "USD",
"contract_ids": [
"string"
],
"user_outcome": {
"total_payout_amount": "173.24",
"payouts_from_partner": [
{
"type": "alternate_payment_method",
"amount": "173.24",
"method": {
"type": "string"
}
}
],
"payout_from_hts": {
"amount": "string"
},
"payout_from_lodging": "string"
}
}Examples are generated from the schema where the spec publishes none; field values are illustrative.
