You still create the request token on your server, exactly as for the redirect flow. The only difference is how the customer reaches the page. Never generate the token in the browser.
Quick start
Add the loader script, then mount the checkout with the token your server created.Confirm payments on your server
Waftpay.mount(options)
It returns a handle:
The redirect rule
When a payment resolves, Waftpay produces a success or failure redirect URL. What the loader does with it depends on whether you passed a callback:- If you supplied
onSuccess(oronFailure), we assume you want to stay on your page — your callback fires and the overlay closes. No navigation. - If you did not, the loader navigates your top-level page to the redirect URL — matching the hosted redirect flow.
Events
Every event is delivered toonEvent in raw form (and to the matching on* callback).
Raw iframe (fallback only)
For environments that can’t run our script — some WebViews, or sites that block third-party JavaScript — embed the frame directly:- Pass your exact origin as
?origin=, or events cannot be delivered to you. - Implement the
postMessagehandling yourself, and validateevent.originagainsthttps://checkout.waftpay.ioon every message.
Prefer the loader script wherever you can — the raw
/embed/<token> URL is a frozen contract and won’t gain new behaviour.Current limitations
- Overlay only. The checkout mounts as a centered card over a blurred scrim; in-flow (“inline”) embedding is not yet supported.
- Domain allowlisting is not yet enforced. During the pilot any origin may frame the checkout. When per-merchant domain registration ships, you’ll need to register the domains you embed from — watch for that announcement.
Related links
- WaftStore demo — a working merchant integration
- Checkout (redirect flow)
- Create Checkout Request API
- Webhooks overview
