Skip to main content
Entitlements control what a customer can do based on subscription and usage state.

Two decision types

  1. Feature gates — boolean access, such as analytics or SSO.
  2. Usage limits — numeric caps, such as monthly requests or generated reports.

Server-side enforcement

Call can() immediately before protected work. The response can include usage and margin context in addition to the allow/deny decision.

React presentation

Fetch entitlement state through your authenticated backend and pass it into presentational gates:
The React component improves the interface; your backend check remains the authorization boundary.

Updates

Refresh entitlement state after checkout, subscription, or usage changes. For push-based updates, issue a separate server-authorized realtime token or publish through your own authenticated channel. Never send pk_ or sk_ credentials to a browser WebSocket connection.

Margin-aware decisions

can() can return unit cost, revenue, margin, thresholds, and warnings. Use those fields for observability or merchant-defined policy without exposing them to customers unless required.

The can() endpoint

React feature gates

Node.js entitlements

Python entitlements