What you'll need
Access to your Polar organization's settings.
Steps
- 1In Polar, go to your organization's Settings → Developers.
- 2Click New Token.
- 3Name it, e.g. "thexly-readonly".
- 4Set an expiration date; any duration works.
- 5Select scopes:
organizations:read,orders:read, andsubscriptions:read. Thexly's connection doesn't need write access to anything except managing its own webhook, which requires a broader webhooks scope. Select whichever webhook-write scope Polar's token screen shows alongside the read scopes above. - 6Create the token and copy it, it's shown only once.
- 7Paste it into Thexly under Settings → Payments → Polar.
What Thexly does with this connection
Thexly reads your organization's orders and subscriptions and matches them against sessions your tracking script captured; see how Thexly assigns revenue to a channel for the full mechanism. The only write call this token makes is registering Thexly's own webhook endpoint on connect.
Polar checkouts aren't auto-decorated by Thexly's tracking script the way Stripe, Dodo, and Lemon Squeezy links are, so if you create Polar checkouts yourself, pass the visitor's session in metadata as thexly_session_id (or a reference_id starting with s_). Call window.thexly.getSessionId() from your checkout page to get it.
The webhook Thexly registers listens for order and subscription lifecycle events: order.paid, order.refunded, and subscription creation, renewal, and cancellation. A refund is matched back to its original order automatically, reducing attributed revenue for that transaction rather than appearing as a separate entry.
Troubleshooting
- Token expired: Polar's API returns an authentication error once a token expires, so requests using it start failing. In Thexly, that connection will show as needing review under Settings → Payments, the same as any other broken connection. Create a fresh token with the same scopes and reconnect.
- Token rejected: check the scopes selected when the token was created include read access to orders and subscriptions; a token with the wrong scopes won't error on save, it'll just return no data.