Skip to main content
POST
/
v1
/
subscriptions
/
check
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
});

const response = await client.beta.subscriptions.check({
  customer_id: 'customer_id',
  entitlement_key: 'entitlement_key',
});

console.log(response.entitlement_id);
{
  "has_entitlement": true,
  "key": "<string>",
  "entitlement_id": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Check if a customer has an entitlement

customer_id
string
required

The customer ID

entitlement_key
string
required

The entitlement key to check for access

Response

200 - application/json

The entitlement check result indicating whether access is granted

Check entitlement response

has_entitlement
boolean
required

Whether the customer has the entitlement

key
string
required

The entitlement key that was checked

entitlement_id
string | null

The active entitlement ID if present