import Stigg from '@stigg/typescript';
const client = new Stigg({
apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});
const plan = await client.v1.events.plans.retrieve('x');
console.log(plan.data);{
"data": {
"id": "plan-professional",
"displayName": "Professional",
"description": "Professional plan with advanced features",
"productId": "product-starter",
"status": "PUBLISHED",
"pricingType": "PAID",
"billingId": "price_1234567890",
"versionNumber": 1,
"isLatest": true,
"entitlements": [
{
"type": "FEATURE",
"id": "feature-advanced-analytics"
},
{
"type": "CREDIT",
"id": "api-calls"
}
],
"metadata": {},
"createdAt": "2025-09-02T14:56:54.496Z",
"updatedAt": "2025-11-29T16:49:52.604Z",
"parentPlanId": null
}
}Retrieves a plan by its unique identifier, including entitlements and pricing details.
import Stigg from '@stigg/typescript';
const client = new Stigg({
apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});
const plan = await client.v1.events.plans.retrieve('x');
console.log(plan.data);{
"data": {
"id": "plan-professional",
"displayName": "Professional",
"description": "Professional plan with advanced features",
"productId": "product-starter",
"status": "PUBLISHED",
"pricingType": "PAID",
"billingId": "price_1234567890",
"versionNumber": 1,
"isLatest": true,
"entitlements": [
{
"type": "FEATURE",
"id": "feature-advanced-analytics"
},
{
"type": "CREDIT",
"id": "api-calls"
}
],
"metadata": {},
"createdAt": "2025-09-02T14:56:54.496Z",
"updatedAt": "2025-11-29T16:49:52.604Z",
"parentPlanId": null
}
}