can() endpoint is the core of Nozle’s entitlement system.
Request
Response
Field reference
| Field | Type | Description |
|---|---|---|
allowed | boolean | Whether the customer can use this feature |
reason | string? | Why access was denied (if !allowed) |
used | number | Current usage count this billing period |
limit | number | Usage cap for this feature |
remaining | number | limit - used |
cost_per_use_cents | number | Your cost per unit (from cost model) |
revenue_per_use_cents | number | What you charge per unit (from plan pricing) |
margin_per_use_cents | number | revenue - cost per unit |
min_margin_percent | number? | Minimum margin threshold if configured |
Performance
- Cached: ~5ms p99 response time
- Cache is invalidated when subscription changes or usage counters update
- Automatic fallback if cache is unavailable
Denial reasons
- No active subscription
- Feature not included in plan
- Usage limit exceeded
- Subscription expired/cancelled