TurboJet
PaymentsPayment providers

Polar

Polar.sh products for STARTER membership billing.

Polar is available as a SaaS membership provider when features.paymentsProvider is PaymentProvider.Polar.

Webhook not hosted here

This marketing+docs host does not mount a Polar webhook HTTP route. Adapter code lives in packages/api/src/modules/billing/adapters/polar/. Remount webhooks on a SaaS host in the full TurboJet monorepo.

Get an access token

  1. Create a store at Polar (sandbox: sandbox.polar.sh).
  2. Under Settings → Developers, create a token with the scopes you need.
  3. Copy the token immediately — you cannot view it again.

Create products

Create one Polar product per billing interval you offer (monthly / yearly for STARTER). Paste product IDs into lookupKeys.polar.productIds in packages/payments/src/subscription-plans.ts.

Environment variables

POLAR_ACCESS_TOKEN=""
POLAR_WEBHOOK_SECRET=""
POLAR_ORGANIZATION_ID="" # if required by your Polar setup

Webhooks

In the full kit, configure Polar webhooks (for example subscription lifecycle events) to your SaaS origin — not {MARKETING_URL}/api/webhooks/mayar. After creating the webhook, copy POLAR_WEBHOOK_SECRET.

For local testing of a remounted route, tunnel with ngrok (or similar) to the host that serves the Polar webhook handler.

Activate Polar

paymentsProvider: PaymentProvider.Polar

Redeploy after changing the flag and env vars.

On this page