Entitlements vs. feature flags
Feature flags are boolean on/off access checks tied to a feature key. A flag answers a single question: does this company currently have access to this feature? Entitlements carry richer state — they include the enabled status, remaining usage quota, and other metadata associated with a feature on the active plan. Use entitlements when you need to show usage limits or enforce metered consumption.How access is resolved
ArcenPay evaluates access in the following order:- Company-specific overrides are checked first.
- Active subscription plan entitlements are applied next.
- Purchased add-ons and one-time grants are merged in.
- Optional usage rules or traits can further refine the final result.
Checking access in React
The React SDK provides hooks for reading flags and entitlements inside your components.
A typical gating pattern in a component:
React hooks reflect the customer’s current session state. They are suitable for UI gating but should not be used as the sole guard on sensitive or billable server operations.
Consuming entitlements in React
Callconsume() when the customer performs an action that should decrement a usage-based entitlement:
Tracking metered usage in React
UseuseTrack to emit a usage event without directly consuming an entitlement counter:
Checking access on the server
Use the Node SDK to enforce access in your API routes and backend handlers. Server-side checks are authoritative and should guard any operation that is sensitive, billable, or has side effects.Consuming entitlements on the server
When a billable operation completes on the server, consume the entitlement with an idempotency key to prevent double-counting:Using FeatureFlagGuard
The React SDK exports aFeatureFlagGuard component that conditionally renders children based on a flag:
Next steps
- Subscriptions — understand the lifecycle behind entitlement state.
- Plans — see how plan definitions control which entitlements are granted.

