Key concepts
- Active entitlement — The user currently has access to this feature.
- Source — Where the entitlement originated:
appstore,playstore,stripe,manual, orunknown. - Expiration — Subscription-based entitlements have an
expirestimestamp. Non-recurring purchases may not expire.
Entitlement object
| Field | Type | Description |
|---|---|---|
id | string | Entitlement identifier (e.g., plus, premium) |
active | boolean | Whether the user currently has the entitlement |
started | integer | Activation timestamp (Unix epoch seconds) |
expires | integer | Expiration timestamp (Unix epoch seconds) |
source | string | Purchase origin (appstore, playstore, stripe, manual) |
product | object | Associated product details |
Available endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /users/{user_id}/entitlements | Retrieve all entitlements for a user |
| POST | /users/{user_id}/entitlements | Grant an entitlement to a user |
| DELETE | /users/{user_id}/entitlements/{id} | Revoke an entitlement from a user |
Authentication
- GET requires a Project Key.
- POST and DELETE require a Secret Key (
sk_prefix). Never expose the secret key in client-side code.