How It Works
- Create features for your product (via Platform UI)
- Link features to prices within a plan
- Customers subscribe and entitlements are provisioned automatically
- Check entitlements via API to gate access in your application
Feature Types
Boolean
Simple on/off access. Either the customer has it or they don’t.Examples: SSO enabled, Premium support, API access
Static
Fixed capability with configuration values that define limits or quotas.Examples: 25 team seats, 100GB storage, 1000 API calls/month
Metered
Usage-based access enforced against real consumption data. The customer’s quota decrements as they use your product.Examples: 1M tokens/month, 100 API calls/day, 50GB storage
Creating Features
You can create features via the Platform UI or the API.- Platform UI
- API
Create a new feature
Click New Feature and fill in the details:
- Name: Display name shown in the UI (e.g., “AI Tokens”)
- Key: Unique identifier used in API calls, lowercase with hyphens (e.g.,
ai-tokens) - Type: Boolean, Static, or Metered
Linking Features to Prices
Once you have features, link them to prices within your plans. This determines what entitlements customers receive when they subscribe.To add features to a plan without charging for them, create a fee with a price of 0. This lets you attach a feature for entitlement purposes while not billing the customer.
Automatic Entitlement Provisioning
When a customer subscribes to a plan, entitlements are automatically provisioned based on the features linked to that plan’s prices. When the subscription is terminated, they are canceled. No manual intervention required.Checking Entitlements via API
Use the API to check if a customer has access to specific features. This is how you gate functionality in your application.API Reference: See the List Entitlements API endpoint for complete request and response schemas.
List Customer Entitlements
Response Format
Key Response Fields
| Field | Description |
|---|---|
hasAccess | Whether the customer currently has access to this feature |
featureKey | The unique identifier for the feature |
featureType | boolean, static, or metered |
config | For static features, the configuration values (limits, quotas, etc.) |
status | Current status: active, expired, or canceled |
The list endpoint (
GET /v1/entitlements) returns hasAccess but does not include balance or usage data. To get real-time balance and usage for a metered entitlement, use GET /v1/entitlements/{entitlementId}.Metered Features
Metered features enforce usage-based quotas against real consumption data. Instead of a static config value, the system tracks how much the customer has actually used and compares it against their granted limit.How metered entitlements work
- You configure a feature with
type: meteredand link it to a price with a billable metric - The entitlement template defines the usage limit (e.g.,
{ "limit": 1000000 }) - As the customer sends meter events, their usage accumulates
- Your application checks the entitlement balance before allowing each operation
hasAccess always reflects current consumption.
Checking a metered entitlement balance
UseGET /v1/entitlements/{entitlementId} to get a real-time snapshot of a customer’s usage and remaining quota. For metered entitlements, the response includes live balance and usage data in addition to the base entitlement fields.
Balance response
| Field | Description |
|---|---|
id | The entitlement ID |
featureKey | The unique identifier for the feature |
featureType | Always "metered" for metered features |
status | Entitlement status: active, expired, or canceled |
hasAccess | true if the customer still has quota, or if the entitlement is configured as a soft limit |
balance | Units remaining in the current period |
usageInPeriod | Units consumed so far this period |
overage | Units consumed beyond the granted limit (if soft limit) |
currentPeriodStart / currentPeriodEnd | The active billing or entitlement period |
Hard limits vs soft limits
By default,hasAccess becomes false once balance reaches zero. You can configure an entitlement as a soft limit, which allows usage to continue beyond the granted quota (generating overage) while still returning hasAccess: true.
Use soft limits when you want to track overages for post-period billing or alerting, without hard-blocking the customer at the quota boundary.
Required setup
For a metered feature to work, your price must be linked to a billable metric that haseventType, valueProperty, and aggregation configured. The grant engine uses these fields to query the meter data and calculate current usage.
See Meter Events for how to instrument your application to send usage data.
Use Cases
Feature Gating
CheckhasAccess before enabling premium features in your application:
Enforcing Static Limits
Readconfig values for static features to enforce limits:
Enforcing Metered Quotas
Check the balance endpoint before allowing consumption:Next Steps
- Meter Events — Send usage data that powers metered entitlements
- Billable Metrics — Configure how meter events are aggregated
- Customer Lifecycle — Creating subscriptions that provision entitlements
- Plans — Configure pricing plans
- Prices — Set up prices with features