Skip to main content
The Embed feature lets you sell a product directly from any website — your blog, landing page, or marketing site. RMZ provides a ready-made widget script that handles the entire purchase flow.

Quick Start (Widget)

The fastest way to embed checkout is using the RMZ widget script. This is the same code generated by your dashboard under Settings > Embed.

1. Add the script and button

That’s it. When a customer clicks the button, a checkout modal opens with the full purchase flow — product info, authentication, payment.

2. Button attributes

You can style the button with any CSS — the embed script only uses the data attributes. The button text is also fully customizable.

3. Multiple products on one page

Add multiple buttons with different product IDs — they all share the same script:

Setup in Dashboard

1

Enable embed

Go to Dashboard > Settings > Embed and toggle the feature on.
2

Select a product

Choose the product you want to embed from the dropdown.
3

Copy your public key

Under Security Settings, copy the Public Key (format: rmz_pk_1_...). You can regenerate it at any time, but you’ll need to update the code on all sites using it.
4

Configure allowed domains (optional)

Under Allowed Domains, add the domains where the widget will be used (e.g., https://example.com or *.example.com). Leave empty to allow all origins.
5

Copy the embed code

Copy the generated HTML snippet and paste it into your website.
If you regenerate the public key, you must update the data-rmz-key attribute on all sites using the embed code.

JavaScript Events

The widget dispatches custom DOM events you can listen for:

Advanced: Direct API Integration

If you need full control over the UI, you can call the Embed API directly instead of using the widget script. This lets you build a completely custom checkout experience.

Base URL

Flow

  1. Fetch product info: GET /api/embed/product/{productId}
  2. Authenticate customer via OTP: POST /api/embed/auth/startPOST /api/embed/auth/verify
  3. Create checkout: POST /api/embed/checkout (or POST /api/embed/guest/checkout)
  4. Initiate payment: POST /api/embed/payment/initiate
  5. Poll for completion: GET /api/embed/payment/status/{checkoutUrl}

Example: Fetch product and create checkout

See the full Embed API reference for all endpoints and parameters.