Quote to Purchase Integration Guide v2
Public partner guide for Travel Insured's latest single-trip quote-to-purchase GraphQL flows, including streamlined and deferred purchase patterns.
Quote to Purchase Integration Guide v2
Intended Audience: Partner development teams and technology executives
Last Updated: May 12, 2026
Version: 2.0
This guide uses the original partner-facing quote-to-purchase structure and extends it to reflect the latest published GraphQL schema for single-trip policies.
It covers both supported purchase patterns. The deferred flow remains a first-class design for integrations that need separate payment orchestration. The v2 update adds the published streamlined purchasePolicy mutation, refreshed schema optionality, updated authentication examples, and current search and modification references.
Overview
Travel Insured's GraphQL API enables partners to embed travel insurance directly into the customer journey, reduce purchase friction, and support multiple checkout architectures.
Core Integration Flow
Travel Insured publishes two supported purchase patterns for single-trip policies:
Streamlined Purchase Flow
- Generate Quote using
quote - Purchase Policy using
purchasePolicy
Use this pattern when your integration can submit payment details in the same mutation that stages and binds the policy.
Deferred Purchase Flow
- Generate Quote using
quote - Stage Policy Purchase using
stagePolicyPurchase - Process Payment using
processPayment - Policy Bind Request using
policyBindRequest
Use this pattern when your checkout requires hosted payment pages, embedded payment experiences, or separate payment-session handling.
Related Published Capabilities
- Saved Quote Details using
savedQuotefor resume flows - Policy search and servicing using
searchPlan - Streamlined policy modification using
modifyPolicyWithPayment
Annual-plan purchase uses separate annual-plan mutations and is covered in its own guide and Postman collection.
1. Before Integration: Authentication & Prerequisites
API Credentials
Your integration team will receive:
| Credential | Use | Format |
|---|---|---|
| Access Key | Identifies your partnered organization to Travel Insured; sent in x-api-key header | Alphanumeric key |
| API Token | Authorizes the API capabilities available to the calling agent or service principal; sent in Authorization header | Token string |
| GraphQL Endpoint URL | API endpoint for your environment | HTTPS URL |
Required Integration Headers
Every API request must include these headers:
Authorization: ApiKey {{apiToken}}x-api-key: {{accessKey}}Content-Type: application/json
Important: Send the API token as a raw value with an ApiKey prefix exactly as shown above.
Environment Setup
Typical partner onboarding includes:
- Development/Sandbox for testing and implementation work
- Production for live traffic
We recommend development-first implementation with end-to-end validation before production cutover.
2. Understanding the Data Contract
State Carried Through the Flow
Your integration must persist and pass these identifiers through the quote-to-purchase workflow:
| Identifier | Source | Purpose | Validity |
|---|---|---|---|
| quoteNumber | Generate Quote | Links purchase back to the quoted rate and products | No fixed expiry; pricing is repriced in the moment |
| planGuid | Stage Policy Purchase | Handle for deferred payment processing and finalization | Session-based |
| paymentRequestId | Process Payment | Tracks payment session for support and logs | Session-based |
| planNumber | Policy Bind Request | Final issued policy identifier for deferred purchase | Permanent |
| policyNumber | Purchase Policy | Final issued policy identifier for streamlined purchase | Permanent |
Treat these identifiers as session state. Pass them unchanged between requests and do not parse or modify them.
Required Information by Stage
At Quote Time
- Trip dates, destinations, and travelers
- Traveler names and dates of birth
- Residency country and state
- Trip cost per traveler
At Purchase Time
- All quote information, consistent with the original quote
- Primary traveler full address and contact details
- Additional traveler information if applicable
- Beneficiary designations if collected; if provided, percentages should total 100%
- Selected product code and optional coverage IDs
- Preferred document delivery method
At Streamlined Purchase Time
- All purchase information above
- Payment method and payment details in the
purchasePolicypayload - Optional
payment.idempotencyKeyfor safe retry handling
At Deferred Payment Time
- Staged plan identifier
planGuid - Payment method type
- Billing party information if your integration sends it here
- Hosted payment or iframe configuration as needed
At Deferred Finalization
- Staged plan identifier
planGuid - Payment gateway transaction ID
- No raw payment card data
3. Step 1: Generate a Quote
What This Operation Does
Creates a rate quote for one or more travelers covering a specified trip. The quote captures available products, coverage options, pricing, upsell products, and acceptable payment methods.
Partners should persist the quote identifier as a resumable quote reference, not as a locked-price artifact. Pricing should be treated as dynamic and repriced in the moment during downstream purchase handling.
Request Inputs
Travel Details:
- Departure date
- Return date
- Destinations
- Trip cost per traveler
Traveler Details:
- First and last name
- Date of birth
- Residency country and state
Your Organization Context:
- Agency number
- Agent ID, if used
Response Data
A successful quote response includes:
- quoteNumber to persist for purchase
- products[] with product code, product name, total price, available payment methods, optional coverages, and upsell products
Implementation Guidance
- Use the quote response to drive product selection UI.
- Let customers select a product and optional coverages from the returned product list.
- Store
quoteNumberwith the customer session. - If the customer abandons, use
savedQuoteto retrieve the quote later. - If the customer returns later, be prepared for current pricing to be recalculated.
Example Operation
Use the quote mutation with a QuoteRequestInput payload and retain the returned quoteNumber, product selections, available payment methods, coverage choices, and upsell products needed for downstream purchase handling.
4. Optional: Retrieve a Saved Quote
When to Use This
If your implementation supports customer resumption, such as quote reminder emails or abandoned cart recovery, retrieve a prior quote using savedQuote instead of forcing the customer to start over.
Constraints
- Original quote parameters are not a guaranteed price lock.
- If trip details materially change, generate a fresh quote.
- Resume flows should expect current pricing to be recalculated as needed.
Implementation Note
If you need a fresh pricing response before checkout, generate a new quote rather than attempting to mutate an archived quote.
5. Purchase Input Fields: Required vs. Optional
This reference table summarizes shared required and optional fields across the published purchase flows.
Traveler Inputs
PrimaryTravelerInput
| Field | Required/Optional | Notes |
|---|---|---|
| First name, last name, date of birth | Required | Core traveler identity |
| Email, phone numbers | Required | Contact information |
| Full address | Required | Street, city, state, postal code, country |
| Beneficiaries | Optional | If provided, percentages should total 100% |
| Middle name | Optional | Middle name or initial |
| Member number | Optional | Agency membership or identifier |
AdditionalTravelerInput
| Field | Required/Optional | Notes |
|---|---|---|
| First name, last name, date of birth | Required | Traveler identity |
| Trip cost | Required | Individual cost for the traveler |
| Beneficiaries | Optional | Optional by schema |
| Middle name | Optional | Middle name or initial |
Product and Policy Context
ProductDetailInput
| Field | Required/Optional | Notes |
|---|---|---|
| Product code | Required | Selected product from quote |
| Optional coverages | Optional | Coverage IDs selected from quote response |
| Effective date | Optional | May default if omitted |
Shared Purchase Context
| Field | Required/Optional | Notes |
|---|---|---|
| Quote number | Required | Reference from quote step |
| Agency number | Required | Partner agency identifier |
| Trip details | Required | Dates, destinations, travelers |
| Product selection | Required | Product code and optional coverages |
| Delivery methods | Required | How to send policy documents |
| Agent ID | Optional | Agent or rep attribution |
| Application date | Optional | Sale date or application date |
| Marketing channel ID | Optional | Sales channel reference |
| Owner ID | Optional | Internal team assignment |
| Tour number | Optional | Tour operator reference |
Streamlined Payment Details
| Field | Required/Optional | Notes |
|---|---|---|
payment.paymentMethod | Required | Published schema supports TOKEN and AR |
payment.token.token | Required for TOKEN | Tokenized payment value |
payment.token.cryptogram | Required for TOKEN | Network cryptogram |
payment.idempotencyKey | Optional | Strongly recommended for retry safety |
| Token metadata | Optional | eciIndicator, expiryMonth, expiryYear, tokenRequestorId |
Deferred Payment Processing
PaymentProcessingRequestInput
| Field | Required/Optional | Notes |
|---|---|---|
planGuid | Required | Staged plan reference |
paymentMethod | Required | CreditCard or ACH |
billingPartyInformation | Optional | Billing name, contact, address, and amount |
hostedPaymentUrl | Optional | Hosted payment redirect flow |
iFrameCommunicatorUrl | Optional | Embedded payment integration |
6. Step 2: Streamlined Purchase Using purchasePolicy
What This Operation Does
purchasePolicy validates the quote, stages the policy, processes payment, and binds the policy in a single mutation.
This is the shortest path from quote to issuance and is the recommended pattern when your payment platform supports tokenized payment or approved AR billing.
When to Use It
- Tokenized card or wallet payments
- AR or invoicing flows supported by your commercial agreement
- Partner experiences that want fewer server round trips
Request Inputs
The mutation expects:
quoteNumberagencyNumberdeliveryMethods[]product.productCode- Full
tripdetails including the primary traveler payment.paymentMethod- Token details when
payment.paymentMethodisTOKEN
Response Data
A successful response includes:
successpolicyNumberamountChargedtransactionId- Document URLs
errorCodeanderrorMessageon failure
Implementation Guidance
- Send
payment.idempotencyKeyto prevent duplicate charges on retries. - Use
TOKENonly with a valid network token and cryptogram. - Use
ARonly when your agreement supports invoicing or remittance. - Persist
policyNumberas the final system-of-record policy identifier.
Example Operation
Use the purchasePolicy mutation with a PolicyPurchaseInput payload and expect a response that indicates success, returns the final policyNumber, includes the charged amount and transaction ID, and provides document URLs or failure details.
7. Step 3: Deferred Purchase Using stagePolicyPurchase
What This Operation Does
Converts an active quote into a staged purchase that is priced but not yet final. It captures purchase-grade traveler information, beneficiary designations, product selection, and delivery preferences, then returns a planGuid for the remaining deferred-flow steps.
The deferred flow is a supported design for integrations where payment must remain outside the purchase mutation.
Key Differences from Quote Stage
| Stage | Quote | Deferred Purchase Stage |
|---|---|---|
| Data depth | Basic traveler info | Full contact and address info |
| Beneficiaries | Not required | Optional in schema; if supplied, percentages should total 100% |
| Validity | No fixed expiry on quote reference; pricing reprices in the moment | Session-based staged record |
| Next step | Product selection | Payment session handling |
Request Inputs
Quote Reference:
quoteNumber
Product Selection:
- Product code from the quote response
- Optional coverage IDs
- Optional effective date in the product payload
Traveler and Trip Details:
- Trip dates and destinations consistent with the quoted trip
- Primary traveler name, date of birth, email, phone, and full address
- Additional travelers when applicable
- Beneficiaries when collected
- Optional fields such as
middleName,memberNumber,depositDate, andfinalPaymentDate
Delivery Preferences and Partner Context:
- Required delivery methods
- Required agency number
- Optional
agentId,marketingChannelId,applicationDate,ownerId, andtourNumber
Data Validation Rules
The API validates:
- The quote reference is valid and can be repriced under current rating logic.
- Traveler data matches the quoted trip.
- Selected product and optional coverages match quote availability.
- Traveler names and dates of birth are consistent.
- Beneficiary percentages total 100% if beneficiaries are supplied.
- Trip dates fall within acceptable purchase windows.
Response Data
A successful response includes planGuid, which you should retain for processPayment and policyBindRequest.
Example Operation
Use the stagePolicyPurchase mutation with a PolicyPurchaseStageInput payload and retain the returned planGuid for the remaining deferred purchase steps.
8. Step 4: Process Payment
What This Operation Does
Registers the payment session for the staged plan and returns identifiers needed to complete payment through your selected deferred-payment model.
This operation does not process raw card data. Payment capture is handled through Travel Insured's secure payment partner.
Request Inputs
Required:
planGuidpaymentMethod
Optional:
billingPartyInformationhostedPaymentUrliFrameCommunicatorUrl
Response Data
A successful payment-processing response includes:
paymentRequestIdplanGuid
Implementation Guidance
- Store
paymentRequestIdin your logs for support correlation. - Complete the hosted or embedded payment step before the payment session times out.
- Capture the gateway
transactionIdfor the final bind step. - If payment fails or the customer abandons, re-stage the plan if needed.
Example Operation
Use the processPayment mutation with a PaymentProcessingRequestInput payload and retain the returned paymentRequestId and planGuid for support tracing and final policy binding.
9. Step 5: Policy Bind Request (Deferred Finalization)
What This Operation Does
Validates the payment transaction with the payment gateway, finalizes the staged plan, and issues the policy.
Once this operation succeeds, the customer has an issued active policy and the response returns policy identifiers and document links.
Request Inputs
planGuidtransactionId
Response Data
A successful bind response includes:
planNumbercobDownloadLinkeobDownloadLink
Implementation Guidance
- Persist
planNumberas the final policy reference for deferred purchase. - Store document links for customer access.
- Retry only after understanding the prior payment outcome.
- If payment was declined or expired, restart from staging with a fresh session.
Example Operation
Use the policyBindRequest mutation with the staged planGuid and confirmed payment transactionId, then retain the returned planNumber and document links for customer servicing.
10. Failure Handling and Common Issues
Quote Stage
| Issue | Cause | Resolution |
|---|---|---|
| Invalid GraphQL variables | Malformed request body | Validate JSON structure and field types |
| Missing required fields | Incomplete traveler or trip data | Ensure all required fields are populated |
| Invalid destinations | Unsupported country or region | Verify destination codes against supported values |
Streamlined or Deferred Purchase Stage
| Issue | Cause | Resolution |
|---|---|---|
| Quote not found | quoteNumber is invalid or cannot be repriced as submitted | Generate a fresh quote |
| Data mismatch | Traveler data differs from the original quote | Verify traveler names, dates, and costs match |
| Invalid product or coverage | Selection is not valid for the quote | Use only values returned from the quote response |
| Beneficiary validation | Percentages do not total 100% | Adjust allocations to sum to exactly 100% |
Deferred Payment Stage
| Issue | Cause | Resolution |
|---|---|---|
| Plan not found | planGuid is invalid | Re-stage the policy |
| Amount mismatch | Billing amount differs from staged cost | Use the staged amount exactly |
| Payment session timeout | Customer took too long to complete payment | Re-stage and restart payment |
Finalization Stage
| Issue | Cause | Resolution |
|---|---|---|
| Invalid transaction ID | transactionId is not recognized | Verify the gateway callback value |
| Duplicate transaction | transactionId was already used | Use a unique transaction per payment attempt |
| Payment failed | Gateway declined or canceled the transaction | Restart from the appropriate payment step |
11. Integration Patterns and Best Practices
Choosing the Right Purchase Pattern
| Consideration | purchasePolicy | Deferred flow |
|---|---|---|
| Purchase calls | 1 | 3 |
| Payment handled in same mutation | Yes | No |
| Hosted redirect or iframe support | Not the primary pattern | Yes |
| Best fit | Simplified partner checkout | Externally orchestrated payment |
Recommended Checkout Flow
- Generate a quote early in checkout and persist
quoteNumber. - Support resume flows with
savedQuotewhen customers return later. - Choose streamlined purchase for one-step issuance when payment can be submitted in the mutation.
- Choose deferred purchase when payment handling requires a separate session.
- Persist final policy identifiers and document links for servicing and support.
Session Management
- Quotes do not have a fixed expiry, but pricing should be treated as dynamic until purchase.
- Deferred staged plans and payment sessions should be treated as temporary checkout state.
- Final policy identifiers are permanent and should be retained for support, servicing, and claims.
Compliance and Data Privacy
- Travel Insured does not receive or process raw payment card data in partner applications.
- Payment tokenization and PCI controls are handled through the payment partner.
- Secure API credentials and rotate them periodically.
12. Search and Retrieve Policies
Partners often need to retrieve customer policies for support, modification, or renewal workflows.
When to Offer Search
- Customer service lookup by policy number, traveler name, or email
- Policy management dashboards
- Renewal or follow-on workflows
- Administrative review of issued policies
How to Search
Use searchPlan to retrieve policy details by policy number, traveler information, issue dates, agency, or trip dates.
Returned policy details can include:
- Primary and additional travelers
- Trip dates and destinations
- Coverage selections
- Payment and refund history
- Policy status and servicing context
What You Can Do with Retrieved Policies
- Display policy details to the customer.
- Start supported modification flows.
- Support servicing and operational review.
- Use the issued policy context for follow-on workflows.
13. Policy Modification and Changes
After a policy is issued, customers may need to update traveler information, trip details, or coverage selections.
The latest published schema also includes modifyPolicyWithPayment for streamlined modification scenarios where payment for the change can be handled in the same mutation.
Typical Modification Workflow
- Retrieve the existing policy using
searchPlan. - Evaluate the requested changes and the price impact.
- Submit the supported modification request.
- Process incremental payment or refund handling as required by the modification path.
- Return updated policy details and documents to the customer.
Modification Constraints
- Changes are generally subject to product and timing rules.
- Pricing is recalculated using current rating and policy conditions.
- Some changes may require additional servicing review depending on the policy state.
14. Technical Support and Resources
Key Artifacts for Your Team
Provide your development team with:
- This integration guide.
- The GraphQL schema reference.
- Environment credentials and endpoint URLs.
- Sample request and response payloads.
- Your Travel Insured integration contact.
Support Channels
- Technical questions: your dedicated integration engineer
- Credential management: your account team
- Production issues: Travel Insured support with your payment request IDs and policy identifiers
Next Steps
- Set up your development environment.
- Test quote, purchase, and resume flows end to end.
- Validate the purchase pattern that matches your payment architecture.
- Perform regression testing before production cutover.
15. FAQ
Q: Is deferred purchase still supported?
A: Yes. Deferred purchase is a supported design pattern for integrations that need separate payment-session handling.
Q: What happens if a customer abandons during checkout?
A: Saved quotes can be resumed later, but pricing is not locked and may be recalculated when the customer returns. Deferred staged plans and payment sessions should be treated as temporary checkout state.
Q: How do I choose between purchasePolicy and the deferred flow?
A: Use purchasePolicy when you can submit payment in the same mutation. Use the deferred flow when your payment experience requires hosted pages, iframes, or separate orchestration.
Q: Can I customize the product names or pricing in my checkout?
A: Display product names and pricing from the quote response. Do not alter them in ways that conflict with the underwritten policy.
Q: How do I know a deferred payment succeeded before calling policyBindRequest?
A: Capture the transaction ID directly from your payment partner's callback or confirmed payment result. Do not rely on browser redirects alone.
Q: How often should I refresh API credentials?
A: Rotate credentials periodically and immediately upon team changes or suspected compromise.
Questions or integration support needed? Contact your Travel Insured partner team to get started.