> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a plan

> Updates an existing plan's properties such as display name, description, and metadata.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/stigg/openapi.documented.yml patch /api/v1/plans/{id}
openapi: 3.0.0
info:
  title: Stigg API
  description: Stigg API documentation
  version: 7.64.2
  contact: {}
servers:
  - url: https://api.stigg.io
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Customers
    description: Operations related to customers
  - name: Subscriptions
    description: Operations related to subscriptions
  - name: Coupons
    description: Operations related to coupons
  - name: Bulk Import
    description: Operations related to import of customers and subscriptions
  - name: Usage
    description: Operations related to usage & metering
  - name: Promotional Entitlements
    description: Operations related to promotional entitlements
  - name: Products
    description: Operations related to products
  - name: Features
    description: Operations related to features
  - name: Addons
    description: Operations related to addons
  - name: Plans
    description: Operations related to plans
  - name: Credit grants
    description: Operations related to credit grants
  - name: Credit ledger
    description: Operations related to credit ledger
  - name: Custom currencies
    description: Operations related to custom currencies
paths:
  /api/v1/plans/{id}:
    patch:
      tags:
        - Plans
      summary: Update a plan
      description: >-
        Updates an existing plan's properties such as display name, description,
        and metadata.
      operationId: PlanController_updatePlan
      parameters:
        - name: id
          required: true
          in: path
          description: The unique identifier of the entity
          schema:
            minLength: 1
            maxLength: 255
            type: string
        - name: X-ACCOUNT-ID
          in: header
          description: >-
            Account ID — optional when authenticating with a user JWT (Bearer
            token); falls back to the user's first membership. Ignored for
            API-key auth.
          required: false
          schema:
            type: string
        - name: X-ENVIRONMENT-ID
          in: header
          description: >-
            Environment ID — required when authenticating with a user JWT
            (Bearer token) on environment-scoped endpoints. Ignored for API-key
            auth (env is intrinsic to the key).
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePlanRequestDto'
      responses:
        '200':
          description: The updated plan object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanResponseDto'
              examples:
                default:
                  value:
                    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-10-26T10:00:00.000Z'
                      updatedAt: '2025-10-26T10:00:00.000Z'
                      parentPlanId: null
                      defaultTrialConfig:
                        duration: 14
                        units: DAY
                        budget: null
                        trialEndBehavior: null
                      compatibleAddonIds: []
        '400':
          description: bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadInputErrorResponseDto'
        '401':
          description: User is not authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedErrorResponseDto'
        '403':
          description: User is not allowed to access this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponseDto'
        '404':
          description: Plan not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponseDto'
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponseDto'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            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);
        - lang: Python
          source: |-
            import os
            from stigg import Stigg

            client = Stigg(
                api_key=os.environ.get("STIGG_API_KEY"),  # This is the default and can be omitted
            )
            plan = client.v1.plans.update(
                id="x",
            )
            print(plan.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stiggio/stigg-go\"\n\t\"github.com/stiggio/stigg-go/option\"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tplan, err := client.V1.Plans.Update(\n\t\tcontext.TODO(),\n\t\t\"x\",\n\t\tstigg.V1PlanUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", plan.Data)\n}\n"
        - lang: Java
          source: |-
            package io.stigg.example;

            import io.stigg.client.StiggClient;
            import io.stigg.client.okhttp.StiggOkHttpClient;
            import io.stigg.models.v1.plans.Plan;
            import io.stigg.models.v1.plans.PlanUpdateParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    StiggClient client = StiggOkHttpClient.fromEnv();

                    Plan plan = client.v1().plans().update("x");
                }
            }
        - lang: Ruby
          source: |-
            require "stigg"

            stigg = Stigg::Client.new(api_key: "My API Key")

            plan = stigg.v1.plans.update("x")

            puts(plan)
        - lang: C#
          source: |-
            using System;
            using Stigg.Client;
            using Stigg.Client.Models.V1.Plans;

            StiggClient client = new();

            PlanUpdateParams parameters = new() { ID = "x" };

            var plan = await client.V1.Plans.Update(parameters);

            Console.WriteLine(plan);
        - lang: CLI
          source: |-
            stigg v1:plans update \
              --api-key 'My API Key' \
              --id x
components:
  schemas:
    UpdatePlanRequestDto:
      type: object
      properties:
        displayName:
          type: string
          maxLength: 255
          description: The display name of the package
        description:
          type: string
          maxLength: 255
          description: The description of the package
          nullable: true
        billingId:
          type: string
          maxLength: 255
          description: The unique identifier for the entity in the billing provider
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Metadata associated with the entity
        parentPlanId:
          type: string
          maxLength: 255
          description: The ID of the parent plan, if applicable
          nullable: true
        defaultTrialConfig:
          type: object
          properties:
            duration:
              type: number
              description: The duration of the trial in the specified units
            units:
              type: string
              enum:
                - DAY
                - MONTH
              description: The time unit for the trial duration (DAY or MONTH)
            budget:
              type: object
              properties:
                limit:
                  type: number
                  description: The budget limit amount
                hasSoftLimit:
                  type: boolean
                  description: >-
                    Whether the budget limit is a soft limit (allows overage) or
                    hard limit
              required:
                - limit
                - hasSoftLimit
              title: BudgetConfiguration
              description: Budget configuration for the trial
              nullable: true
            trialEndBehavior:
              type: string
              enum:
                - CONVERT_TO_PAID
                - CANCEL_SUBSCRIPTION
              nullable: true
              description: >-
                Behavior when the trial ends (CONVERT_TO_PAID or
                CANCEL_SUBSCRIPTION)
          required:
            - duration
            - units
          title: DefaultTrialConfig
          description: Default trial configuration for the plan
          nullable: true
        compatibleAddonIds:
          type: array
          items:
            type: string
            maxLength: 255
            description: List of compatible addon IDs for this plan
          nullable: true
        charges:
          type: object
          properties:
            pricingType:
              type: string
              enum:
                - FREE
                - PAID
                - CUSTOM
              description: The pricing type (FREE, PAID, or CUSTOM)
            pricingModels:
              type: array
              items:
                type: object
                properties:
                  billingModel:
                    type: string
                    enum:
                      - FLAT_FEE
                      - MINIMUM_SPEND
                      - PER_UNIT
                      - USAGE_BASED
                      - CREDIT_BASED
                    description: >-
                      The billing model (FLAT_FEE, PER_UNIT, USAGE_BASED,
                      CREDIT_BASED)
                  billingCadence:
                    default: RECURRING
                    type: string
                    enum:
                      - RECURRING
                      - ONE_OFF
                    description: The billing cadence (RECURRING or ONE_OFF)
                  featureId:
                    type: string
                    maxLength: 255
                    minLength: 1
                    pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
                    description: The feature ID this pricing model is associated with
                  topUpCustomCurrencyId:
                    type: string
                    maxLength: 255
                    description: The custom currency ID for top-up pricing
                  tiersMode:
                    type: string
                    enum:
                      - VOLUME
                      - GRADUATED
                    description: The tiered pricing mode (VOLUME or GRADUATED)
                  minUnitQuantity:
                    type: integer
                    minimum: 1
                    description: Minimum number of units
                  maxUnitQuantity:
                    type: integer
                    minimum: 1
                    maximum: 999999
                    description: Maximum number of units (max 999999)
                  resetPeriod:
                    type: string
                    enum:
                      - YEAR
                      - MONTH
                      - WEEK
                      - DAY
                      - HOUR
                    description: The usage reset period
                  yearlyResetPeriodConfiguration:
                    type: object
                    properties:
                      accordingTo:
                        type: string
                        enum:
                          - SubscriptionStart
                        description: Reset anchor (SubscriptionStart)
                    required:
                      - accordingTo
                    title: YearlyResetPeriodConfig
                    description: Yearly reset period configuration
                  monthlyResetPeriodConfiguration:
                    type: object
                    properties:
                      accordingTo:
                        type: string
                        enum:
                          - SubscriptionStart
                          - StartOfTheMonth
                        description: Reset anchor (SubscriptionStart or StartOfTheMonth)
                    required:
                      - accordingTo
                    title: MonthlyResetPeriodConfig
                    description: Monthly reset period configuration
                  weeklyResetPeriodConfiguration:
                    type: object
                    properties:
                      accordingTo:
                        type: string
                        enum:
                          - SubscriptionStart
                          - EverySunday
                          - EveryMonday
                          - EveryTuesday
                          - EveryWednesday
                          - EveryThursday
                          - EveryFriday
                          - EverySaturday
                        description: Reset anchor (SubscriptionStart or specific day)
                    required:
                      - accordingTo
                    title: WeeklyResetPeriodConfig
                    description: Weekly reset period configuration
                  pricePeriods:
                    description: >-
                      Array of price period configurations (at least one
                      required)
                    type: array
                    items:
                      type: object
                      properties:
                        billingPeriod:
                          type: string
                          enum:
                            - MONTHLY
                            - ANNUALLY
                          description: The billing period (MONTHLY or ANNUALLY)
                        billingCountryCode:
                          description: ISO country code for localized pricing
                          type: string
                          maxLength: 255
                        price:
                          type: object
                          properties:
                            amount:
                              type: number
                              description: The price amount
                            currency:
                              description: The price currency
                              type: string
                              enum:
                                - usd
                                - aed
                                - all
                                - amd
                                - ang
                                - aud
                                - awg
                                - azn
                                - bam
                                - bbd
                                - bdt
                                - bgn
                                - bif
                                - bmd
                                - bnd
                                - bsd
                                - bwp
                                - byn
                                - bzd
                                - brl
                                - cad
                                - cdf
                                - chf
                                - cny
                                - czk
                                - dkk
                                - dop
                                - dzd
                                - egp
                                - etb
                                - eur
                                - fjd
                                - gbp
                                - gel
                                - gip
                                - gmd
                                - gyd
                                - hkd
                                - hrk
                                - htg
                                - idr
                                - ils
                                - inr
                                - isk
                                - jmd
                                - jpy
                                - kes
                                - kgs
                                - khr
                                - kmf
                                - krw
                                - kyd
                                - kzt
                                - lbp
                                - lkr
                                - lrd
                                - lsl
                                - mad
                                - mdl
                                - mga
                                - mkd
                                - mmk
                                - mnt
                                - mop
                                - mro
                                - mvr
                                - mwk
                                - mxn
                                - myr
                                - mzn
                                - nad
                                - ngn
                                - nok
                                - npr
                                - nzd
                                - pgk
                                - php
                                - pkr
                                - pln
                                - qar
                                - ron
                                - rsd
                                - rub
                                - rwf
                                - sar
                                - sbd
                                - scr
                                - sek
                                - sgd
                                - sle
                                - sll
                                - sos
                                - szl
                                - thb
                                - tjs
                                - top
                                - try
                                - ttd
                                - tzs
                                - uah
                                - uzs
                                - vnd
                                - vuv
                                - wst
                                - xaf
                                - xcd
                                - yer
                                - zar
                                - zmw
                                - clp
                                - djf
                                - gnf
                                - ugx
                                - pyg
                                - xof
                                - xpf
                              title: Currency
                          required:
                            - amount
                          description: The price amount and currency
                        creditRate:
                          type: object
                          properties:
                            amount:
                              type: number
                              minimum: 0
                              exclusiveMinimum: true
                              description: The credit rate amount
                            currencyId:
                              type: string
                              maxLength: 255
                              description: The custom currency ID
                            costFormula:
                              type: string
                              maxLength: 255
                              description: Optional cost formula expression
                          required:
                            - amount
                            - currencyId
                          title: CreditRate
                          description: Credit rate configuration for credit-based pricing
                        blockSize:
                          type: number
                          description: Block size for usage-based pricing
                        tiers:
                          type: array
                          items:
                            type: object
                            properties:
                              upTo:
                                type: number
                                description: Upper bound of this tier (null for unlimited)
                              unitPrice:
                                type: object
                                properties:
                                  amount:
                                    type: number
                                    description: The price amount
                                  currency:
                                    description: The price currency
                                    type: string
                                    enum:
                                      - usd
                                      - aed
                                      - all
                                      - amd
                                      - ang
                                      - aud
                                      - awg
                                      - azn
                                      - bam
                                      - bbd
                                      - bdt
                                      - bgn
                                      - bif
                                      - bmd
                                      - bnd
                                      - bsd
                                      - bwp
                                      - byn
                                      - bzd
                                      - brl
                                      - cad
                                      - cdf
                                      - chf
                                      - cny
                                      - czk
                                      - dkk
                                      - dop
                                      - dzd
                                      - egp
                                      - etb
                                      - eur
                                      - fjd
                                      - gbp
                                      - gel
                                      - gip
                                      - gmd
                                      - gyd
                                      - hkd
                                      - hrk
                                      - htg
                                      - idr
                                      - ils
                                      - inr
                                      - isk
                                      - jmd
                                      - jpy
                                      - kes
                                      - kgs
                                      - khr
                                      - kmf
                                      - krw
                                      - kyd
                                      - kzt
                                      - lbp
                                      - lkr
                                      - lrd
                                      - lsl
                                      - mad
                                      - mdl
                                      - mga
                                      - mkd
                                      - mmk
                                      - mnt
                                      - mop
                                      - mro
                                      - mvr
                                      - mwk
                                      - mxn
                                      - myr
                                      - mzn
                                      - nad
                                      - ngn
                                      - nok
                                      - npr
                                      - nzd
                                      - pgk
                                      - php
                                      - pkr
                                      - pln
                                      - qar
                                      - ron
                                      - rsd
                                      - rub
                                      - rwf
                                      - sar
                                      - sbd
                                      - scr
                                      - sek
                                      - sgd
                                      - sle
                                      - sll
                                      - sos
                                      - szl
                                      - thb
                                      - tjs
                                      - top
                                      - try
                                      - ttd
                                      - tzs
                                      - uah
                                      - uzs
                                      - vnd
                                      - vuv
                                      - wst
                                      - xaf
                                      - xcd
                                      - yer
                                      - zar
                                      - zmw
                                      - clp
                                      - djf
                                      - gnf
                                      - ugx
                                      - pyg
                                      - xof
                                      - xpf
                                    title: Currency
                                required:
                                  - amount
                                description: Per-unit price in this tier
                              flatPrice:
                                type: object
                                properties:
                                  amount:
                                    type: number
                                    description: The price amount
                                  currency:
                                    description: The price currency
                                    type: string
                                    enum:
                                      - usd
                                      - aed
                                      - all
                                      - amd
                                      - ang
                                      - aud
                                      - awg
                                      - azn
                                      - bam
                                      - bbd
                                      - bdt
                                      - bgn
                                      - bif
                                      - bmd
                                      - bnd
                                      - bsd
                                      - bwp
                                      - byn
                                      - bzd
                                      - brl
                                      - cad
                                      - cdf
                                      - chf
                                      - cny
                                      - czk
                                      - dkk
                                      - dop
                                      - dzd
                                      - egp
                                      - etb
                                      - eur
                                      - fjd
                                      - gbp
                                      - gel
                                      - gip
                                      - gmd
                                      - gyd
                                      - hkd
                                      - hrk
                                      - htg
                                      - idr
                                      - ils
                                      - inr
                                      - isk
                                      - jmd
                                      - jpy
                                      - kes
                                      - kgs
                                      - khr
                                      - kmf
                                      - krw
                                      - kyd
                                      - kzt
                                      - lbp
                                      - lkr
                                      - lrd
                                      - lsl
                                      - mad
                                      - mdl
                                      - mga
                                      - mkd
                                      - mmk
                                      - mnt
                                      - mop
                                      - mro
                                      - mvr
                                      - mwk
                                      - mxn
                                      - myr
                                      - mzn
                                      - nad
                                      - ngn
                                      - nok
                                      - npr
                                      - nzd
                                      - pgk
                                      - php
                                      - pkr
                                      - pln
                                      - qar
                                      - ron
                                      - rsd
                                      - rub
                                      - rwf
                                      - sar
                                      - sbd
                                      - scr
                                      - sek
                                      - sgd
                                      - sle
                                      - sll
                                      - sos
                                      - szl
                                      - thb
                                      - tjs
                                      - top
                                      - try
                                      - ttd
                                      - tzs
                                      - uah
                                      - uzs
                                      - vnd
                                      - vuv
                                      - wst
                                      - xaf
                                      - xcd
                                      - yer
                                      - zar
                                      - zmw
                                      - clp
                                      - djf
                                      - gnf
                                      - ugx
                                      - pyg
                                      - xof
                                      - xpf
                                    title: Currency
                                required:
                                  - amount
                                description: Flat price for this tier
                            title: PriceTier
                            description: A tier in tiered pricing.
                          description: Tiered pricing configuration
                        creditGrantCadence:
                          type: string
                          enum:
                            - BEGINNING_OF_BILLING_PERIOD
                            - MONTHLY
                          description: When credits are granted
                      required:
                        - billingPeriod
                      title: PricePeriod
                      description: Price configuration for a specific billing period.
                    minItems: 1
                required:
                  - billingModel
                  - pricePeriods
                title: PricingModel
                description: >-
                  A pricing model configuration with billing details and price
                  periods.
              maxItems: 50
              description: Array of pricing model configurations
            overagePricingModels:
              type: array
              items:
                type: object
                properties:
                  billingModel:
                    type: string
                    enum:
                      - FLAT_FEE
                      - MINIMUM_SPEND
                      - PER_UNIT
                      - USAGE_BASED
                      - CREDIT_BASED
                    description: The billing model for overages
                  billingCadence:
                    default: RECURRING
                    type: string
                    enum:
                      - RECURRING
                      - ONE_OFF
                    description: The billing cadence for overages
                  featureId:
                    type: string
                    maxLength: 255
                    minLength: 1
                    pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
                    description: The feature ID for overage pricing
                  topUpCustomCurrencyId:
                    type: string
                    maxLength: 255
                    description: Custom currency ID for overage top-up
                  pricePeriods:
                    type: array
                    items:
                      type: object
                      properties:
                        billingPeriod:
                          type: string
                          enum:
                            - MONTHLY
                            - ANNUALLY
                          description: The billing period (MONTHLY or ANNUALLY)
                        billingCountryCode:
                          description: ISO country code for localized pricing
                          type: string
                          maxLength: 255
                        price:
                          type: object
                          properties:
                            amount:
                              type: number
                              description: The price amount
                            currency:
                              description: The price currency
                              type: string
                              enum:
                                - usd
                                - aed
                                - all
                                - amd
                                - ang
                                - aud
                                - awg
                                - azn
                                - bam
                                - bbd
                                - bdt
                                - bgn
                                - bif
                                - bmd
                                - bnd
                                - bsd
                                - bwp
                                - byn
                                - bzd
                                - brl
                                - cad
                                - cdf
                                - chf
                                - cny
                                - czk
                                - dkk
                                - dop
                                - dzd
                                - egp
                                - etb
                                - eur
                                - fjd
                                - gbp
                                - gel
                                - gip
                                - gmd
                                - gyd
                                - hkd
                                - hrk
                                - htg
                                - idr
                                - ils
                                - inr
                                - isk
                                - jmd
                                - jpy
                                - kes
                                - kgs
                                - khr
                                - kmf
                                - krw
                                - kyd
                                - kzt
                                - lbp
                                - lkr
                                - lrd
                                - lsl
                                - mad
                                - mdl
                                - mga
                                - mkd
                                - mmk
                                - mnt
                                - mop
                                - mro
                                - mvr
                                - mwk
                                - mxn
                                - myr
                                - mzn
                                - nad
                                - ngn
                                - nok
                                - npr
                                - nzd
                                - pgk
                                - php
                                - pkr
                                - pln
                                - qar
                                - ron
                                - rsd
                                - rub
                                - rwf
                                - sar
                                - sbd
                                - scr
                                - sek
                                - sgd
                                - sle
                                - sll
                                - sos
                                - szl
                                - thb
                                - tjs
                                - top
                                - try
                                - ttd
                                - tzs
                                - uah
                                - uzs
                                - vnd
                                - vuv
                                - wst
                                - xaf
                                - xcd
                                - yer
                                - zar
                                - zmw
                                - clp
                                - djf
                                - gnf
                                - ugx
                                - pyg
                                - xof
                                - xpf
                              title: Currency
                          required:
                            - amount
                          description: The price amount and currency
                        creditRate:
                          type: object
                          properties:
                            amount:
                              type: number
                              minimum: 0
                              exclusiveMinimum: true
                              description: The credit rate amount
                            currencyId:
                              type: string
                              maxLength: 255
                              description: The custom currency ID
                            costFormula:
                              type: string
                              maxLength: 255
                              description: Optional cost formula expression
                          required:
                            - amount
                            - currencyId
                          title: CreditRate
                          description: Credit rate configuration for credit-based pricing
                        blockSize:
                          type: number
                          description: Block size for usage-based pricing
                        tiers:
                          type: array
                          items:
                            type: object
                            properties:
                              upTo:
                                type: number
                                description: Upper bound of this tier (null for unlimited)
                              unitPrice:
                                type: object
                                properties:
                                  amount:
                                    type: number
                                    description: The price amount
                                  currency:
                                    description: The price currency
                                    type: string
                                    enum:
                                      - usd
                                      - aed
                                      - all
                                      - amd
                                      - ang
                                      - aud
                                      - awg
                                      - azn
                                      - bam
                                      - bbd
                                      - bdt
                                      - bgn
                                      - bif
                                      - bmd
                                      - bnd
                                      - bsd
                                      - bwp
                                      - byn
                                      - bzd
                                      - brl
                                      - cad
                                      - cdf
                                      - chf
                                      - cny
                                      - czk
                                      - dkk
                                      - dop
                                      - dzd
                                      - egp
                                      - etb
                                      - eur
                                      - fjd
                                      - gbp
                                      - gel
                                      - gip
                                      - gmd
                                      - gyd
                                      - hkd
                                      - hrk
                                      - htg
                                      - idr
                                      - ils
                                      - inr
                                      - isk
                                      - jmd
                                      - jpy
                                      - kes
                                      - kgs
                                      - khr
                                      - kmf
                                      - krw
                                      - kyd
                                      - kzt
                                      - lbp
                                      - lkr
                                      - lrd
                                      - lsl
                                      - mad
                                      - mdl
                                      - mga
                                      - mkd
                                      - mmk
                                      - mnt
                                      - mop
                                      - mro
                                      - mvr
                                      - mwk
                                      - mxn
                                      - myr
                                      - mzn
                                      - nad
                                      - ngn
                                      - nok
                                      - npr
                                      - nzd
                                      - pgk
                                      - php
                                      - pkr
                                      - pln
                                      - qar
                                      - ron
                                      - rsd
                                      - rub
                                      - rwf
                                      - sar
                                      - sbd
                                      - scr
                                      - sek
                                      - sgd
                                      - sle
                                      - sll
                                      - sos
                                      - szl
                                      - thb
                                      - tjs
                                      - top
                                      - try
                                      - ttd
                                      - tzs
                                      - uah
                                      - uzs
                                      - vnd
                                      - vuv
                                      - wst
                                      - xaf
                                      - xcd
                                      - yer
                                      - zar
                                      - zmw
                                      - clp
                                      - djf
                                      - gnf
                                      - ugx
                                      - pyg
                                      - xof
                                      - xpf
                                    title: Currency
                                required:
                                  - amount
                                description: Per-unit price in this tier
                              flatPrice:
                                type: object
                                properties:
                                  amount:
                                    type: number
                                    description: The price amount
                                  currency:
                                    description: The price currency
                                    type: string
                                    enum:
                                      - usd
                                      - aed
                                      - all
                                      - amd
                                      - ang
                                      - aud
                                      - awg
                                      - azn
                                      - bam
                                      - bbd
                                      - bdt
                                      - bgn
                                      - bif
                                      - bmd
                                      - bnd
                                      - bsd
                                      - bwp
                                      - byn
                                      - bzd
                                      - brl
                                      - cad
                                      - cdf
                                      - chf
                                      - cny
                                      - czk
                                      - dkk
                                      - dop
                                      - dzd
                                      - egp
                                      - etb
                                      - eur
                                      - fjd
                                      - gbp
                                      - gel
                                      - gip
                                      - gmd
                                      - gyd
                                      - hkd
                                      - hrk
                                      - htg
                                      - idr
                                      - ils
                                      - inr
                                      - isk
                                      - jmd
                                      - jpy
                                      - kes
                                      - kgs
                                      - khr
                                      - kmf
                                      - krw
                                      - kyd
                                      - kzt
                                      - lbp
                                      - lkr
                                      - lrd
                                      - lsl
                                      - mad
                                      - mdl
                                      - mga
                                      - mkd
                                      - mmk
                                      - mnt
                                      - mop
                                      - mro
                                      - mvr
                                      - mwk
                                      - mxn
                                      - myr
                                      - mzn
                                      - nad
                                      - ngn
                                      - nok
                                      - npr
                                      - nzd
                                      - pgk
                                      - php
                                      - pkr
                                      - pln
                                      - qar
                                      - ron
                                      - rsd
                                      - rub
                                      - rwf
                                      - sar
                                      - sbd
                                      - scr
                                      - sek
                                      - sgd
                                      - sle
                                      - sll
                                      - sos
                                      - szl
                                      - thb
                                      - tjs
                                      - top
                                      - try
                                      - ttd
                                      - tzs
                                      - uah
                                      - uzs
                                      - vnd
                                      - vuv
                                      - wst
                                      - xaf
                                      - xcd
                                      - yer
                                      - zar
                                      - zmw
                                      - clp
                                      - djf
                                      - gnf
                                      - ugx
                                      - pyg
                                      - xof
                                      - xpf
                                    title: Currency
                                required:
                                  - amount
                                description: Flat price for this tier
                            title: PriceTier
                            description: A tier in tiered pricing.
                          description: Tiered pricing configuration
                        creditGrantCadence:
                          type: string
                          enum:
                            - BEGINNING_OF_BILLING_PERIOD
                            - MONTHLY
                          description: When credits are granted
                      required:
                        - billingPeriod
                      title: PricePeriod
                      description: Price configuration for a specific billing period.
                    minItems: 1
                    description: Price periods for overage pricing
                  entitlement:
                    type: object
                    properties:
                      featureId:
                        type: string
                        maxLength: 255
                        minLength: 1
                        pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
                        description: The feature ID for the entitlement
                      usageLimit:
                        type: number
                        description: The usage limit before overage kicks in
                      hasUnlimitedUsage:
                        type: boolean
                        description: Whether usage is unlimited
                      hasSoftLimit:
                        type: boolean
                        description: Whether the limit is soft (allows overage)
                      resetPeriod:
                        type: string
                        enum:
                          - YEAR
                          - MONTH
                          - WEEK
                          - DAY
                          - HOUR
                        description: The usage reset period
                      yearlyResetPeriodConfiguration:
                        type: object
                        properties:
                          accordingTo:
                            type: string
                            enum:
                              - SubscriptionStart
                            description: Reset anchor (SubscriptionStart)
                        required:
                          - accordingTo
                        title: YearlyResetPeriodConfig
                        description: Yearly reset configuration
                      monthlyResetPeriodConfiguration:
                        type: object
                        properties:
                          accordingTo:
                            type: string
                            enum:
                              - SubscriptionStart
                              - StartOfTheMonth
                            description: >-
                              Reset anchor (SubscriptionStart or
                              StartOfTheMonth)
                        required:
                          - accordingTo
                        title: MonthlyResetPeriodConfig
                        description: Monthly reset configuration
                      weeklyResetPeriodConfiguration:
                        type: object
                        properties:
                          accordingTo:
                            type: string
                            enum:
                              - SubscriptionStart
                              - EverySunday
                              - EveryMonday
                              - EveryTuesday
                              - EveryWednesday
                              - EveryThursday
                              - EveryFriday
                              - EverySaturday
                            description: Reset anchor (SubscriptionStart or specific day)
                        required:
                          - accordingTo
                        title: WeeklyResetPeriodConfig
                        description: Weekly reset configuration
                    required:
                      - featureId
                    title: OverageEntitlement
                    description: Entitlement configuration for the overage feature
                required:
                  - billingModel
                  - pricePeriods
                title: OveragePricingModel
                description: Overage pricing model configuration.
              maxItems: 50
              description: Array of overage pricing model configurations
            overageBillingPeriod:
              type: string
              enum:
                - ON_SUBSCRIPTION_RENEWAL
                - MONTHLY
              description: When overage charges are billed
            minimumSpend:
              type: array
              items:
                type: object
                properties:
                  billingPeriod:
                    type: string
                    enum:
                      - MONTHLY
                      - ANNUALLY
                    description: The billing period
                  minimum:
                    type: object
                    properties:
                      amount:
                        type: number
                        description: The price amount
                      currency:
                        description: The price currency
                        type: string
                        enum:
                          - usd
                          - aed
                          - all
                          - amd
                          - ang
                          - aud
                          - awg
                          - azn
                          - bam
                          - bbd
                          - bdt
                          - bgn
                          - bif
                          - bmd
                          - bnd
                          - bsd
                          - bwp
                          - byn
                          - bzd
                          - brl
                          - cad
                          - cdf
                          - chf
                          - cny
                          - czk
                          - dkk
                          - dop
                          - dzd
                          - egp
                          - etb
                          - eur
                          - fjd
                          - gbp
                          - gel
                          - gip
                          - gmd
                          - gyd
                          - hkd
                          - hrk
                          - htg
                          - idr
                          - ils
                          - inr
                          - isk
                          - jmd
                          - jpy
                          - kes
                          - kgs
                          - khr
                          - kmf
                          - krw
                          - kyd
                          - kzt
                          - lbp
                          - lkr
                          - lrd
                          - lsl
                          - mad
                          - mdl
                          - mga
                          - mkd
                          - mmk
                          - mnt
                          - mop
                          - mro
                          - mvr
                          - mwk
                          - mxn
                          - myr
                          - mzn
                          - nad
                          - ngn
                          - nok
                          - npr
                          - nzd
                          - pgk
                          - php
                          - pkr
                          - pln
                          - qar
                          - ron
                          - rsd
                          - rub
                          - rwf
                          - sar
                          - sbd
                          - scr
                          - sek
                          - sgd
                          - sle
                          - sll
                          - sos
                          - szl
                          - thb
                          - tjs
                          - top
                          - try
                          - ttd
                          - tzs
                          - uah
                          - uzs
                          - vnd
                          - vuv
                          - wst
                          - xaf
                          - xcd
                          - yer
                          - zar
                          - zmw
                          - clp
                          - djf
                          - gnf
                          - ugx
                          - pyg
                          - xof
                          - xpf
                        title: Currency
                    required:
                      - amount
                    description: The minimum spend amount
                required:
                  - billingPeriod
                  - minimum
                title: MinimumSpend
                description: Minimum spend configuration for a billing period.
              nullable: true
              description: Minimum spend configuration per billing period
            billingId:
              type: string
              maxLength: 255
              description: 'Deprecated: billing integration ID'
          required:
            - pricingType
          additionalProperties: false
          title: SetPackagePricingRequest
          description: Pricing configuration to set on the plan draft
      additionalProperties: false
      title: UpdatePlanRequest
      description: Partially update an existing plan. Only provided fields are updated.
    PlanResponseDto:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              maxLength: 255
              minLength: 1
              pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
              description: The unique identifier for the entity
            displayName:
              type: string
              maxLength: 255
              description: The display name of the package
            description:
              type: string
              maxLength: 255
              description: The description of the package
              nullable: true
            productId:
              type: string
              maxLength: 255
              minLength: 1
              pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
              description: The product id of the package
            status:
              type: string
              enum:
                - DRAFT
                - PUBLISHED
                - ARCHIVED
              description: The status of the package
            pricingType:
              type: string
              enum:
                - FREE
                - PAID
                - CUSTOM
              description: The pricing type of the package
              nullable: true
            billingId:
              type: string
              maxLength: 255
              description: The unique identifier for the entity in the billing provider
              nullable: true
            versionNumber:
              type: integer
              description: The version number of the package
            isLatest:
              type: boolean
              description: Indicates if the package is the latest version
              nullable: true
            entitlements:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - FEATURE
                      - CREDIT
                  id:
                    type: string
                    maxLength: 255
                    description: The unique identifier for the entity
                required:
                  - type
                  - id
                title: PackageEntitlement
                description: Entitlement reference with type and identifier
              description: List of entitlements of the package
            metadata:
              type: object
              additionalProperties:
                type: string
              description: Metadata associated with the entity
            createdAt:
              type: string
              format: date-time
              description: Timestamp of when the record was created
            updatedAt:
              type: string
              format: date-time
              description: Timestamp of when the record was last updated
            parentPlanId:
              type: string
              maxLength: 255
              description: The ID of the parent plan, if applicable
              nullable: true
            defaultTrialConfig:
              type: object
              properties:
                duration:
                  type: number
                  description: The duration of the trial in the specified units
                units:
                  type: string
                  enum:
                    - DAY
                    - MONTH
                  description: The time unit for the trial duration (DAY or MONTH)
                budget:
                  type: object
                  properties:
                    limit:
                      type: number
                      description: The budget limit amount
                    hasSoftLimit:
                      type: boolean
                      description: >-
                        Whether the budget limit is a soft limit (allows
                        overage) or hard limit
                  required:
                    - limit
                    - hasSoftLimit
                  title: BudgetConfiguration
                  description: Budget configuration for the trial
                  nullable: true
                trialEndBehavior:
                  type: string
                  enum:
                    - CONVERT_TO_PAID
                    - CANCEL_SUBSCRIPTION
                  nullable: true
                  description: >-
                    Behavior when the trial ends (CONVERT_TO_PAID or
                    CANCEL_SUBSCRIPTION)
              required:
                - duration
                - units
              title: DefaultTrialConfig
              description: Default trial configuration for the plan
              nullable: true
            compatibleAddonIds:
              type: array
              items:
                type: string
                maxLength: 255
                description: List of compatible addon IDs for this plan
              nullable: true
          required:
            - id
            - displayName
            - description
            - productId
            - status
            - pricingType
            - billingId
            - versionNumber
            - isLatest
            - entitlements
            - metadata
            - createdAt
            - updatedAt
            - parentPlanId
            - defaultTrialConfig
            - compatibleAddonIds
          title: Plan
          description: Plan configuration object
      required:
        - data
      title: Response
      description: Response object
    BadInputErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - BadUserInput
            - DuplicateIntegrationNotAllowed
            - EntityIsArchivedError
            - IntegrityViolation
            - FreePlanCantHaveCompatiblePackageGroupError
            - SubscriptionMustHaveSinglePlanError
            - AddonIsCompatibleWithPlan
            - AddonIsCompatibleWithGroup
            - DuplicateAddonProvisionedError
            - ScheduledMigrationAlreadyExistsError
            - SubscriptionAlreadyOnLatestPlan
            - EntityIdDifferentFromRefIdError
            - UnsupportedFeatureType
            - UnsupportedVendorIdentifier
            - UnsupportedSubscriptionScheduleType
            - InvalidEntitlementResetPeriod
            - IncompatibleSubscriptionAddon
            - UnPublishedPackage
            - MeteringNotAvailableForFeatureType
            - AuthCustomerMismatch
            - AuthCustomerReadonly
            - FetchAllCountriesPricesNotAllowed
            - MemberInvitationError
            - PlansCircularDependencyError
            - NoFeatureEntitlementInSubscription
            - CheckoutIsNotSupported
            - UnsupportedParameter
            - PricingModelNotSupportedByBillingIntegration
            - BillingIntegrationMissing
            - BillingIntegrationAlreadyExistsError
            - InvalidMemberDelete
            - PackageAlreadyPublished
            - DraftPlanCantBeArchived
            - DraftAddonCantBeArchived
            - PlanWithChildCantBeDeleted
            - PlanCannotBePublishWhenBasePlanIsDraft
            - PlanCannotBePublishWhenCompatibleAddonIsDraft
            - PlanIsUsedAsDefaultStartPlan
            - PlanIsUsedAsDowngradePlan
            - InvalidAddressError
            - InvalidQuantity
            - BillingPeriodMissingError
            - DowngradeBillingPeriodNotSupportedError
            - CustomerAlreadyUsesCouponError
            - CustomerAlreadyHaveCustomerCoupon
            - SubscriptionAlreadyCanceledOrExpired
            - TrialMustBeCancelledImmediately
            - SubscriptionDoesNotHaveBillingPeriod
            - InvalidCancellationDate
            - FailedToImportCustomer
            - FailedToImportSubscriptions
            - PackagePricingTypeNotSet
            - InvalidSubscriptionStatus
            - InvalidArgumentError
            - EditAllowedOnDraftPackageOnlyError
            - ResyncAlreadyInProgress
            - ArchivedCouponCantBeApplied
            - ImportAlreadyInProgress
            - AddonHasToHavePriceError
            - SelectedBillingModelDoesntMatchImportedItemError
            - CannotArchiveProductError
            - CannotUnarchiveProductError
            - CannotDeleteCustomerError
            - CannotRemovePaymentMethodFromCustomerError
            - CannotDeleteFeatureError
            - CannotArchiveFeatureError
            - InvalidUpdatePriceUnitAmountError
            - ExperimentAlreadyRunning
            - ExperimentStatusError
            - OperationNotAllowedDuringInProgressExperiment
            - EntitlementsMustBelongToSamePackage
            - CanNotUpdateEntitlementsFeatureGroup
            - MeterMustBeAssociatedToMeteredFeature
            - CannotEditPackageInNonDraftMode
            - CannotAddOverrideEntitlementToPlan
            - MissingEntityIdError
            - NoProductsAvailable
            - PromotionCodeNotForCustomer
            - PromotionCodeNotActive
            - PromotionCodeMaxRedemptionsReached
            - PromotionCodeMinimumAmountNotReached
            - PromotionCodeCustomerNotFirstPurchase
            - AddonWithDraftCannotBeDeletedError
            - CannotReportUsageForEntitlementWithMeterError
            - RecalculateEntitlementsError
            - ImportSubscriptionsBulkError
            - InvalidMetadataError
            - CannotUpsertToPackageThatHasDraft
            - IntegrationValidationError
            - AwsMarketplaceIntegrationValidationError
            - AwsMarketplaceIntegrationError
            - DataExportIntegrationError
            - HubspotIntegrationError
            - DuplicateProductValidationError
            - AmountTooLarge
            - CustomerHasNoEmailAddress
            - MergeEnvironmentValidationError
            - EntitlementLimitExceededError
            - EntitlementUsageOutOfRangeError
            - UsageMeasurementDiffOutOfRangeError
            - AddonQuantityExceedsLimitError
            - AddonDependencyMissingError
            - PackageGroupMinItemsError
            - CannotUpdateUnitTransformationError
            - SingleSubscriptionCantBeAutoCancellationTargetError
            - MultiSubscriptionCantBeAutoCancellationSourceError
            - ChangingPayingCustomerIsNotSupportedError
            - RequiredSsoAuthenticationError
            - InvalidDoggoSignatureError
            - InvalidReceivedSignatureError
            - CannotDeleteDefaultIntegration
            - CannotChangeBillingIntegration
            - FailedToResolveBillingIntegration
            - WorkflowTriggerNotFound
            - DeprecatedEstimateSubscriptionError
            - FeatureConfigurationExceededLimitError
            - FeatureNotBelongToFeatureGroupError
            - FeatureGroupMissingFeaturesError
            - VersionExceedsMaxValueError
            - CannotUpdateExpireAtForExpiredCreditGrantError
            - ExpireAtMustBeLaterThanEffectiveAtError
            - OfferAlreadyExists
            - DraftAlreadyExists
            - CreditGrantAlreadyVoided
            - CreditGrantCannotBeVoided
            - InvalidTaxId
            - ObjectAlreadyBeingUsedByAnotherRequestError
            - TooManySubscriptionsPerCustomer
            - TooManyCustomCurrencies
            - StripeError
            - SchedulingAtEndOfBillingPeriod
            - ApiKeyExpired
            - ApiKeyHasExpiry
          nullable: true
      required:
        - message
        - code
    UnauthenticatedErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - Unauthenticated
          nullable: true
      required:
        - message
        - code
    ForbiddenErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - IdentityForbidden
            - AccessDeniedError
            - NoFeatureEntitlementError
          nullable: true
      required:
        - message
        - code
    NotFoundErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - CustomerNotFound
            - CustomCurrencyNotFound
            - CreditGrantNotFound
            - MemberNotFound
            - PackageGroupNotFound
            - AddonNotFound
            - AddonsNotFound
            - EnvironmentMissing
            - IntegrationNotFound
            - VendorIsNotSupported
            - CouponNotFound
            - FutureUpdateNotFound
            - CustomerNoBillingId
            - SubscriptionNoBillingId
            - StripeCustomerIsDeleted
            - InitStripePaymentMethodError
            - PreparePaymentMethodFormError
            - AccountNotFoundError
            - ExperimentNotFoundError
            - NoDraftOfferFound
            - PromotionCodeNotFound
            - FailedToCreateCheckoutSessionError
            - PaymentMethodNotFoundError
            - ProductNotFoundError
            - ProductNotPublishedError
            - MissingBillingInvoiceError
            - BillingInvoiceStatusError
            - FeatureGroupNotFoundError
            - CannotArchiveFeatureGroupError
            - OfferNotFound
            - CustomerResourceNotFound
            - FeatureNotFound
            - PriceNotFound
            - NoActiveSubscriptionForCustomer
            - PlanNotFound
            - PromotionalEntitlementNotFoundError
            - SubscriptionNotFound
            - ApiKeyNotFound
          nullable: true
      required:
        - message
        - code
    TooManyRequestsErrorResponseDto:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
          enum:
            - RateLimitExceeded
          nullable: true
      required:
        - message
        - code
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Server API Key

````