Entitlements & credits
Model access with a feature, a holder, an allocation, and an expiration.
What is an entitlement?
An entitlement is the right to use a feature. Its grant records the holder, feature identifier, remaining credits, paid-through time, renewal flag, and payment evidence. Live deployments store grants on Registry.
| Field | Meaning |
|---|---|
| holder | Exact customer identity used by your integration. |
| feature | Stable feature identifier such as ocr or research_fetch. |
| remaining | Remaining metered units, serialized as a decimal string. |
| paid_through | Timestamp after which access is no longer valid. |
| renewal_enabled | Renewal preference, separate from the current access period. |
| worker_id | Optional agent binding; another worker cannot use a worker-bound grant through paid_run. |
Numeric and boolean features
Numeric features meter units, such as API calls or document processing credits. Consumption reduces remaining. Boolean features represent on/off access until expiry; an access check does not burn numeric credits.
The built-in catalog includes ocr and research_fetch. Providers can define additional feature identifiers in the dashboard. Keep the same identifier in the plan, checkout, and application check.
Expiry and cancellation
An expired grant cannot authorize new usage. For a contract-backed subscription, the paying wallet must approve cancellation on-chain, then the platform reconciles it. For a grant without a subscription, cancellation updates its renewal preference. Both preserve the current paid period. Exhausted numeric credits deny further metered work even before the timestamp expires.
Show the customer’s actual paid_through date. Cancel renewal does not mean “access ends now.”
Credit retries
Use a stable idempotency key for one logical usage event. Reusing a key for another operation is not a new allocation. The Avalanche registry enforces duplicate operation IDs and conflicting retries on-chain; private discovery and recovery metadata remain in PostgreSQL. Reconcile an uncertain operation before submitting it with a different key.