Entitlement checks
Stigg supports three types of feature entitlements: boolean (on/off), numeric (configuration values), and metered (usage-tracked with limits).Generic entitlement check (recommended)
A unified method to check any type of feature entitlement. It automatically returns the appropriate entitlement type based on the feature configuration. You provide the customer ID and feature ID. Optionally, pass a resource ID for multi-subscription products, or a requested usage amount to proactively check if additional usage would be allowed (metered features only).Soft-limit credit entitlements
For credit entitlements configured with a soft limit,getEntitlement returns hasAccess: true and hasSoftLimit: true even after the credit balance reaches zero. This lets your application distinguish between:
- Hard limit exhausted —
hasAccess: false(block the action) - Soft limit exceeded —
hasAccess: true,hasSoftLimit: true(allow but track overage)
Node.js
getEntitlement responses return the same hasSoftLimit signal as the underlying credit entitlement.
