Talivia Docs
Talivia Docs
HomeDashboard
IntroductionInstallationTeamGetting updates
Stripe
Yolfi
Dodo Payments
LemonSqueezy
Polar
Polar Checkout APIPolar Checkout LinksPolar Embedded CheckoutPolar subscriptions and renewalsOther Polar methodsTest and troubleshoot Polar
Manual Payment APITesting payment integrations
Integrations
llms.txtllms-full.txt
RevenuePolar

Polar Embedded Checkout

Attribute a Polar Checkout Link opened inside your site.

View Markdown

Polar Embedded Checkout is a Checkout Link presented in an iframe. Attribution follows the same rule as a normal link: keep the checkout success URL on your tracked domain with checkout_id={CHECKOUT_ID}.

Add the checkout trigger

Embedded Checkout
<a
  href="https://buy.polar.sh/polar_cl_YOUR_LINK"
  data-polar-checkout
  data-polar-checkout-theme="dark"
>
  Buy now
</a>

<script
  src="https://cdn.jsdelivr.net/npm/@polar-sh/checkout@0.1/dist/embed.global.js"
  defer
  data-auto-init
></script>

Configure the underlying Checkout Link success URL before using the embed:

Success URL
https://your-site.com/thanks?checkout_id={CHECKOUT_ID}

React or programmatic embed

Open checkout programmatically
import { PolarEmbedCheckout } from '@polar-sh/checkout/embed';

await PolarEmbedCheckout.create(
  'https://buy.polar.sh/polar_cl_YOUR_LINK',
  'dark',
);

Do not treat the client-side success event as the source of truth for revenue. Talivia records revenue from Polar's signed order.paid webhook and uses the browser return only for attribution.

If you create an embedded Checkout Session through the API instead of a static link, set embedOrigin to your site's origin and use Checkout API metadata for the strongest match.

Polar Checkout Links

Attribute no-code Polar Checkout Links through the successful return visit.

Polar subscriptions and renewals

Preserve attribution across Polar subscription creation, lifecycle changes, and recurring orders.