customer parameter.
Check access
useAccess(featureKey, requested?) returns { allowed, details, isLoading, error }. details is the full check result, from the same request:
requested to ask whether that many more units are available: useAccess('api_calls', 5).
When a quota’s overage is billed or allowed,
remaining goes negative while allowed stays
true. Check details.overage_behavior before showing “limit reached”.Access guard
List entitlements
allowed field and can be up to 60 seconds old: gate with useAccess().
Read usage
limit and remaining, use useAccess().
Record usage
consume() from your backend.
Check on demand
useAccess() checks when the component mounts. To check on a click instead, use the client:
client.allows() returns false for a denial and throws on a real error, such as a 401 or a 500.
