Skip to main content
Entitlements are how Crovver determines whether a tenant can access a specific feature. Crovver checks the tenant’s active subscription and looks up the feature in the plan’s features map.

How It Works

When you call canAccess:
  1. Crovver looks up the tenant’s active subscription
  2. Fetches the associated plan
  3. Checks plan.features[featureKey] === true
  4. Returns canAccess: true or false
No active subscription → canAccess: false. Subscription in past_duecanAccess: false. Subscription in trialcanAccess: true (trial counts as active).

Checking Access — Frontend

Use the useFeatureAccess hook:

Checking Access — API

Blocking UI with FeatureGuard

The <FeatureGuard> component handles the gate declaratively:

Metered / Credit-Based Limits

Entitlements handle boolean feature access. For consumable resources (API calls, AI tokens, SMS credits), use the credit pool system instead:
  1. Check balance before the action — GET /api/public/credits/balance
  2. Consume credits after the action — POST /api/credits/consume (idempotent)
See Credits & Credit Pools for the full model.