What is recorded
Every order is read back from Polar’s API with your token before it counts as verified revenue. Each payment carries the product name, the currency, the order’s time and the customer’s email, hashed and masked before storage.
Connect Polar
1
Open the Polar panel
In CrispStats, open the site’s Settings, then Integrations. Select Connect a payment provider and choose Polar.
2
Create the token
Under Polar organization access token, select Create an access token in Polar. Then:
- Open Settings, then Access tokens, and choose Create token.
- Name it CrispStats and choose No expiration.
- Tick
orders:read,refunds:read,organizations:readandwebhooks:write. - Create the token and paste it here.
3
Paste the token and connect
Paste the token. CrispStats checks it with Polar at once and shows your organization’s name. Select Connect Polar.With
webhooks:write, CrispStats creates one webhook endpoint for this site and the row shows Connected to your organization. Live. Without it, the row says “Updates every minute. Add webhooks:write to the token to see sales the moment they happen.”4
Pass the visitor id at checkout
See pass the visitor id at checkout below.
polar_pat_) is refused: “That is a personal access token for every organization you belong to. Create an organization access token instead.” Polar tokens cannot be edited once made, so a token that lacks a scope is refused with the scope it needs: create a new token with it ticked.
What the token can do
CrispStats does not ask for
subscriptions:read (orders say whether they are new or a renewal), customer scopes, or any scope that changes products, checkouts or refunds. It never moves money.
How fresh the numbers are
Withwebhooks:write, Polar sends each order within seconds and CrispStats checks every 15 minutes as a safety net. Without it, CrispStats reads new orders and refunds every minute, so a sale appears within a minute. An order seen both ways is stored once.
Past payments
When you connect, CrispStats imports every paid order and refund since your first. See revenue history.Test mode
Tokens made in Polar’s sandbox (sandbox.polar.sh) connect to the sandbox. The panel says “This is a test token. Test payments show with a Test tag and never count as verified revenue.” and offers Connect in test mode or Use a live key. Sandbox orders show with a Test tag and are left out of every total.
Pass the visitor id at checkout
Add the id fromcrispstats.id() to the checkout’s metadata as crispstats_visitor_id:
external_id is used as your own user id when the metadata has none. An order without a visitor id is still recorded and counted, without a visit.
Disconnect
Select Disconnect on the Polar row. CrispStats deletes its webhook endpoint in Polar and destroys the saved token and signing secret. Payments already recorded stay. You can then delete the token in Polar.Connections made earlier by pasting a webhook secret keep working. They cannot import history or verify payments: connect again with a token to add both.
Next steps
Pass the visitor id
When there is no id, and attributing across days.
Refunds and renewals
How payment kinds are recorded across providers.
Revenue history
What the import reads and how it avoids counting twice.