Centralized subscription and feature access

Billing architecture

TL;DR
  • Access checks were at risk of spreading across routes and components.
  • I needed product code to ask for capabilities without knowing billing-provider details.
  • I centralized plans, trials, comped access, and route gates behind an entitlement resolver.
  • The result was clearer access logic and fewer pricing rules leaking into interface code.

Billing logic spreads quickly when every screen asks its own version of “can this user do this?”

Where it started

Plan checks, trial checks, and route gates could each become their own local interpretation of account access.

What needed to change

An entitlement resolver centralizes access decisions. Plans, capabilities, trials, comped access, and route gates can all resolve through one product-facing boundary.

What I built

The resolver receives account context and returns the capabilities available in that context. Product routes and components can ask for capability state without knowing the billing provider details.

What changed

Access logic becomes easier to explain and easier to test. It also keeps pricing rules from leaking into unrelated interface code.

What I would watch

Entitlements need careful naming. A vague capability can become a loophole or a blocker depending on how it is reused.