Core Resources
Entitlements
A Customer Entitlement represents access to a specific entitlement feature granted to a customer, typically driven by an active subscription. While you own and host your content, Recharge provides the logic engine that determines a customer's real-time access status based on their active subscriptions.
#The customer entitlement object
A Customer Entitlement represents access to a specific entitlement feature granted to a customer, typically driven by an active subscription.
Attributes
- idintegerUnique numeric identifier for the customer entitlement.
- customer_idintegerUnique numeric identifier for the customer associated with this entitlement.
- entitlement_feature_idintegerUnique numeric identifier for the entitlement feature being granted.
- granted_by_idstringThe ID of the entity that granted this entitlement (e.g. the purchase item ID or API token ID).
- granted_by_typestringHow the entitlement was granted to the customer.Possible values
purchase_itemapimanual - expires_atdatetimeThe date and time at which the entitlement expires. If null, the entitlement does not expire.
- created_atdatetimeThe date and time at which the customer entitlement was created.
- updated_atdatetimeThe date and time at which the customer entitlement was last updated.
- deleted_atdatetimeThe date and time at which the customer entitlement was deleted. If null, the entitlement has not been deleted.
{
"customer_entitlement": {
"id": 72,
"customer_id": 226536730,
"entitlement_feature_id": 21,
"granted_by_id": "747832689",
"granted_by_type": "purchase_item",
"expires_at": "2026-02-06T05:59:59+00:00",
"created_at": "2026-01-05T15:11:23+00:00",
"deleted_at": null,
"updated_at": "2026-01-05T15:11:23+00:00"
}
}#List customer entitlements
GET/customer_entitlements
Retrieve all entitlements for a customer.
Scope
read_customersQuery parameters
- customer_idstringThe ID of the customer to retrieve entitlements for.
- includestringOptionally include related resources. Use
include=entitlement_featureto embed the entitlement feature details (name, id, lookup_key, etc.) in each result.Possible valuesentitlement_feature
curl 'https://api.rechargeapps.com/customer_entitlements?customer_id=226536730' \
-H 'X-Recharge-Version: 2021-11' \
-H 'X-Recharge-Access-Token: your_api_token'[
{
"id": 72,
"customer_id": 226536730,
"entitlement_feature_id": 21,
"granted_by_id": "747832689",
"granted_by_type": "purchase_item",
"expires_at": "2026-02-06T05:59:59+00:00",
"created_at": "2026-01-05T15:11:23+00:00",
"deleted_at": null,
"updated_at": "2026-01-05T15:11:23+00:00"
}
]#Create a customer entitlement
POST/customer_entitlements
Create a new entitlement for a customer.
Scope
write_customer_entitlementsBody parameters
- The ID of the customer to grant the entitlement to.
- The ID of the entitlement feature to grant.
- expires_atdatetimeThe date and time at which the entitlement expires. If null or omitted, the entitlement does not expire.
curl -X POST 'https://api.rechargeapps.com/customer_entitlements' \
-H 'X-Recharge-Version: 2021-11' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"customer_id": 12345,
"entitlement_feature_id": 56789,
"expires_at": "2026-06-30T00:00:00+00:00"
}'{
"customer_entitlement": {
"id": 74,
"customer_id": 12345,
"entitlement_feature_id": 56789,
"granted_by_id": "385088",
"granted_by_type": "api",
"expires_at": "2026-07-01T04:59:59+00:00",
"created_at": "2026-01-07T04:20:40+00:00",
"deleted_at": null,
"updated_at": "2026-01-07T04:20:40+00:00"
}
}#Update a customer entitlement
PUT/customer_entitlements/{id}
Update the expiration date of a customer's entitlement.
Scope
write_customer_entitlementsBody parameters
- The updated date and time at which the entitlement expires. Set to null to make the entitlement non-expiring.
curl -X PUT 'https://api.rechargeapps.com/customer_entitlements/74' \
-H 'X-Recharge-Version: 2021-11' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"expires_at": "2026-12-31T00:00:00+00:00"
}'{
"customer_entitlement": {
"id": 74,
"customer_id": 210979738,
"entitlement_feature_id": 21,
"granted_by_id": "385088",
"granted_by_type": "api",
"expires_at": "2026-12-31T04:59:59+00:00",
"created_at": "2026-01-07T04:20:40+00:00",
"deleted_at": null,
"updated_at": "2026-01-07T04:31:14+00:00"
}
}#Delete a customer entitlement
DELETE/customer_entitlements/{id}
Delete a customer's entitlement.
Scope
write_customer_entitlementscurl -X DELETE 'https://api.rechargeapps.com/customer_entitlements/74' \
-H 'X-Recharge-Version: 2021-11' \
-H 'X-Recharge-Access-Token: your_api_token'{}