Gate features by plan tier using the same model you use for roles and permissions. No more scattered plan checks in business logic.
Your product has Free, Pro, and Enterprise plans. Pro users get analytics and CSV export. Enterprise users get SSO and API access. You need to gate these features cleanly, and upgrading a customer should be instant.
Every feature has its own if (plan === 'pro') check buried in business logic.
You're using feature flag tools to gate paid features, mixing deployment concerns with authorization.
Changing what a plan includes means updating code and redeploying.
Support can't easily answer "does this customer have access to analytics?"
Model each plan tier as a group. Assign feature flags to the group. When a customer upgrades, move them to the new group. No code changes.
Use the same check() API for feature gates as you do for permissions. One pattern for everything.
Move a customer from plan:free to plan:pro via the API or dashboard. All gated features activate immediately.
The Workspace CRM scenario includes plan-based feature gating. Switch between Free and Pro users to see features appear and disappear.