Entitlements¶
An entitlement is the resolved answer for one subscriber and one feature right now. You edit plans, subscriptions, and overrides. Checks compute this value.
Resolution order¶
effective(subscriber, feature) =
if non-expired override for feature exists → override value
else if active subscription's plan grants feature → plan value
else → not entitled
| Feature kind | Not entitled | Entitled |
|---|---|---|
flag |
allowed: false, source: none |
allowed: true, source: plan \| override |
limit |
limit: 0, source: none |
limit: N \| null, source: plan \| override |
limit: null means unlimited.
Check and list¶
Same resolution, two shapes:
| POST check | One feature |
| GET entitlements | Snapshot of effective features |
How you call them is up to you: Check access. |
Source¶
source |
Meaning |
|---|---|
override |
Non-expired override decided it |
plan |
Active plan grant applied |
none |
No override, no plan grant |
For flags, denies from override still use source: override with allowed: false.
For limits, a plan grant of 0 is still source: plan with limit: 0 (explicit zero). Missing grant is source: none, limit: 0.
Endpoints: Entitlements API. If you cache: Webhooks.