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.
Headers
Bearer token
Request body
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.
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"
}Changes
Changed in 2 of the 3 revisions of this API.913
- ▲
added to the
/////request propertyallOflistrequest-property-all-of-added
- ▲
the
request property type changed fromdatetostring, and format from no format todaterequest-property-type-changed
- ▲
the
/request property type changed fromarraytostringrequest-property-type-changed
- ▲
the
request property type changed fromdatetostring, and format from no format todaterequest-property-type-changed
- ▲
the
//request property type changed fromdatetostring, and format from no format todaterequest-property-type-changed
- ●
removed from the
/////request propertyallOflistrequest-property-all-of-removed
- ○
added the new optional request property
/////new-optional-request-property
- ○
added the new optional request property
/////new-optional-request-property
This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ▲
the
request property type changed fromstringtodate, and format fromdateto no formatrequest-property-type-changed
- ▲
the
/request property type changed fromstringtoarrayrequest-property-type-changed
- ▲
the
request property type changed fromstringtodate, and format fromdateto no formatrequest-property-type-changed
- ▲
the
//request property type changed fromstringtodate, and format fromdateto no formatrequest-property-type-changed
- ○
added the new optional
headerrequest parameterAuthorizationnew-optional-request-parameter
- ▲