Skip to main content
Instead of redirecting, you can embed a checkout session in an iframe on your own page. In iframe mode the checkout does not redirect — it renders success/canceled in place and posts messages to the parent window.
1

Create a session

Create a session from your backend exactly as in the Quickstart, and keep the returned id.
2

Embed the session URL

Render an iframe pointing at the session URL with iframe=true and your parentOrigin appended as query params.
The allow="payment; clipboard-write; clipboard-read" attribute is required so the embedded checkout can request payment and let the customer copy the QR payload or address.
3

Listen for postMessage events

The checkout posts messages to the parent window as the payment progresses. Add the listener below to your page.
4

Confirm server-side

The success message is a client signal. Confirm the real payment server-side via GET /checkouts/{id} before fulfilling anything of value.

Message shape

Each message posted to the parent window has this shape:
Always check e.origin === "https://checkout.meru.com" and e.data.source === "meru-checkout" before trusting a message, to avoid acting on spoofed events from other frames.

Quickstart

Create a session and redirect, end to end.

Payment status

Confirm payments server-side by polling.