Skip to main content
GET
/
v1
/
subscriptions
/
plans
/
{plan_id}
/
entitlements
JavaScript
import Hercules from '@usehercules/sdk';

const client = new Hercules({
  apiVersion: '2025-12-09',
  apiKey: process.env['HERCULES_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const planEntitlement of client.beta.subscriptions.plans.entitlements.list('plan_id')) {
  console.log(planEntitlement.id);
}
{
  "data": [
    {
      "id": "<string>",
      "entitlement": {
        "id": "<string>",
        "name": "<string>",
        "key": "<string>",
        "active": true,
        "livemode": true
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header as: Bearer

Path Parameters

plan_id
string
required

The unique identifier of the plan

Query Parameters

limit
integer
default:100

Maximum number of plan entitlements to return (1-100)

Required range: 1 <= x <= 100
starting_after
string

Cursor for forward pagination

ending_before
string

Cursor for backward pagination

Response

200 - application/json

A list of entitlements attached to the plan

data
object[]
required