v3

latestOpenAPI 3.0.0raw.githubusercontent.com2026-07-10184967.1 KB
Purchase

Purchase coverage

Purchase a policy with Faye. Call this endpoint after a quote is generated. Please provide the expected price to validate the amount to be charged.

Payment token must be provided in the request body.

post/v1/purchase

Headers

Authorizationstring

Bearer token

Request body

advisorIdstring

A unique identifier for the agent triggering this quote

departureDatestring date required

First day of trip

returnDatestring date required

Final day of trip

tripCostnumber

Value of non-refundable trip costs in $USD. Minimum $1000. Maximum is $150,000 or $50,000 per traveler (the lower between them)

productId'PR-STANDARD-01' | 'PR-SPORTS-01' | 'PR-CFAR-01' | 'PR-STANDARD-DO' | 'PR-SPORTS-DO' | 'PR-CFAR-DO' | 'PR-STR' | 'PR-GENERAL-STR' | 'RETAIL' | 'PR-FirstCountrywide' | 'PR-ForwardCountrywide' | 'PR-FlagshipCountrywide'

Product ID - relevant only for specific partners. Single product for single quote.

productIdsstring[]

Array of product IDs or group names for multi-quote. If provided, will create quotes for all products. Can contain ProductIdEnum values or group names.

productCodestring required

The product code to quote for, this field is no longer used

timezonestring

Timezone for the trip dates (IANA timezone identifier)

primaryEmailstring required

An email from the main policyholder. This is used to issue the policy and to communicate with the traveler.

paymentTokenstring

Token to charge payment method

paymentIntentstring

Token intent to confirm

paymentMethodstring

Payment method token

paymentCustomerIdstring

Customer id for payment service

paymentService'stripe' | 'checkOut'

Payment service used to issue payment token

expectedPricenumber required

Expected price for the policy. Please call quote endpoint to generate the expected price. If the gap between the expected price and the actual price is off by more than 1 cent - the request will fail. This is to avoid false charges.

externalIdstring

The ID of the user on the partner system

noTravellersnumber

The number of travellers

Example request

{
  "advisorId": "123456",
  "departureDate": "2023-05-18",
  "returnDate": "2023-05-30",
  "destination": [
    {
      "country": "US",
      "googlePlaceId": "ChIJYYOWXuckZUcRZdTiJR5FQOc",
      "state": "CA"
    }
  ],
  "coverageOptions": {
    "cfarOption": {
      "initialDepositDate": "2023-05-18"
    },
    "cfwrOption": {
      "initialDepositDate": "2023-05-18"
    },
    "carRentalOption": {
      "carDatesDto": [
        {
          "startDate": "2023-05-18",
          "endDate": "2023-05-19",
          "noOfCars": 1
        }
      ],
      "noOfCars": 2
    }
  },
  "productId": "PR-STANDARD-01",
  "productIds": [
    "PR-STANDARD-01",
    "PR-SPORTS-01"
  ],
  "timezone": "America/New_York",
  "address": {
    "addressLine1": "123 Main St",
    "addressLine2": "Apt 1",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94105",
    "country": "US"
  },
  "primaryEmail": "bob@example.com",
  "travelerDetails": [
    {
      "firstName": "Jane",
      "lastName": "Doe",
      "email": "jane.doe@gmail.com",
      "dob": "1980-11-25"
    }
  ],
  "paymentToken": "tok_1H4qXp2eZvKYlo2CgqjQ1J4Y",
  "paymentIntent": "pi_3MtweELkdIwHu7ix0Dt0gF2H",
  "paymentMethod": "pm_3MtweELkdIwHu7ix0Dt0gF2H",
  "paymentCustomerId": "cus_3MtweELkdIwHu7ix0Dt0gF2H",
  "paymentService": "stripe",
  "expectedPrice": 375.35,
  "externalId": "Aa123",
  "noTravellers": 2,
  "utms": [
    {
      "key": "utm_source",
      "value": "google"
    }
  ]
}

Response

The purchase has been completed.

purchaseIdstring required

Policy ID of all travelers

totalPricenumber required

The price that was charged

paymentIntentstring

Payment intent token of the purchase

policyUrlstring

URL to download the policy

receiptUrlstring

URL to download the receipt

Example response

{
  "purchaseId": "P23-1234",
  "plans": [
    {
      "name": "Bob Smith",
      "planId": "P23-1234-1"
    }
  ],
  "totalPrice": 100.24,
  "paymentIntent": "pi_3MtweELkdIwHu7ix0Dt0gF2H",
  "policyUrl": "https://example.com/policy.pdf",
  "receiptUrl": "https://example.com/receipt.pdf"
}