Polar
Attribute every Polar payment to the visit that brought it.
Updated 21 Oct 2026
Connect
- In Polar, open Settings → Webhooks → Add endpoint and copy its secret.
- In atrby, open Revenue → Payment processors → Connect, choose Polar and paste the secret.
- atrby shows your webhook URL. It looks like
https://app.atrby.site/api/webhooks/polar/…. Add it in Polar and send these events:order.paid,order.refunded.
The connection shows as active once the first webhook arrives. Webhooks with a wrong signature are rejected.
Pass the visit ids
Where they go: Checkout metadata, which Polar copies to the order. Read them in the browser with atrby.ids() and send them to your server with the checkout request.
const ids = window.atrby?.ids(); // { atrby_sid, atrby_site }await polar.checkouts.create({
products: [productId],
metadata: { ...ids, atrby_uid: user.id },
});atrby_uid is your user id, from identify. It's optional, but it credits payments made long after the first visit.
What gets recorded
- Each payment once, however often Polar retries the webhook.
- Full and partial refunds are subtracted from the source of the original order.