Skip to main content
PATCH
/
api
/
v1
/
plans
/
{id}
JavaScript
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.update('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
  }
}

Authorizations

X-API-KEY
string
header
required

Server API Key

Headers

X-API-KEY
string
required

Server API Key

Path Parameters

id
string
required

The unique identifier of the entity

Required string length: 1 - 255

Body

application/json

Partially update an existing plan. Only provided fields are updated.

displayName
string

The display name of the package

Maximum string length: 255
description
string | null

The description of the package

Maximum string length: 255
billingId
string | null

The unique identifier for the entity in the billing provider

Maximum string length: 255
metadata
object

Metadata associated with the entity

parentPlanId
string | null

The ID of the parent plan, if applicable

Maximum string length: 255
defaultTrialConfig
DefaultTrialConfig · object

Default trial configuration for the plan

compatibleAddonIds
string[] | null

List of compatible addon IDs for this plan

Maximum string length: 255

Response

The updated plan object.

Response object

data
Plan · object
required

Plan configuration object