API reference

HTS APIs

Every endpoint, schema and error code, rendered from the published OpenAPI files, in the order you integrate them.

PUT/orders/{id}/cancelRetrieve

Cancel a CFAR Order

https://fintech.staging.htsapis.com/lodging-cfar/v2/orders/{id}/cancel

Cancel a CFAR Order. This will cancel all contracts associated with the order, and no further action can be taken on the order or any of its contracts. This will not refund any CFAR costs associated with the booking. Request body is optional for backwards compatibility - if not provided, reason defaults to Unknown.

Parameters

id
path · string
required

The ID of the CFAR order.

Request body application/json

reason
reason1 · one of 2
required

The reason for cancelling the CFAR order.

Show fields

The reason for cancelling the CFAR order.

Exactly one of the following, selected by type:
charge_back (charge_back) charge_back
type
string
required

value: charge_back

other (other2) other2
type
string
required

value: other

reason
string
required
Length ≥ 1

Responses

200The cancelled CFAR order
id
string
required

The order ID that groups all contracts together.

payments
array of payment
required

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

Items ≥ 1
Show fields
Array of payment · one of 6 · List 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.
Items ≥ 1
Exactly one of the following, selected by type:
alternate_payment_method (alternate_payment_method) alternate_payment_method
type
string
required

A payment that cannot be tokenized. eg: ApplePay.

amount
string
required
method
method · one of 4
required

The method of payment.

Show fields

The method of payment.

Exactly one of the following, selected by type:
apple_pay (apple_pay) apple_pay
type
string
required

value: apple_pay

other (other) other
type
string
required

value: other

name
string
required

Name of the alternate payment method for unsupported types, e.g. Bank Transfer.

Length ≥ 1
paypal (paypal) paypal
type
string
required

value: paypal

venmo (venmo) venmo
type
string
required

value: venmo

loyalty_program (loyalty_program) loyalty_program
type
string
required

value: loyalty_program

amount
string
required
name
string
required

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

Length ≥ 1
units
string
required

The 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
type
string
required

A discount to the booking that won't be refunded if the booking is canceled or CFAR is exercised. eg: $5 off first time booking.

amount
string
required
name
string
required

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

Length ≥ 1
not_provided (not_provided2) not_provided2
type
string
required

value: not_provided

amount
string
required
payment_card (payment_card) payment_card
type
string
required

A credit or debit card. Must be tokenized (refer to above documentation).

amount
string
required
identifier
identifier · one of 2
required
Show fields
Exactly one of the following, selected by type:
details (details) details
type
string
required

value: details

last_four_digits
string
required

Last four digits of the payment card.

Pattern [0-9]{4}
expiration_month
string
required

Two digits expiration month of the payment card.

Pattern [0-9]{2}
expiration_year
string
required

Four digits expiration year of the payment card.

Pattern [0-9]{4}
token (token) token
type
string
required

value: token

value
string
required

The token representing a credit card or a debit card. Used to process refunds to the original form of payment.

Length ≥ 1
reseller_controlled (reseller_controlled) reseller_controlled
type
string
required

The partner does not charge the user directly and thus does not have payment information.

amount
string
required
contracts
array of cfar_contract
required

The list of contracts included in this order.

Items ≥ 1
Show fields
Array of cfar_contract · The list of contracts included in this order.
Items ≥ 1
id
string
required

CFAR contract ID

price
cfar_price
required

Price for CFAR.

Show fields
total_amount
string
required

The total amount for CFAR, including base and taxes.

base_amount
string
required

The base amount for CFAR.

taxes
array of tax

The taxes for this price.

Show fields
Array of tax · The taxes for this price.
code
string
required

Code representing this tax.

Length ≥ 1
amount
string
required

Total amount of the tax.

payout
payout
required

Breakdown of what will be paid upon exercise.

Show fields
amount
string
required

The maximum amount to issue to the user if they exercise CFAR.

percentage
integer · int32
required

The payout defined as a percentage of the unit's booking_amount. Must be a number between 0 and 100.

price_included
boolean
required

If CFAR price is included in the payout amount.

expires_at
string · date-time
required

The instant the purchased contract will expire as a UTC (RFC3339) datetime.

status
string enum
required

Current status of the contract.

Values draftedconfirmedexercisedvoidedcanceled
currency
string
required

Currency of all money values in this contract. 3-letter ISO 4217 code.

unit_reservation_id
string

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.

Length ≥ 1
agent_commission
agent_commission

Commission payable to the travel agent.

Show fields
amount
string
required

Monetary amount payable to the agent, in the offer's currency.

payable_date
string · date
required

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

currency
string
required

Currency of all money values in this order and associated contracts. 3-letter ISO 4217 code.

reservation_id
string

The ID of the reservation (in the partner's system) associated with this order.

Length ≥ 1
400Syntactic errors were encountered while handling the request
Array of error
message
string
required
code
string
required
Example
[
  {
    "message": "string",
    "code": "string"
  }
]
401The client could not be authenticated
No body.
403The authenticated client does not have permission to call this endpoint
No body.
404The requested resource could not be found
No body.
422Semantic errors were encountered while handling the request
Array of cancel_cfar_order_error · one of 3
Items ≥ 1
Exactly one of the following, selected by code:
contract_expired (contract_expired) contract_expired
message
string
required

A human-readable message describing the error

code
string
required
invalid_contract_status (invalid_contract_status1) invalid_contract_status1
message
string
required

A human-readable message describing the error

code
string
required
invalid_order_status (invalid_order_status1) invalid_order_status1
message
string
required

A human-readable message describing the error

code
string
required
Example
[
  {
    "message": "string",
    "code": "string"
  }
]
499The client cancelled the request
No body.
500The server encountered an internal error
No body.
Request
curl -X PUT "https://fintech.staging.htsapis.com/lodging-cfar/v2/orders/<id>/cancel" \
  -H "X-Api-Key: $HTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": {
    "type": "string"
  }
}'
Response 200
{
  "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.