curl --request POST \
--url https://api.paygentic.io/v1/entitlements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "cus_q3r4s5t6u7v8w9x0",
"featureId": "feat_a1b2c3d4e5f6g7h8",
"template": {
"type": "boolean"
}
}
'{
"object": "entitlement",
"id": "<string>",
"customerId": "<string>",
"featureId": "<string>",
"featureKey": "<string>",
"featureType": "boolean",
"productId": "<string>",
"subscriptionId": "<string>",
"status": "active",
"activeFrom": "2023-11-07T05:31:56Z",
"activeTo": "2023-11-07T05:31:56Z",
"hasAccess": true,
"metadata": {},
"config": {}
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Entitlements
Issue Entitlement
Issue a new entitlement to a customer, granting them access to a specific feature. The feature must exist and belong to the same merchant as the customer.
POST
/
v1
/
entitlements
curl --request POST \
--url https://api.paygentic.io/v1/entitlements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "cus_q3r4s5t6u7v8w9x0",
"featureId": "feat_a1b2c3d4e5f6g7h8",
"template": {
"type": "boolean"
}
}
'{
"object": "entitlement",
"id": "<string>",
"customerId": "<string>",
"featureId": "<string>",
"featureKey": "<string>",
"featureType": "boolean",
"productId": "<string>",
"subscriptionId": "<string>",
"status": "active",
"activeFrom": "2023-11-07T05:31:56Z",
"activeTo": "2023-11-07T05:31:56Z",
"hasAccess": true,
"metadata": {},
"config": {}
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Body
application/json
Response
Entitlement successfully issued. Returns the same shape as GET /v1/entitlements/{entitlementId} (a discriminated EntitlementDetail), so callers can read featureType, hasAccess, and metered balance/usage fields directly from the create response.
- Option 1
- Option 2
- Option 3
A specific entitlement. The response shape varies by featureType.
Was this page helpful?