Checkout Widget Overview
Overview of the WeatherIt Checkout Widget — three embeddable Web Components that add rain protection to partner checkout pages.
The WeatherIt Checkout Widget is a set of three embeddable Web Components that add rain protection to partner checkout pages. Partners load a single script, place HTML tags on their pages, and the widget handles quoting and protection selection. The widget does not process payment — partners handle payment via Stripe Connect.
Components
| Component | Page | Purpose |
|---|---|---|
weatherit-widget | Checkout (extras step) | Displays quote, customer selects protection tier |
weatherit-cart-item | Checkout (cart sidebar) | Shows selected protection as a line item |
weatherit-confirmation | Booking confirmation page | Confirms policy, or upsells if not purchased |
How It Works
flowchart TB
subgraph PartnerSite["Partner Site"]
direction TB
subgraph Checkout["Checkout Page"]
W["weatherit-widget\nFetches quote, displays options"]
C["weatherit-cart-item\nShows line item when selected"]
end
subgraph Confirmation["Confirmation Page (separate URL)"]
CF["weatherit-confirmation\nConfirms policy or upsells"]
end
end
API["QLP-Back-End<br/>api.weatherit.ai"]
W -->|"POST /quotes"| API
W -->|"Custom Events"| C
CF -->|"GET /partners/:id"| API
classDef checkoutStyle fill:#e8f4f8
classDef confirmStyle fill:#e8f5e9
class Checkout checkoutStyle
class Confirmation confirmStyle
Customer Journey
- Widget loads —
embed.jsregisters the three components. Only components present in the page activate. - Quote displayed —
weatherit-widgetfetches partner branding and a quote from the API, then displays Full and Budget protection options. - Customer selects — The customer chooses a protection tier (or selects "No Protection"). The widget fires a Custom Event.
- Cart updated —
weatherit-cart-itemlistens for the event and shows a line item with the selected tier and premium. - Partner completes checkout — The partner's checkout flow proceeds. The partner captures the
quoteIdfrom the widget event. - Policy activated — After payment, the partner's backend calls
POST /quotes/:quoteId/purchaseto activate the policy. - Confirmation page —
weatherit-confirmationshows the policy confirmation, or an upsell if protection was not purchased.
Key Facts
- Single script tag —
weatherit.ai/embed.jsregisters all three components. - No payment in the widget — The widget handles quoting and selection only. Partners process payment via Stripe Connect.
- Shadow DOM — Each component uses Shadow DOM for style isolation. Widget styles do not leak into or out of the partner's page.
- Co-branding — Partner branding (logo and primary colour) is fetched from the API and applied automatically.
- Lightweight — The full bundle is approximately 10-15 KB gzipped (Lit framework, no React, no Stripe.js).
TerminologyWeatherIt documentation uses specific terms per the brand guide:
Use Do not use protection coverage / insurance payout claim settlement / reimbursement rain trigger precipitation threshold experience event / activity partner reseller Code identifiers (event names, attributes) retain their technical names — for example,
weatherit:coverage-selecteduses "coverage" because it is a code identifier.
Visual placeholder — A screenshot or mockup of the widget embedded in a checkout page will be added here.
Updated 7 months ago
Did this page help you?
