Entitlements fill a plan and are used as feature gates in app code.
Entitlements
An entitlement is a feature right. It is not sold alone: users buy a plan, and entitlements are attached to that plan.
After purchase, gate with entitlement codes, not plan titles:
await platform.hasEntitlement("cloud_sync");
Role in the model
Plan (primary)
└── plan entitlements ← entitlements catalog + plan_entitlements
Admin: create entitlements first, then compose plans from them.
Integration: think “which plan was bought → which entitlements it granted”.
Fields
| Field | Required | Notes |
|---|---|---|
code | yes | hasEntitlement('code') |
name | yes | Admin / UI label |
description | no | Optional |
Runtime
GET .../entitlements/me returns codes[] plus rows with period metadata (mirrors subscription/plan term).
Rules of thumb
- Free-local features usually have no server entitlement.
- Paid capabilities live as entitlements on paid plans.
- One entitlement per capability, not per price point.