Skip to main content
Embed hosts are the sites allowed to embed your checkout and Embedded Payment Method. Both embeds only open on a host you’ve listed. Anywhere else, the browser refuses to load them. Why it’s required: after a payment, the embed sends your page a message carrying a session token for your customer. The list is how Polar knows that page is yours.

Add a host

  • Open Settings → Embedding
  • Enter one or more hosts, separated by commas or spaces
  • Click Add
The list applies as soon as it’s saved. Add staging and preview domains too: a host you leave out stops working right away. When you verify a domain under Settings → Domains, Polar adds it to the list with its subdomains, as example.com and *.example.com. Remove either entry if you don’t want it. See Domains.

From the API

Set embed_hosts with Update Organization. The value replaces the whole list. The examples use the sandbox and API version 2026-10:
Available from API version 2027-01: List Organization Embed Hosts, Add Organization Embed Hosts and Remove Organization Embed Host. Adding keeps the hosts already on the list. From that version, the organization no longer carries embed_hosts.

From your agent

Prompt
Uses the organizations_add_embed_hosts operation of the Polar MCP server. organizations_list_embed_hosts reads the list and organizations_remove_embed_host removes one host.
Not available from the CLI.

Write a host

Write the host without a scheme:
  • An entry without a port matches the default port only. example.com doesn’t match https://example.com:8443.
  • HTTPS is always allowed. HTTP is allowed only for local hosts: localhost, names ending in .localhost or .local, and loopback or private addresses such as 192.168.1.10 or 10.0.0.5.
  • A bare * and wildcards on a domain suffix, like *.com, are rejected.
  • A wildcard on a shared platform, like *.vercel.app, is accepted for preview deployments. One trade-off: it lets every site on that platform embed your checkout.

Sites served over HTTP

A public host served over plain HTTP can’t be listed. Move the site to HTTPS first. The message sent after payment carries a customer session token, and on a plain HTTP page anyone on the network can read it.

When the embed stays blank

Open the browser console on the page doing the embedding. A message naming frame-ancestors means the page’s host isn’t on your list. Add it under Settings → Embedding. A Checkout Link opened from a host that isn’t listed doesn’t open the checkout either. The fix is the same. For the Embedded Payment Method, an invalid or expired session token also leaves the embed blank.

Learn more