Overlay checkout (onflay.js)
Use the CDN loader when you want buyers to pay without leaving your site.
Your server still creates the checkout session with a secret key — the
browser only opens the returned embedUrl.
1. Create an embedded session (server)
uiMode: "embedded" derives frame-ancestors from the origins of
successUrl / cancelUrl. Those pages must be the sites that host the overlay.
2. Load the script
3. Open the overlay
Declarative markup
Appointment listings (pick time in the overlay)
ForAPPOINTMENT products you can omit appointmentSlot / appointmentSlots
and let the buyer pick time(s) inside the overlay before paying (same Flow B as
hosted checkout — see Appointment checkout).
Session packs collect all N times in the overlay UI:
Merchant CSP
Allow the loader script and the checkout iframe:Security model
Fallback policy
If the iframe never postsready (CSP mismatch, corporate proxy, ad blocker):
redirect(default) — navigate to the embed/hosted URL top-levelpopup— open a checkout popup windownone— callonErroronly