The entitlement identifier, e.g. pro.
Entitlements
Grant and revoke access for a customer programmatically.
An entitlement is a named level of access (like pro) that a customer either
has or doesn't. Entitlements are normally driven by validated purchases, but you
can also grant them directly — for promotions, customer support, cross-platform
access, or migrating existing subscribers.
Entitlement state lives on the customer object: reading a customer tells you which entitlements are active. This page covers granting an entitlement to a specific customer.
The entitlement object#
idstringis_activebooleanWhether the entitlement currently grants access.
product_idstringThe product that granted the entitlement, or null for a manual grant.
expires_atstringISO 8601 expiry, or null for a non-expiring grant.
storestringThe source of the entitlement, e.g. app_store, play_store, or promo
for a manual grant.
Grant an entitlement#
POST /v1/apps/{app}/customers/{app_user_id}/entitlements
Grants an entitlement to a customer. If the entitlement is already active, its
expiry is extended to the later of the current and requested expires_at.
appstringrequiredThe app ID.
app_user_idstringrequiredThe customer's app_user_id, e.g. u_812.
entitlementstringrequiredThe entitlement ID to grant, e.g. pro. Must exist in the
catalog.
expires_atstringISO 8601 expiry for the grant. Omit for a non-expiring (lifetime) grant.
curl -X POST \
https://api.cashsdk.com/v1/apps/app_2mK4pQ/customers/u_812/entitlements \
-H "Authorization: Bearer csk_sk_..." \
-H "Content-Type: application/json" \
-d '{ "entitlement": "pro", "expires_at": "2026-12-31T23:59:59Z" }'
{
"id": "pro",
"is_active": true,
"product_id": null,
"expires_at": "2026-12-31T23:59:59Z",
"store": "promo"
}
Granting an entitlement unlocks paid features without a store purchase. It does not create a subscription in the App Store or Google Play and will not renew or bill automatically.
A manual grant emits an entitlement.granted event.
Revoking a manual grant (from the dashboard or by letting it expire) emits
entitlement.revoked.