Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Hopper Cancel For Any Reason (CFAR) API

**What is Cancel For Any Reason?**Cancel For Any Reason (CFAR) enables airlines to offer refundability as an ancillary with HTS powering the dynamic pricing and supporting the refund cost.******How it works**There are two distinct flows for CFAR:- The _purchase flow_, enabling customers to purchase the product within the airline’s booking flow.- The _exercise flow_, enabling customers to cancel their booking and get a refund.For each of these flows, the first step is to [Create a Session](#operation/postSessions)Both the purchase and the exercise of CFAR should be tracked by the airline in the airline’s Passenger Name Record (PNR) according to the applicable industry standards.******Purchase flow**CFAR follows the industry standard of a two step purchase process.1. Once the user is landing on the page displaying the CFAR offer, the airline will call the [Create CFAR Offers](#operation/postCfar_offers) endpoint. CFAR Offers can be created at multiple granular levels. The request must include a description of the Itinerary for which the offers are requested. The response will contain - the price for the product (`premium`), - the refundable amount (`coverage`), - the UTC date and time until when the cancellation can be requested (`contract_expiry_date_time`) - and the description of the offer in the available languages (`contents`).2. If a user is attaching CFAR to his booking, the airline will call the [Create CFAR Contract](#operation/postCfar_contracts) endpoint. The request must include the selected `offer_id`(s) and a description of the Itinerary for which the contract is requested, which must match the one of the Offer(s). At this stage, the CFAR Contract is only _created_. It will be confirmed once the customer has made the payment, which can be done in two ways: 1. If the airline is the Merchant of Records (MoR), it will capture the payment for the totalamount of the booking, including the CFAR fee amount. Upon a successful payment, the airline will call the Update CFAR Contract Status endpoint to set the CFAR contract to _confirmed_. The airline will track this purchase in its PNR following the industry standards that apply to ticketing or ticketless carriers. 2. If HTS is the Merchant of Records (MoR), the airline will capture the payment for the amountof the booking excluding the CFAR fee, while HTS will capture the payment for the CFAR fee amount. Upon a successful payment of its portion, the airline will call the Process CFAR Payment endpoint for HTS to capture the payment for the CFAR fee amount. Once successful, the CFAR contract will be set to _confirmed_. The airline will track this purchase in its PNR.The details of a CFAR contract can be retrieved at any time through the Get a CFAR Contract endpoint.******Exercise flow**CFAR exercise follows a two step process.1. The user will request the exercise from the “Manage My Bookings” (MMB) page of the airline, through a dedicated Call to action displayed based on the tracker added to the PNR at the time of booking. Once the user is requesting the exercise, the airline will call the [Create CFAR Exercise](#operation/postCfar_contract_exercises) endpoint to authorize the exercise. The request must include the Contract ID, the Itinerary at the time of the exercise request and some optional information on the refund option that may be offered by the airline. If eligible to the exercise, the response will contain the refundable amounts, both in cash and Future Travel Credit (FTC) if applicable.2. Once the user has followed the steps of the refund portal and confirmed the cancellation request, HTS will make a call back to the airline to launch the PNR update flow on the airline’s end. The actual PNR update flow depends on each airline’s specifics and is not described here. Upon a successful update of the PNR, the airline will confirm the exercise to HTS by calling the [Complete CFAR Exercise](#operation/putCfar_contract_exercisesIdMark_completed) endpoint.

Hopper Cancel For Any Reason (CFAR) API is one of 5 APIs that Hopper publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Cancel For Any Reason (CFAR). The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 11 operations across 11 paths, and defines 79 schemas. It is described by OpenAPI 3.0.3, at version v1.1.

Requests are made against a single base URL, https://airlines-api.hopper.com/airline/v1.1.

11 operations 11 paths 79 schemas 2 GET5 POST4 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.3
API Version
v1.1
Base URL
https://airlines-api.hopper.com/airline/v1.1
Authentication
HTTP Bearer, API Key
Resource Areas
1

Authentication & Security 2

Hopper Cancel For Any Reason (CFAR) API declares 2 security schemes for authenticating requests. It accepts HTTP bearer tokens (PartnerAuth). An API key is passed in the header as HC-Session-ID (SessionAuth).

  • PartnerAuth — This API is authenticated with OAuth 2, Client Credentials grant.\ Clients should use their clientid and clientsecret to obtain an accesstoken.\ The accesstoke…
  • SessionAuth — Header Parameters | headerName | description | |-----------------|---------------------------------------------------------------------------------------------…

Paths & Operations 11

Across 11 paths, the API surfaces 11 operations — 2 GET, 5 POST, 4 PUT. Each is listed below with its method, path, parameters, and response codes.

Cancel For Any Reason (CFAR) 11

What is Cancel For Any Reason? Cancel For Any Reason (CFAR) enables airlines to offer refundability as an ancillary with HTS powering the dynamic pricing and supporting the refund…

POST
/cfar_offers
Create CFAR Offers
postCfar_offers 1 param body → 201400401403404422500
POST
/cfar_offers/external
Create External CFAR Offer
postCfar_offersExternal 1 param body → 201400401403404422500
POST
/cfar_contracts
Create a CFAR Contract
postCfar_contracts body → 201204400401403404422500
GET
/cfar_contracts/{id}
Get a CFAR Contract
getCfar_contractsId 2 params → 200400401403404422500
PUT
/cfar_contracts/{id}/update_status
Update CFAR Contract Status
putCfar_contractsIdUpdate_status 2 params body → 200204400401403404422500
PUT
/cfar_contracts/{id}/forms_of_payment
Update forms of payment of a CFAR Contract
putCfar_contractsIdForms_of_payment 2 params body → 200204400401403404422500
POST
/cfar_contracts/{id}/payment
Process CFAR Payment
postCfar_contractsIdPayment 2 params body → 200400401403404422500
PUT
/cfar_contracts/{id}/itinerary_slices
Update CFAR Contract Itinerary Slices
putCfar_contractsIdItinerary_slices 2 params body → 200204400401403404422500
POST
/cfar_contract_exercises
Create CFAR Exercise
postCfar_contract_exercises 1 param body → 201400401403404422500
PUT
/cfar_contract_exercises/{id}/mark_completed
Complete CFAR Exercise
putCfar_contract_exercisesIdMark_completed 2 params body → 200400401403404422500
GET
/customer/cfar/payout/receipt
Get payout receipt PDF
getCustomerCfarPayoutReceipt 1 param → 200400401403404422500

Schemas 79

The contract defines 79 schemas that model the data the API accepts and returns. The most detailed are cfar_offer (20 properties), update_cfar_contract_request (18 properties), cfar_contract (16 properties), create_external_cfar_offer_request (14 properties). Each schema is shown below with its type and property counts.

cfar_contents
object
2 properties 2 required
passenger_type
string
cfar_create_exercise_itinerary
object
Itinerary of the user when the contract exercise was initiated (only active segments should be provided)
7 properties 1 required
opera
object
2 properties 1 required
create_airline_cfar_session_request
object
An object containing information related to the user's session
6 properties 2 required
points
object
2 properties 2 required
cfar_create_exercise_itinerary_slice
object
An object containing the list of flight segments for a fare slice
7 properties 1 required
other_browser
object
3 properties 2 required
desktop
object
5 properties 2 required
request_type
string
internet_explorer
object
2 properties 1 required
device
The end-user's device
bad_request
object
1 property 1 required
create_cfar_contract_exercise_request
object
A create CFAR contract exercise request
13 properties 3 required
modification_type
string
The type of modifications in question in this fare rule
white_label
object
White-label channel — the partner sells under a different brand
2 properties 2 required
create_cfar_offer_request
object
6 properties 3 required
cfar_status
string
safari
object
2 properties 1 required
ancillary
object
4 properties 2 required
cfar_itinerary_slice
object
An object containing the list of flight segments for a fare slice
7 properties 1 required
cash
object
3 properties 3 required
form_of_payment
non_cash
object
3 properties 3 required
cfar_itinerary_slice_segment
object
An object detailing a segment of a fare slice
8 properties 7 required
other_os
object
3 properties 2 required
passenger_pricing
object
3 properties 2 required
browser
create_cfar_contract_request
object
Create a CFAR contract from selected CFAR offer(s).
4 properties 3 required
platform
cfar_offer
object
A successful CFAR offer response
20 properties 13 required
api
object
API channel — a programmatic integration
2 properties 2 required
modification_time
string
The time at which the modification is requested
unprocessable_entity
object
1 property 1 required
cfar_contract
object
A CFAR contract
16 properties 13 required
error
object
3 properties 1 required
linux
object
2 properties 1 required
chrome_os
object
2 properties 1 required
user_info
object
An object containing information related to the airline's user. Should be included if known, but not if the user is anonymous.
3 properties 1 required
cfar_tax
object
5 properties 4 required
direct
object
Direct channel — the partner sells directly to the end customer
1 property 1 required
channel
The partner's distribution channel
firefox
object
2 properties 1 required
chrome
object
2 properties 1 required
cfar_passenger_tax
object
3 properties 3 required
mark_cfar_contract_exercise_complete_request
object
An update CFAR contract exercise request
2 properties
operating_system
passenger_count
object
2 properties 2 required
fare_class
string
Fare class of the segment
fare_rule
object
7 properties 3 required
cfar_create_exercise_passenger_pricing
object
3 properties 1 required
windows
object
2 properties 1 required
app
object
2 properties 1 required
edge
object
2 properties 1 required
cfar_payment
object
1 property 1 required
mac_os
object
2 properties 1 required
cfar_offer_itinerary
object
7 properties 3 required
cfar_offer_passenger
object
An object detailing the Passenger Information as part of offers creation
2 properties 2 required
ancillary_type
string
The type of ancillary
android
object
2 properties 1 required
mobile
object
5 properties 2 required
process_cfar_payment_request
object
A process CFAR payment request
11 properties 5 required
update_cfar_contract_itinerary_slices_request
object
Request to update CFAR contract itinerary slices
3 properties 1 required
online_booking_tool
object
Online booking tool channel
3 properties 3 required
airline_refund_method
string
cfar_create_exercise_slice_segment
object
An object detailing a segment of a fare slice
8 properties 5 required
i_os
object
2 properties 1 required
payment_card
object
7 properties 3 required
agent_reseller
object
Agent / reseller channel
3 properties 3 required
cfar_contract_exercise
object
An object containing exercise information for a contract
9 properties 6 required
create_external_cfar_offer_request
object
Create a CFAR offer with externally provided pricing and coverage
14 properties 12 required
update_cfar_contract_request
object
Update CFAR contract request
18 properties 1 required
cfar_itinerary
object
8 properties 3 required
update_cfar_contract_itinerary_slice_request
object
An itinerary slice containing only flight segments
1 property 1 required
update_cfar_form_of_payment_request
object
Request object related to the update of forms of payment for CFAR contract
1 property 1 required
web
object
3 properties 1 required
tablet
object
5 properties 2 required
cfar_passenger
object
An object detailing the Passenger Information
4 properties 2 required
fare
object
4 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

hopper-com-cancel-for-any-reason-cfar-api-openapi.yml Raw ↑

Other APIs Hopper publishes across the network.

Hopper Analytics API
Hopper Authentication API
Hopper Disruption Guarantee (DG) API
Hopper Sessions API