
Polar handles subscription license management automatically: licenses are issued when someone subscribes, updated on plan changes, and revoked when subscriptions end. Keyforge connects to Polar to add what its built-in system does not include: offline license verification, perpetual fallback, and free trial license automation.
This guide covers subscription licensing for Polar. If you are selling individual purchases instead, see the Polar purchases guide.
Why Keyforge
Polar covers the subscription license lifecycle well. Keyforge is a purpose-built licensing platform that adds specific capabilities on top of it.
- Offline secure verification. Keyforge signs license data cryptographically, so your app can validate licenses locally without a network request. Polar's native license keys require an API call to verify.
- Free trial support. Keyforge issues a license when a free trial begins, so customers get their key immediately. The license expires if the trial ends without converting.
- Perpetual fallback. Instead of immediately revoking a license on cancellation, you can configure your app to grant limited access after the subscription lapses.
Setting up
Prerequisites
Before starting, make sure you have:
- A product created in the Keyforge dashboard.
- A Polar organization with at least one subscription product.
Step 1: Connect your payment account
Go to Payment Accounts in the Keyforge dashboard and connect your Polar account.

Keyforge uses a restricted API key with only the permissions it needs. Your credentials are encrypted at rest with AES-256.
Once connected, Keyforge automatically configures the webhook endpoint on your Polar organization.
Step 2: Connect your subscription product
Go to Payment Products and click Connect product to link a Polar recurring price to a Keyforge product.

For recurring prices, Keyforge always creates a timed license. The expiration is set to match the end of the current billing period and is automatically extended every time an invoice is successfully paid.
You can configure:
- Maximum devices: how many devices the license can be simultaneously activated on.
Step 3: Start selling
With the setup complete, Keyforge handles the rest. When a customer subscribes through Polar:
- A timed license is created with an expiration matching the subscription period.
- The customer receives a personalized email with their license key.
- On each successful renewal, the license expiration is automatically extended to match the new billing period.
If a subscription is cancelled, the license remains active until the end of the current paid period and then expires automatically.
Managing plan changes
Polar supports plan changes through its customer portal. To keep licenses in sync when customers upgrade or downgrade, connect each Polar price to its own Keyforge product. Keyforge detects the plan change and automatically updates the license to match the new configuration.
Device limits, custom notes, and other license settings stay in sync with the customer's current plan without any extra work on your end.
Free trials
Free trials work without any extra Keyforge configuration. Set up the trial period in Polar, and Keyforge generates the license when the trial begins so customers get their key immediately. Licenses expire if the trial ends without converting.
Perpetual fallback
Perpetual fallback is a product-level setting that allows expired licenses to remain in a limited state rather than becoming fully invalid. When enabled, expired licenses have a status of fallbacked instead of expired. Your application decides what limited access means in practice.
const data = await res.json();
if (data.status === 'active') {
// Full access - subscription is current
} else if (data.status === 'fallbacked') {
// Subscription lapsed - grant limited access
} else {
// Invalid - prompt the user to enter a license key
}For subscriptions, this is most useful when customers have built up something of value during their subscription. Some examples:
- Content access: let customers keep viewing content or exports they created while subscribed, even after cancellation.
- Offline data: keep locally cached data or downloaded assets accessible after the subscription ends.
- Grace window: give customers a short period to re-subscribe before their access is fully revoked, by comparing the expiration date to the current date.
When paired with the customer portal, customers whose subscriptions have lapsed can see their license status and re-subscribe through the Polar billing portal without needing to contact support.
Customer portal
Customers access a self-serve portal at keyforge.dev/portal using just their email address. No account creation is needed. They receive a 48-hour access link by email.
From the portal, customers can:
- View all their licenses and manage active device activations.
- Access the Polar customer portal to update payment methods, change plans, or cancel their subscription.
All billing and subscription management is delegated to Polar. Keyforge keeps licenses automatically in sync as billing events happen.
You can customize the portal per product: add a purchase note or thank-you message, include a custom button (e.g., linking to your download page), and control whether customers can reset their own device activations.
Conclusion
Once connected, Keyforge and Polar handle the full subscription license lifecycle automatically. New subscribers get a license key by email, renewals extend it, plan changes update it, and cancellations expire it at the right time, with no backend required on your end.
For individual purchases instead of subscriptions, see the Polar purchases guide.
Simplify your licensing process
Focus on building your product and let us handle licensing. Manage license keys via payments and offer your customers a smooth self-serve experience.