Skip to content

Revenue attribution setup

Connect Polar for revenue attribution

Create a Polar Organization Access Token (polar_oat_), and Thexly registers its own webhook and imports paid orders from the last 30 days plus existing subscriptions.

What you'll need

Access to your Polar organization's settings.

Steps

  1. 1
    In Polar, go to your organization's Settings → Developers.
  2. 2
    Click New Token.
  3. 3
    Name it, e.g. "thexly-readonly".
  4. 4
    Set an expiration date; any duration works.
  5. 5
    Enable Checkout Read, Orders Read, Organization Read, Products Read, Subscription Read, and Webhook Write. Use an Organization Access Token. It starts with polar_oat_.
  6. 6
    Create the token and copy it, it's shown only once.
  7. 7
    Paste 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. On connect it imports paid orders from the last 30 days, plus existing subscriptions. 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. Buyers sent back to a page with the Thexly script whose URL keeps Polar's checkout_id can be matched as well.

The webhook Thexly registers listens for order.paid, order.refunded, subscription.created, subscription.active, subscription.updated, subscription.canceled, subscription.uncanceled, subscription.revoked, and subscription.past_due. Renewals arrive as paid orders (order.paid), not as a subscription renewal event. Subscription events update subscription status. 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: if data stops arriving, reconnect with a new Organization Access Token.
  • Token rejected: the connection won't save, and Thexly shows which permissions to enable: Checkout Read, Orders Read, Organization Read, Products Read, Subscription Read, and Webhook Write.

What's next

Verify it's working.

Running Meta ads? Follow Meta Ads and Polar setup to tag your campaign URLs so payments match to campaigns.

Connecting this for a client site? See Thexly for agencies for the multi-client plan.

← Back to Docs