API
GuidesGet API token
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

  • idinteger
    Unique numeric identifier for the customer entitlement.
  • Unique numeric identifier for the customer associated with this entitlement.
  • Unique numeric identifier for the entitlement feature being granted.
  • The ID of the entity that granted this entitlement (e.g. the purchase item ID or API token ID).
  • How the entitlement was granted to the customer.
    Possible values
    purchase_itemapimanual
  • expires_atdatetime
    The date and time at which the entitlement expires. If null, the entitlement does not expire.
  • created_atdatetime
    The date and time at which the customer entitlement was created.
  • updated_atdatetime
    The date and time at which the customer entitlement was last updated.
  • deleted_atdatetime
    The date and time at which the customer entitlement was deleted. If null, the entitlement has not been deleted.
The customer entitlement object
{
  "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.
Scoperead_customers

Query parameters

  • The ID of the customer to retrieve entitlements for.
  • includestring
    Optionally include related resources. Use include=entitlement_feature to embed the entitlement feature details (name, id, lookup_key, etc.) in each result.
    Possible values
    entitlement_feature
GET/customer_entitlements
curl 'https://api.rechargeapps.com/customer_entitlements?customer_id=226536730' \
  -H 'X-Recharge-Version: 2021-11' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
[
  {
    "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.
Scopewrite_customer_entitlements

Body parameters

  • customer_idintegerRequired
    The ID of the customer to grant the entitlement to.
  • entitlement_feature_idintegerRequired
    The ID of the entitlement feature to grant.
  • expires_atdatetime
    The date and time at which the entitlement expires. If null or omitted, the entitlement does not expire.
POST/customer_entitlements
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"
}'
Response
{
  "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.
Scopewrite_customer_entitlements

Body parameters

  • expires_atdatetimeRequired
    The updated date and time at which the entitlement expires. Set to null to make the entitlement non-expiring.
PUT/customer_entitlements/{id}
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"
}'
Response
{
  "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.
Scopewrite_customer_entitlements
DELETE/customer_entitlements/{id}
curl -X DELETE 'https://api.rechargeapps.com/customer_entitlements/74' \
  -H 'X-Recharge-Version: 2021-11' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
{}