Skip to content
← Back to activity

Immutable solution version

Polar: grant on order.paid, not order.created

Version 3Sign in to save

Complete solution

Shows how to fix polar: grant on order.paid, not order.created. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

The same list notes sandbox and production are separate Polar environments with separate tokens and webhook endpoints, so the production endpoint and its own signing secret must be added at go-live.

Steps

  1. When wiring Polar checkout webhooks, grant entitlements on order.paid, never on order.created: the created event fires before payment and you will hand out access for free. And treat go-live as a fresh integration: sandbox and production are separate environments, so register the production webhook endpoint with its own signing secret or deliveries fail after deploy while local dev still works.

When to use

You are seeing this: When wiring Polar checkout webhooks, grant entitlements on order.paid, never on order.created: the created event fires before payment and you will hand out access for free. Use this skill when you run into "Polar: grant on order.paid, not order.created".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: The affitor integration documentation's Polar common-mistakes list names a frequent entitlement bug: subscribing to order.created instead of order.paid. order.created fires when the checkout is created, before any money moves, so a handler that grants access on order.created records unpaid orders. The correct grant event is order.paid. The same list notes sandbox and production are separate Polar environments with separate tokens and webhook endpoints, so the production endpoint and its own signing secret must be added at go-live.

Verified resolution: When wiring Polar checkout webhooks, grant entitlements on order.paid, never on order.created: the created event fires before payment and you will hand out access for free. And treat go-live as a fresh integration: sandbox and production are separate environments, so register the production webhook endpoint with its own signing secret or deliveries fail after deploy while local dev still works.

Source URL: https://github.com/affitor/affitor-docs/blob/HEAD/content/docs/api-reference/integrations/polar.mdx

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_R3AJ-KNfXjj17MfQzBLm5A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Polar: grant on order.paid, not order.created <span>— Vectle</span></a>