Skip to main content
Once you’ve set up an endpoint, Polar sends it a signed POST request for each event. Your handler verifies the signature, parses the payload and returns a 2xx status. Anything else counts as a failed delivery, and Polar retries it. The examples use API version 2026-10. The endpoint’s API version must match the version of your SDK import, so the SDK can parse the payloads.

Validate and parse webhooks

The TypeScript and Python SDKs verify the signature and return a typed event in one call. Pass the raw request body: if your framework has already parsed the JSON, the signature won’t match.
POLAR_WEBHOOK_SECRET is the secret from the endpoint page in the dashboard, or the one polar webhook listen prints while you develop. Using Next.js, Nuxt, TanStack Start or Better Auth? A framework adapter gives you this handler in a few lines.

Custom validation

Without an SDK, use a Standard Webhooks library or follow the specification. Each request has these headers: The HMAC key depends on when the endpoint’s secret was generated:
  • On or after 8 September 2026, 00:00 UTC: Standard Webhooks. Pass the whsec_… secret to the library as-is.
  • Before that: Polar’s original HMAC. The key is the UTF-8 bytes of the full whsec_… string. Base64-encode that string before you pass it to a Standard Webhooks library.
The endpoint page in the dashboard shows which scheme applies. Polar SDKs 1.0.0-alpha.19 and later try both keys, so you only pass the whsec_… secret.

Retries and timeouts

A delivery succeeds when your endpoint returns a 2xx status within 10 seconds. Everything else fails: other status codes, timeouts, network and TLS errors, and redirects. Polar doesn’t follow redirects. A failed delivery is retried with exponential backoff, up to 20 minutes between attempts, for 10 attempts in total. An event fails when all 10 attempts fail. Respond as fast as you can. Verify the signature, store or queue the payload, return 202, and do the work in a background job. Polar holds an event briefly while earlier events for the same endpoint are still pending, so events usually arrive in the order they happened. Order isn’t guaranteed. Read timestamps and statuses from the payload rather than relying on arrival order, and handle the same event more than once safely.

Endpoint disabling

Polar disables an endpoint after 10 consecutive failed events. A delivery that fails and then succeeds on retry doesn’t count. When that happens:
  • The endpoint stops receiving new events.
  • Events still waiting to be delivered are skipped.
  • Every member of the organization gets an email.
Fix the endpoint first, then turn it back on: Or run polar webhooks update_webhook_endpoint <id> --enabled=true. To catch up on what you missed, redeliver the skipped events.

Monitor deliveries

Each endpoint’s page in Settings → Webhooks has a Deliveries log with every attempt: its ID, Status (the HTTP code, or Failed), event Type and Sent At. Filter by status, event type, HTTP response class (2xx to 5xx) or date range, or search. Select a delivery to see:
  • Event ID, Event Timestamp and Event API Version
  • Delivery ID and Sent at
  • The Payload Polar sent, with Copy payload
  • The Response your endpoint returned, up to 2,048 characters
Polar keeps payloads and responses for 90 days. After that the event shows as Archived event and can’t be redelivered. From code, list deliveries with List Webhook Deliveries, polar webhooks list_webhook_deliveries --endpoint-id <id> --succeeded=false, or the webhooks_list_webhook_deliveries MCP operation.

Redeliver an event

Redelivery sends the same event again with the same webhook-id, whether the earlier attempts failed or succeeded.
  • Open the endpoint in Settings → Webhooks
  • Select the delivery in Deliveries
  • Click Redeliver

IP allowlist

If a firewall or reverse proxy in front of your endpoint requires an allowlist, allow these addresses:
New IP address3.134.178.243 will start sending production webhooks. Allow it now so deliveries aren’t blocked when Polar starts using it.

Troubleshooting

Not receiving webhooks

Deliveries show up in the log but never reach your handler? Check the HTTP status in the Deliveries log. No status or a timeout
  • Developing locally? Make sure polar webhook listen is running and points at the right port and path.
  • Log at each step of your handler (called, signature verified, handled) to see how far a request gets.
404
  • Run curl -v -X POST <endpoint-url> to confirm the route exists.
  • Check for a trailing slash. Many frameworks resolve /foo to /foo/ with a redirect.
3xx Redirects count as failures. Set the endpoint URL to the final destination. A common cause is a host that redirects between www and the bare domain, as Vercel can. 403
  • Exclude the webhook route from authentication middleware. It must be publicly reachable.
  • On Cloudflare, check the firewall logs and add a WAF rule that allows Polar’s requests.
  • Cloudflare’s Bot Fight Mode blocks webhook requests, and allowlisting Polar’s IPs or a WAF rule doesn’t help. Turn it off under Security → Bots in Cloudflare.

Invalid signature exceptions

  • Pass the raw body, byte for byte. Parsing and re-serializing the JSON changes it.
  • Check the secret. Each endpoint has its own, polar webhook listen prints a different one, and resetting a secret invalidates the old one immediately.
  • Check your server’s clock. The SDKs reject timestamps more than 5 minutes off.
  • Rolling your own validation? See Custom validation for which key to use.

Learn more