Building a chat or single-page app? The consent component in SDK 0.4.0 keeps the
buyer inside your page with no cookies and no redirect — see
Buyer purchases inside your chat. The modal below remains
the right fit for a classic site.
1 · Register your embed origin
https, no path or query
(http only for localhost and 127.0.0.1); null clears them. Once set, the
authorize page serves frame-ancestors 'self' <your origins> and drops
X-Frame-Options — your iframe renders; everyone else’s stays blocked. The same
list is where the page posts its messages, and which browser origins may call the
buyer API with a bearer (Browser access and CORS).
On Adyen? This list is your site. Adyen keeps a separate allowed-origins list on
your API credential, and that one needs Alyte’s origin, not yours — see
Connect Adyen.
2 · Frame the redeem URL, not the authorize URL
Mint the buyer session server-side (Bring your own auth), then use the redeemPath as the iframesrc:
SameSite=None; Secure; Partitioned for iframe navigations — but
only a redeem that happens in the frame puts the session where the framed
page can see it. Redeeming in a top-level tab and then framing the authorize
URL will not share the session.
3 · Listen for completion
The embedded page posts to your window — only to your registered origin:Message reference
Every message is{ type: 'alyte:authorize', merchantId, event, ...fields }.
completed is terminal: close the modal on it. Branch on outcome to decide what
to tell the buyer — a queued watch resolves later via the
watch.* webhooks.
There is no cancelled event — your modal’s close button owns dismissal — and
no error event: failures are shown to the buyer inside the page, and the modal
stays open for them to retry or close.
Notes
- Narrow frames: below tablet width the page collapses to the checkout column and hides the “Your agents” tab. That is intended for a buyer mid-purchase; if you want the management view in your embed, give the frame at least 720px.
- Card capture inside the modal: the page’s Stripe Elements iframe runs at one extra frame depth. Validate it once in a staging embed before enabling in production; if your stack misbehaves, fall back to the redirect flow for the add-card step only.
- The redirect flow keeps working unchanged — treat embedding as progressive enhancement.
- Browser support: the partitioned-cookie flow requires a current Chrome/Edge/Firefox/Safari; very old browsers fall back to redirect.

