In-page checkout keeps your page layout and navigation while Zahlo owns sensitive payment fields and method-specific interaction. Create the session on your server, then pass the session ID and short-lived client token to the browser.

Server step

Set mode: "embedded" and register the exact origin that will mount the component in merchant settings. The amount and method come from your trusted order calculation.

Browser step

Call destroy() when the page unmounts. Mount one instance per container, keep the container accessible, and do not copy sensitive field values into your DOM, state, analytics, or logs. Appearance values style the checkout shell; secure payment fields remain isolated and are styled only through the supported appearance options.

Origin and event rules

The browser may read only its session through the bearer client token. Verify the exact origin before mounting. A callback means the component observed a state change; a signed server event is the fulfillment authority. For asynchronous methods, leave the order pending until confirmation.