The flow
1
Create the session in your backend
Your backend requests a portal session with the scope
plan-change and passes the token to your frontend. A session with that scope cannot reach invoices or payment methods.2
Allow your domain
The domain of your application has to be listed as an allowed origin for the sales channel. Without that entry the two sides exchange no messages. Send it to support@fynn.eu to have it added.
3
Embed the iframe
The page lives on the portal domain of your sales channel:
4
Listen for events
The embedded page reports its height and every decision the customer makes.

The embedded plan page, here for a subscription without a plan tier.
fynn:locale instead of remounting the iframe.
Events
Messages from the iframe to your page:
Messages from your page to the iframe:
Theming
The look comes from the branding of your sales channel: colour, logo, font and corner radii are already set when the page loads. To match it to your product at runtime, send CSS variables:When the session expires
A portal session lasts 15 minutes by default. When it expires, the embedded page says so and emitsfynn:session-expired. Fetch a fresh session from your backend and remount the iframe. Nothing is stored in the browser, so remounting costs nothing.
What is binding
fynn:plan-changed exists so your interface can update immediately, for example to close a dialog. The webhook is what is binding. If your application stores the new plan itself, do it when the webhook arrives, not when the message from the iframe does.