Skip to main content
The embedded checkout shows the hosted Warp checkout inside your page, in a modal, or in a popup, instead of redirecting the customer. It is the same checkout page, so wallet connection, quotes and on-chain verification work exactly as with a redirect. For a step-by-step setup with full Next.js, Nuxt and Express examples, see Set up the SDKs.
Events from the embedded checkout are UI signals only. Fulfil orders from the payment.completed webhook or by retrieving the session on your server.

How it works

1

Create a session on your server

Create the session with your secret key, as usual, and set return_url or cancel_url to a page on the site that embeds the checkout. Return checkout_url to the browser.
2

Embed it

Pass the URL (or a function that fetches it) to the component. It loads the checkout in an iframe, modal or popup.
3

React to events

The checkout reports ready, status changes, completion, cancel and return. Use them to update your UI.

Server

The browser never sees your secret key. This example uses the Node.js SDK:

Client

useWarpCheckout(options) returns openModal, openPopup, close, status, sessionId, isOpen and error for custom buttons.

Display modes

All modes accept theme (light, dark or auto). Match it to your page so the iframe background blends in.

Events

In embed mode the cancel and return buttons send events instead of navigating, so your page decides what happens next.

Allowed origins

The checkout can only be framed by, and only sends events to, the origins of the session’s return_url and cancel_url. Testnet sessions (created with an sk_test_ key) also allow http://localhost and http://127.0.0.1 on any port, for local development.
  • Set return_url or cancel_url to a page on the site that embeds the checkout. A session without either cannot be embedded; redirect to checkout_url instead.
  • If your site sends a Content-Security-Policy, add frame-src https://checkout.usewarp.net.
  • For popups, do not send Cross-Origin-Opener-Policy: same-origin; use same-origin-allow-popups.

Next steps

Webhooks

Confirm payments on your server.

Node.js SDK

Create sessions and verify webhooks.

Set up with examples

Full Next.js, Nuxt and Express walkthroughs.

SDK overview

Every package with npm and GitHub links.