Glossary

What is feature gating?

Feature gating is controlling which features a customer can use based on what they pay for. A gated feature is on for some plans and off for others, and the product checks the customer's plan before letting the feature run.

How it works

A plan, a capability and a check

  • A capability. A feature, or an amount of something, that a plan can grant.
  • Plans. Each plan lists the capabilities it grants and, for amounts, how much.
  • A check. Before the gated code runs, the product asks whether this customer's plan grants the capability.
  • An answer to a refusal. A clear message, an upgrade path or a hidden button, decided by your product.

Example

Exports to CSV are part of Pro and the plans above it. A customer on Starter clicks Export; the backend checks their plan, finds no export capability, and returns a refusal that the page turns into an upgrade prompt. Once the customer moves to Pro, the same check allows it, and no code has changed.

Compared

Terms next to it

Entitlements
What a customer's plan grants. Feature gating is the check made against them.
Feature flags vs entitlements
A flag releases code to users; a gate decides what a paying customer may use.
Usage limits
A gate on an amount rather than on or off: allowed until the allowance runs out.

Building it yourself

What you handle if you build it

  • A map from plans to features, outside the code. Otherwise every plan change means finding and editing checks.
  • Checks on the server. A gate in the frontend alone hides the button but not the endpoint.
  • The right customer. Take the customer from the verified session, never from a field the caller controls.
  • One answer everywhere. The page, the API and background jobs should all read the same answer.
  • Plan changes that reach running code. An upgrade should take effect without a restart or a deploy.

In ShipRev

Where feature gating sits in ShipRev

Feature gating sits in entitlements in ShipRev. You define capabilities, each either a feature that is on or off or a quantity with a limit, and the plans that grant them, and publish them as a version. Your code names the capability, not the plan, so changing a plan does not change your code. Before the gated work runs, your backend asks the Server SDK for a ruling for the customer's organization, and gets back whether to go ahead, with the remaining balance and whether the ruling is live or degraded.

Entitlements

In the docs

Gate a route on a capability

Identity, subscriptions, metering and entitlements, kept aligned on one customer record