Sequence diagram and text equivalent for the deferred hosted-payment Single Trip Quote to Purchase workflow.
Audience: Partner developers and solution architects implementing single-trip quote-to-purchase flowsLast Updated: August 18, 2026
Single Trip Quote to Purchase Flow
This workflow shows the recommended deferred hosted-payment sequence for a single-trip policy purchase. Use it with the API Integration Guide and Payment Integration Guide when wiring quote, staging, hosted payment, and policy binding requests.
Sequence Diagram
sequenceDiagram
autonumber
actor Traveler as Traveler
participant PartnerApp as Partner app
participant PartnerBackend as Partner backend
participant TiiGraphQL as Travel Insured GraphQL API
participant PaymentApp as Travel Insured payment app
participant HostedForm as Hosted payment form
Traveler->>PartnerApp: Enter trip and traveler details
PartnerApp->>PartnerBackend: Submit quote request inputs
PartnerBackend->>TiiGraphQL: quote
TiiGraphQL-->>PartnerBackend: Available plans and quoted premiums
PartnerBackend-->>PartnerApp: Present eligible plans and coverage
Traveler->>PartnerApp: Select plan and provide purchaser details
PartnerApp->>PartnerBackend: Submit selected plan and purchaser details
PartnerBackend->>TiiGraphQL: stagePolicyPurchase
TiiGraphQL-->>PartnerBackend: planGuid, quoteNumber, amount due
PartnerBackend->>PaymentApp: Create embedded payment session with planGuid
PaymentApp-->>PartnerBackend: paymentSessionId, embedToken, expiresAt
PartnerBackend-->>PartnerApp: Return safe payment session values
PartnerApp->>HostedForm: Mount hosted payment form with embedToken
Traveler->>HostedForm: Enter card details
HostedForm->>PaymentApp: Tokenize and submit card data
PaymentApp-->>PartnerApp: Payment status event
PartnerApp->>PartnerBackend: Confirm successful payment status
PartnerBackend->>TiiGraphQL: policyBindRequest
TiiGraphQL-->>PartnerBackend: Policy number and bound policy status
PartnerBackend-->>PartnerApp: Return confirmation details
PartnerApp-->>Traveler: Show purchase confirmation
Single Trip Quote to Purchase flow from quote creation through hosted payment and policy binding.
Text Sequence Equivalent
Step
Initiator
Request or event
Result
1
Traveler
Enters trip and traveler details in the partner experience
Partner app has the information needed to request a quote
2
Partner backend
Calls quote on the Travel Insured GraphQL API
Eligible plans, coverage options, and quoted premiums are returned
3
Traveler
Selects a plan and provides purchaser details
Partner app can stage the selected policy purchase
4
Partner backend
Calls stagePolicyPurchase
Travel Insured returns planGuid, quoteNumber, and amount due
5
Partner backend
Creates an embedded payment session with the Travel Insured payment app
Safe client values such as paymentSessionId, embedToken, and expiresAt are returned
6
Partner app
Mounts the hosted payment form using the safe session values
Traveler sees the secure Travel Insured-hosted card-entry form
7
Traveler
Enters card details in the hosted payment form
Card data is tokenized and submitted without touching partner servers
8
Payment app
Sends a safe payment status event to the partner app
Partner app can notify the backend that payment succeeded
9
Partner backend
Calls policyBindRequest after successful payment
Travel Insured returns the policy number and bound policy status
10
Partner app
Displays confirmation details
Traveler receives purchase confirmation
Implementation Notes
Keep partner API credentials on the server. Never send Authorization or x-api-key values to the browser.
Use quote before staging so the traveler can review eligible plans and premium amounts before purchase.
Use stagePolicyPurchase to create the planGuid required by the hosted payment session.
Pass only safe payment session values, such as paymentSessionId and embedToken, from your backend to your browser application.
Call policyBindRequest only after a successful payment status is confirmed by your backend.
Treat all identifiers and status events received by the browser as untrusted until your backend verifies the transaction state server-side.