Skip to main content

Setup

Required env vars:

How it works

Subscriptions are created through checkouts, not paykit.subscriptions.create directly — Polar fires subscription.created once the customer completes a subscription checkout.

Webhooks

Enable these events in your Polar dashboard:
  • order.paid
  • order.created
  • customer.created
  • customer.updated
  • customer.deleted
  • subscription.created
  • subscription.updated
  • subscription.revoked
  • refund.created

Raw Polar events

Every incoming Polar event is also emitted as a polar.<event.type> raw event — typed via the @polar-sh/sdk webhook types:
Polar event to PayKit event mappings:

provider_metadata

provider_metadata for Polar is passed through directly to the underlying Polar SDK call, giving you full access to any field the Polar API accepts: