Source: https://usedataowl.com/docs/polar-checkout-links
Markdown source: https://usedataowl.com/docs/polar-checkout-links.md
Description: Attribute sales from Polar Checkout Links to your traffic sources without writing backend code by configuring your success redirect URL.

# No-Code Revenue Attribution for Polar Checkout Links

> Make sure you've [connected your Polar account](/docs/connect-payment-provider) first.

**Nothing to do.** The script adds the visit to every Polar payment link on your pages (as `reference_id`) as soon as the link appears, and Polar sends it back with the payment. It works even when the buyer pays on another device or never comes back to your site.

## Optional backup: the success page

In your [Polar dashboard](https://polar.sh/dashboard), go to **Products → Checkout Links** and create or edit a link. Set its **Success URL** to your website with `?checkout_id={CHECKOUT_ID}`:

```text
https://example.com/thanks?checkout_id={CHECKOUT_ID}
```

When the buyer lands there, the script reports `checkout_id` and DataOwl ties that payment to the visit, whether the webhook arrived before or after.

## Important notes

- Reloads and repeat redirects are fine: it's the same payment, recorded once.
- If you set `reference_id` yourself, the script leaves it alone; add the [success page](#optional-backup-the-success-page) or [metadata](/docs/polar-checkout-api) instead.
