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.plans.archive('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": "2026-09-30T14:16:45.035Z",
"updatedAt": "2025-08-30T03:00:27.200Z",
"parentPlanId": null,
"defaultTrialConfig": {
"duration": 14,
"units": "DAY",
"budget": null,
"trialEndBehavior": null
},
"compatibleAddonIds": null
}
}Archives a plan, preventing it from being used in new subscriptions.
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.plans.archive('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": "2026-09-30T14:16:45.035Z",
"updatedAt": "2025-08-30T03:00:27.200Z",
"parentPlanId": null,
"defaultTrialConfig": {
"duration": 14,
"units": "DAY",
"budget": null,
"trialEndBehavior": null
},
"compatibleAddonIds": null
}
}Server API Key
Server API Key
The unique identifier of the entity
1 - 255The archived plan object.
Response object
Plan configuration object
Show child attributes