# Hopper Cancel For Any Reason (CFAR) API

**Canonical:** https://apis.io/apis/hopper-com/hopper-com-cancel-for-any-reason-cfar-api/  
**Provider:** Hopper — https://apis.io/providers/hopper-com/  
**Base URL:** https://airlines-api.hopper.com/airline/v1.1  
**Documentation:** https://github.com/hopper/hc-airlines-java

Hopper Cancel For Any Reason (CFAR) API is one of 5 APIs that [Hopper](https://apis.io/providers/hopper-com/) publishes on the [APIs.io](https://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.

**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 total amount 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 amount of 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.

## Machine-readable artifacts (5)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/hopper-com/refs/heads/main/openapi/hopper-com-cancel-for-any-reason-cfar-api-openapi.yml
- **Documentation** — https://github.com/hopper/hc-airlines-java
- **SDKs** — https://github.com/hopper/hc-airlines-java
- **SDKs** — https://github.com/hopper/hts-airlines-dotnet
- **SDKs** — https://github.com/hopper/hc-airlines-angular

## Other Hopper APIs (4)

- [Hopper Analytics API](https://apis.io/apis/hopper-com/hopper-com-analytics-api/)
- [Hopper Authentication API](https://apis.io/apis/hopper-com/hopper-com-authentication-api/)
- [Hopper Disruption Guarantee (DG) API](https://apis.io/apis/hopper-com/hopper-com-disruption-guarantee-dg-api/)
- [Hopper Sessions API](https://apis.io/apis/hopper-com/hopper-com-sessions-api/)

## Tags

Cancel For Any Reason (CFAR)

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/hopper-com/hopper-com-cancel-for-any-reason-cfar-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/hopper-com/.
