Purchase
Quote & Save V2
Save and pay for a quote (V2)
Changed onSaves and pays for a policy. This endpoint calls the backend /v2/quote/saveAndPay endpoint. Note: if address information doesn`t given in the create quote flow endpoint, then its need to be given now in this endpoint
post/v2/purchase
Request
- Base URLhttps://partnerapi.withfaye.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Authorizationstring
Bearer token
Request body
Example request
{
"address": {
"country": "FR",
"areaLevel1": "CA",
"locality": "Paris",
"label": "Paris, France",
"streetAndNumber": "123 Main St",
"city": "San Francisco",
"apartment": "Apt 4B",
"zipCode": "94102"
},
"policyCodeHash": "abc123def456"
}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
- warning
removed the request property
- warning
removed the request property
- info
added the new optional request property
- warning
- info
added the new optional
headerrequest parameterAuthorization
- info