Skip to main content
GET
/
subscriptions
/
entitlements
/
check
Check an entitlement
curl --request GET \
  --url https://api.billing.io/v1/subscriptions/entitlements/check \
  --header 'Authorization: Bearer <token>'
{
  "has_access": true,
  "feature_key": "<string>",
  "value_boolean": true,
  "value_numeric": 123,
  "value_string": "<string>",
  "plan_id": "<string>",
  "subscription_id": "<string>"
}
Check if a customer has access to a specific feature based on their active subscription.
curl "https://api.billing.io/v1/subscriptions/entitlements/check?customer_id=cus_a1b2c3d4e5f6&feature_key=api_requests" \
  -H "Authorization: Bearer $BILLING_API_KEY"
Response
{
  "has_access": true,
  "feature_key": "api_requests",
  "value_type": "numeric",
  "value_numeric": 10000,
  "plan_id": "plan_a1b2c3d4e5f6",
  "subscription_id": "sub_a1b2c3d4e5f6"
}

Authorizations

Authorization
string
header
required

Use your secret API key as a Bearer token. Keys are prefixed: sk_live_ (production) or sk_test_ (sandbox).

Query Parameters

customer_id
string
required

The customer identifier

feature_key
string
required

The feature key to check

Response

Entitlement check result

has_access
boolean

Whether the customer has access to the feature

feature_key
string

The feature key that was checked

value_type
enum<string>

The data type of the entitlement value

Available options:
boolean,
numeric,
string
value_boolean
boolean | null
value_numeric
number | null
value_string
string | null
plan_id
string | null

The plan granting the entitlement (null if no access)

subscription_id
string | null

The active subscription (null if no access)