---
title: "Plans and entitlements in license keys · Clavem"
description: "Put Basic, Pro and Team in one product with plans and entitlements, give one license an add-on, and read the features offline from the signed token."
url: "https://clavem.io/blog/plans-and-entitlements-in-license-keys"
---

# Plans and entitlements in license keys: Basic, Pro and Team in one product

A plan is a named set of features on a product. Each license sits on one plan and can carry changes of its own, and the signed token carries the result, so your app can unlock Pro features without a network call.

By [Clavem](https://clavem.io/about) · Updated 26 November 2026

## What is new

Plans and entitlements are new in Clavem in November 2026. A product can define plans, such as Basic, Pro and Team, and give each a set of entitlements: flags, limits and short strings that your app reads to decide what to unlock. A license is on one plan and can carry changes of its own. The signed token carries the result, so the check works offline. They are included on every Clavem pricing plan, the free one too.

Before this, a tier meant one of two things: a separate product per tier, or a variant label that only online responses carried. Both still work. This article is the how-to for the third way, with a made-up app called Inkwell as the example.

## The model

| Term | What it is | Where you set it |
| --- | --- | --- |
| Product | One thing you sell, with its own signing key, releases and validity | Dashboard |
| Plan | A named set of entitlements on a product, with a key such as `pro` and a name such as Pro | The product’s page, under Plans, or the management API or the MCP server |
| Entitlement | One item in a set: `sync: true`, `max_projects: 50` | Inside a plan |
| A license’s changes | The license’s own entitlements, laid over its plan | The license’s page, the management API or the MCP server |
| Effective entitlements | The plan’s entitlements with the changes on top. A change of `null` removes one | Worked out for you |

The dashboard calls entitlements “features”. The API, the token and this article call them entitlements.

## Step 1: define Basic, Pro and Team

Open the product in the dashboard and choose **Plans**, then **Add plan**. Each plan has a name, a key and its features. For Inkwell:

| Entitlement | Basic | Pro | Team |
| --- | --- | --- | --- |
| `export_formats` | `["png"]` | `["png", "pdf"]` | `["png", "pdf", "svg"]` |
| `max_projects` | `5` | `50` | `500` |
| `sync` | not set | `true` | `true` |
| `shared_libraries` | not set | not set | `true` |

The plan key is what your app and the API call the plan: lower-case letters, digits, hyphens and underscores, starting with a letter, at most 32 characters, and fixed once the plan is saved. The name is for people. A product can have 20 plans, and a plan or a license can have 50 entitlements. A value is a boolean, a number, a string of up to 200 characters or a list of up to 50 strings, and a whole set is at most 4 KB. That limit is per plan and per license’s changes, each on its own, so the merged `ent` in the token can reach about 8 KB. The [API reference](https://clavem.io/docs/api#plans) has the full rules.

Name entitlements after what the app does, not after the plan. Your app then asks “may I sync?” and not “is this Pro?”, so adding a Business plan, or giving one Basic customer sync, needs no new release of the app.

## Step 2: map each Stripe price to a plan

In the product’s Stripe mappings, each mapping has a **Plan** choice once the product has plans. Map the Basic price to `basic`, the Pro price to `pro` and the Team price to `team`.

- At checkout, each license is issued on the plan its price’s mapping names.
- When a subscription switches to another price, for example from Basic to Pro in Stripe’s customer portal, its licenses move to the plan the new price is mapped to. That needs a mapping to the same product that names a plan. The license’s own changes stay, and the move shows in your activity feed as a plan change made by Stripe.
- Nothing else moves a plan. A renewal, a failed payment or a cancellation leaves it alone, and so does a plan you set by hand, as long as the subscription’s price does not change.

A price that is unmapped, or mapped with the plan **None**, leaves the license’s plan as it is. That includes a switch to it: a subscriber who moves to a price on None keeps the plan they had, so give your base tier its own plan, such as `basic`, and do not leave it on None. Clavem takes purchases from Stripe only, so the mapping is where a purchase gets its plan. The rest of the billing behavior is in [subscription licenses with Stripe Billing](https://clavem.io/blog/subscription-licenses-with-stripe-billing), and the portal side, including which switches Stripe allows, is in [Stripe customer portal for software](https://clavem.io/blog/stripe-customer-portal-for-software). The mapping steps are in the [Stripe documentation](https://clavem.io/docs/stripe#plans).

## Step 3: give one license an add-on

A Basic customer asks for PDF export, and you agree. A beta tester should see an unfinished feature. Neither needs a new plan. Put the changes on the license instead. Open the license in the dashboard, find **Plan and features**, and add a feature change. Or send it from your own backend:

```bash
curl -X PATCH https://clavem.io/v1/admin/licenses/412 \
  -H "Authorization: Bearer sk_clavem_…" \
  -H "Content-Type: application/json" \
  -d '{ "entitlements": { "export_formats": ["png", "pdf"], "beta": true } }'
```

With the [MCP server](https://clavem.io/docs/mcp), you can ask an assistant to add PDF export to license 412. It calls `set_license_plan`, which takes the license’s plan and, optionally, its changes, and `issue_license` takes a `plan` for a new license. The license now has these effective entitlements:

| Entitlement | Basic plan | The license’s changes | Effective |
| --- | --- | --- | --- |
| `export_formats` | `["png"]` | `["png", "pdf"]` | `["png", "pdf"]` |
| `max_projects` | `5` | not set | `5` |
| `beta` | not set | `true` | `true` |

Three things to know:

- **A list is replaced, not added to.** The license’s `export_formats` replaces the plan’s whole list. Write the full list you want.
- **`null` takes something away.** `{ "sync": null }` on a Pro license removes `sync` for that license only.
- **The changes belong to the license.** A `PATCH` replaces all of a license’s changes at once, so send the full set. The changes stay when the license moves to another plan, whether you move it or Stripe does.

The management API response, trimmed here to the plan fields, shows both sides. `entitlements` is what you sent, and `effective_entitlements` is the result:

```json
{
  "data": {
    "id": 412,
    "plan": "basic",
    "entitlements": { "export_formats": ["png", "pdf"], "beta": true },
    "effective_entitlements": { "export_formats": ["png", "pdf"], "max_projects": 5, "beta": true }
  }
}
```

## Step 4: read the entitlements in your app

The token an activate or validate call returns carries two more fields when they apply. This is the payload for the Basic license with the add-on, with sample values:

```json
{
  "v": 1, "lid": 412, "pid": 75, "kh": "7e0e4148136b6dae", "status": "active", "valid": true,
  "email": "ada@example.com", "iat": 1795043490, "refresh_by": 1796253090,
  "plan": "basic",
  "ent": { "export_formats": ["png", "pdf"], "max_projects": 5, "beta": true }
}
```

`plan` is the plan’s key, and `ent` is the effective set. Both are left out when empty, and `v` stays `1`, so apps written before plans existed keep working. In the app, verify the token as in [offline verification](https://clavem.io/docs/offline), then read `ent`:

```js
// verifyToken and isLicensed are on the offline verification page.
const claims = await verifyToken(storedToken ?? '', PUBLIC_KEY);
const ent = isLicensed(claims, PRODUCT_ID) ? (claims.ent ?? {}) : {};

const canSync = ent.sync === true;
const formats = ent.export_formats ?? ['png'];
const maxProjects = ent.max_projects ?? 3;
```

The defaults live in your app. A key that is not in `ent` is a feature the plan does not grant, and an invalid or missing token gives an empty `ent`, so the app falls back to its free behavior. This code ran against tokens signed by Clavem’s own signing code: one for the Basic license with the add-on, one for a Pro license and one for a license with no plan. A malformed token came back with the defaults. The snippets for [Swift, Electron, Tauri, WordPress and Python](https://clavem.io/docs/guides#features) do the same in each stack.

Online, the validate response has the same effective set as `license_key.entitlements`. Use it to show what a customer has. For the check that turns features on, read the token, because a copy of an unsigned response saved on the customer’s machine is something the customer can edit.

A change you make reaches an app the next time it validates online. Until then the stored token keeps the old plan and entitlements, for at most the 14 days to its `refresh_by`. See [offline license checks](https://clavem.io/blog/offline-license-checks-explained) for that trade.

## Which field means what

The same word is used in three places, and it does not mean the same thing in all of them:

| Where | Field | It holds |
| --- | --- | --- |
| License API, activate and validate | `license_key.entitlements` | The effective entitlements |
| Signed token | `ent` | The effective entitlements |
| Management API | `entitlements` | The license’s own changes |
| Management API | `effective_entitlements` | The effective entitlements |

## Mistakes to avoid

- **Checking the plan’s name in the app.** `if (claims.plan === 'pro')` breaks the day you add a plan or make an exception. Check the entitlement.
- **Putting secrets in entitlements.** The token’s payload is signed, not encrypted, and the customer holds it. Use entitlements for what the app may do, never for keys or credentials.
- **Treating entitlements as protection.** A signed token stops a customer editing `ent`. It does not stop someone patching your app to ignore it. See [license key security mistakes](https://clavem.io/blog/license-key-security-mistakes).
- **Removing a plan that is in use.** The dashboard and the API refuse with a `plan_in_use` conflict while licenses are on the plan or a Stripe price hands it out. Move them first.

## What plans do not do

- **They do not set the device limit, the validity or the downloads.** Those stay settings of the product, and a license’s device limit and expiry can still be set one by one.
- **They do not count usage.** `max_projects` is a number your app enforces. Clavem does not meter it, and it does not hold seats for a team. See [seat-based licensing for teams](https://clavem.io/blog/seat-based-licensing-for-teams).
- **They are not Stripe’s Entitlements feature.** Stripe’s answers a server. These are in the signed token. See [does Stripe generate license keys](https://clavem.io/blog/does-stripe-generate-license-keys).
- **The management API replaces plans as a list.** `PUT /v1/admin/products/:id/plans` takes the whole list, so read it first and send it back with your change in it. There is no call for one plan. The MCP tool `set_product_plans` works the same way.

## Doing this with Clavem

Define the plans on the product’s page, choose a plan on each Stripe price mapping, and read `ent` in the app. The reference for the rules and the fields is in the [API reference](https://clavem.io/docs/api#plans), the token fields are in [offline verification](https://clavem.io/docs/offline#entitlements), and the glossary entry for [entitlement](https://clavem.io/glossary/entitlement) says how the idea fits with the rest of a license.

## Questions

What is the difference between a plan and an entitlement?

A plan is a named bundle on a product, such as Pro. An entitlement is one item in it, such as sync set to true or max_projects set to 50. A license is on one plan and can change single entitlements without leaving it.

Do I need a separate product for each tier?

Not for features. Put Basic, Pro and Team on one product as plans. Plans do not change validity, the default device limit or the downloads, so tiers that need a different validity policy or different release files are still separate products.

Can my app read entitlements offline?

Yes. The signed token carries plan and ent, where ent is the license's effective entitlements. Verify the signature first, then read ent. A change you make reaches an app the next time it validates online, or within 14 days at most.

What happens to licenses when I edit a plan's entitlements?

Every license on the plan gets the change the next time its app validates, because the effective set is worked out from the plan each time. A token already stored on a customer's machine keeps the old values until then.

## Sources

1. [Stripe docs, customer portal (as of November 2026)](https://docs.stripe.com/customer-management)

Add licensing in an afternoon

Connect Stripe, Polar, Dodo Payments or Creem, create a product, call one endpoint from your app. The quickstart walks through every step.

[Read the quickstart](https://clavem.io/docs)
