# Plan Tier Feature Authorization

> Verify that paid tier boundaries are enforced server-side, so every free, trial or lapsed plan fails closed at the operation level. Use when features are gated by subscription tier, trial state, feature flags or seats rather than by ordinary roles

- Skill: `wsh7ash/plan-tier-feature-authorization` (Agent Skill)
- Install (CLI): `npx get-skill add wsh7ash/plan-tier-feature-authorization`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wsh7ash/plan-tier-feature-authorization/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Wsh7Ash (https://skillmd.com/u/wsh7ash)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/wsh7ash/plan-tier-feature-authorization

---


# Plan Tier Feature Authorization

> Verify that paid tier boundaries are enforced server-side, so every free, trial or lapsed plan fails closed at the operation level

**Use when:** features are gated by subscription tier, trial state, feature flags or seats rather than by ordinary roles

**Avoid when:** the product charges nothing and has no tiering worth modeling, in which case the tier dimension is empty

## Procedure

1. List every feature-boundary dimension: plan, trial, seat count, feature flag, region lock and grace period.
2. Create or obtain environments in your own accounts representing each gating state, and document the underlying state field.
3. Call each gated operation per state and record status, response shape and any content that leaked anyway.
4. Test boundary transitions: expired trial, downgraded plan, exhausted seat and disabled flag, after each change re-call.
5. Verify checks live in the operation rather than in pricing summary endpoints only.
6. Record enforcement per feature, since one tier feature frequently lives at three different layers simultaneously.

## Signals

- A free plan can trigger a paid feature via its operation, even though no pricing link on the free plan exposes it.
- Trial or grace state blocks interactive use but not an operation that writes in the same resource family.
- Feature flag flips change client UI but leave the operation itself open, so a stale client still gets the feature.
- Seat exhaustion blocks creation yet export or read of each over-limit seat's data still succeeds.

## Patterns

**1. Tier probe**

```text
plan=free -> POST /api/paid-feature -> 200 with data -> tier not enforced operationally
```

**2. Flag audit**

```text
flag=beta-copilot off: UI hides, operation gated=no -> operation-level check missing
```

**3. Result row**

```text
feature=pdf-export states={free,trial,paid} operations=3 enforced=trial-only=2
```

## Pitfalls

- Equating tier with visibility and forgetting operations entirely, the exact surface the tier must actually guard.
- Testing a paid tier only, never the states around it, so the boundary transitions remain unproven.
- Ignoring time-limited states such as trials or might-cancel plans, which reset boundaries the day after they restart.

## Done when

- Each gated feature has a per-state demonstration covering the operation layer, not just the UI.
- Boundary transitions re-verified after change, and no state produces server behavior contradicting its pricing promise.

## References

- [OWASP - feature gating guidance](https://cheatsheetseries.owasp.org/)
- [PortSwigger - access control](https://portswigger.net/web-security/access-control)

