Skip to main content
A License Keys benefit issues a unique license key to each customer who buys the product. Your software validates the key against Polar’s API, so you don’t host a license server. Polar also handles expiry, device activations, usage quotas and revocation when a subscription ends. To check keys from your application, see Integrate License Keys.

What the customer gets

A key such as ACME-1C285B2D-6CE6-4BC7-B8BE-ADB6A7E304DA, shown in the Customer Portal. Each customer gets their own key per benefit.

Create it

  • Open Catalog → Benefits
  • Click Create Benefit
  • Choose License Keys as the Type
  • Set the Description and an optional Key prefix
  • Turn on Expires, Limit Activations or Limit Usage if you need them
  • Click Create
Then attach it to a product. See Manage benefits.

Options

Changes to these options apply to keys already issued, not just new ones.

Expiration

How long a key stays valid depends on how the customer got it:
  • One-time purchases: with Expires on, the key expires ttl days, months or years after the purchase.
  • Subscriptions: the expiration setting is ignored. Keys granted through a subscription have no expires_at, stay valid while the subscription is active, and are revoked when it ends.
So the same benefit can produce keys with an expiry date (one-time products) and keys without one (subscription products).
For subscription products, check the key’s status when validating rather than expires_at. A revoked key fails validation.
Polar manages expires_at. Whenever the benefit or the customer’s grant is updated, Polar re-applies the benefit’s expiration to the key, or removes it for subscription keys. A manual change to expires_at through the API is overwritten.

Activations

With Limit Activations, your application must activate a key on each device or instance before validating it there. Polar refuses activations beyond the limit. Each activation has a label and can store conditions (for example a major version or machine ID) that later validations must match. With Enable user to deactivate instances via Polar, customers can remove activations from the Customer Portal, for example when they replace a laptop. Otherwise, your application deactivates them through the API.

Usage limit

Limit Usage gives each key a quota. Your application consumes it by passing increment_usage when validating. Validation fails once the request would exceed the remaining quota. Use it for credits, API calls or generations tied to a key.

Key statuses

Manage keys

In the dashboard, open the benefit under Catalog → Benefits and use the License Keys tab. Select a key to see its usage, validations and activations, change its status, or rotate it. See polar license_keys. Changes to a key fire the benefit_grant.updated webhook.

Rotate a key

If a key is exposed, rotate it. Rotation generates a new key string on the same license key record. The old string stops validating immediately. Status, usage, limits, expiry and activations are kept. You can rotate from the dashboard, the CLI, or POST /v1/license-keys/{id}/rotate. Customers can rotate their own key from the Customer Portal. Only granted and disabled keys can be rotated. Rotating a revoked key returns a 400 error.

Customer experience

After paying, the customer finds the key in the Customer Portal. They can:
  • View and copy the key
  • See its expiry date and remaining usage, when set
  • Deactivate activations, when you allow it
  • Rotate the key if it’s exposed

Revocation

When the benefit is revoked, for example when a subscription ends, the key’s status becomes revoked and it stops validating. The customer no longer sees it in the portal.

Visibility

Configurable, visible by default. A hidden License Keys benefit still issues a key, but the customer never sees it. Hide it only if you deliver the key some other way.

Learn more