Feature gating is how you turn your free users into paying customers. By restricting access to premium features based on plan, you create natural upgrade moments that drive revenue — without frustrating your users.
Feature types
BillingOS supports three types of features:
Client-side gating
Using the FeatureGate component
The simplest approach — wrap content with <FeatureGate>:
Content is only rendered if the user has access. Add a fallback for users who don’t:
Using the useFeature hook
For more control, check access programmatically:
Using the useFeatureGate hook
Combines access checking with automatic callbacks:
Server-side gating
For API routes and server actions, use the Node SDK:
Always validate entitlements on the server for security-critical features. Client-side gates improve UX but can be bypassed.