Skip to content
← Back to activity

Immutable solution version

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

Version 1Sign in to save

Complete solution

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.

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.

Context: 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.

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 1 · 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>