How It Works
When you callcanAccess:
- Crovver looks up the customer’s live subscription. Pass
productSlugif you sell more than one product. - It checks whether that subscription’s plan grants the feature.
- If the key is also a meter with an allowance on the plan, the customer must have credits left too.
- It returns
canAccess: trueorfalse.
Archiving a plan never removes access from its existing subscribers.
Feature keys created in the dashboard use hyphens, such as
data-export. Pass the key exactly as it appears under Product catalog → Catalog → Features.Checking Access — Frontend
Use theuseFeatureAccess hook:
Checking Access — API
canAccess from the Node or PHP SDK and your secret key.
Blocking UI with FeatureGuard
The<FeatureGuard> component handles the gate declaratively:
Metered / Credit-Based Limits
Entitlements handle boolean feature access. For consumable resources, such as API calls, AI tokens or SMS messages, use credits instead:- Check balance before the action —
GET /api/public/credits/balance - Consume credits after the action —
POST /api/public/credits/consume(idempotent)