> ## Documentation Index
> Fetch the complete documentation index at: https://autumn-b9b4c0fb-dev.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Plans Updated

> Fired when a customer's plans change — activated, scheduled, updated, or expired. Each event carries a `plan_changes` array describing what happened and a `tags` array (e.g. `trial_ended`, `phase_changed`) describing why.

### Payload Fields

<ParamField body="object" type="string" required />

<ParamField body="customer_id" type="string" required>
  The ID of the customer whose plans changed.
</ParamField>

<ParamField body="entity_id" type="string | null">
  The ID of the entity, if the changes are scoped to a specific entity.
</ParamField>

<ParamField body="plan_changes" type="object[]" required>
  The plans that were activated, scheduled, updated, or expired.

  <Expandable title="properties">
    <ParamField body="entity_id" type="string | null">
      The ID of the entity this plan is scoped to, or null when the plan is customer-level. A single event can carry changes for several entities.
    </ParamField>

    <ParamField body="action" type="'activated' | 'scheduled' | 'updated' | 'expired'" required>
      The lifecycle action applied to this plan: activated (newly active on the customer), scheduled (queued for a future start), updated (mutated in place), or expired (ended).
    </ParamField>

    <ParamField body="subscription" type="object">
      The subscription as it stands after this change. Present when the plan is billed as a recurring subscription.

      <Expandable title="properties">
        <ParamField body="plan_id" type="string" required>
          The ID of the customer plan.
        </ParamField>

        <ParamField body="status" type="'active' | 'scheduled' | 'expired'" required>
          The current status of the subscription on the customer.
        </ParamField>

        <ParamField body="past_due" type="boolean" required>
          Whether the subscription has overdue payments.
        </ParamField>

        <ParamField body="started_at" type="number | null" required>
          When the subscription started, in milliseconds since the Unix epoch.
        </ParamField>

        <ParamField body="canceled_at" type="number | null" required>
          When the subscription was canceled, in milliseconds since the Unix epoch, or null if not canceled.
        </ParamField>

        <ParamField body="expires_at" type="number | null" required>
          When the subscription ends, in milliseconds since the Unix epoch, or null if no expiry is set.
        </ParamField>

        <ParamField body="trial_ends_at" type="number | null" required>
          When the trial ends, in milliseconds since the Unix epoch. Null when not actively trialing.
        </ParamField>

        <ParamField body="current_period_start" type="number | null" required>
          Start of the current billing period, or null if not applicable.
        </ParamField>

        <ParamField body="current_period_end" type="number | null" required>
          End of the current billing period, or null if not applicable.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="purchase" type="object">
      The purchase as it stands after this change. Present when the plan is a one-off purchase.

      <Expandable title="properties">
        <ParamField body="plan_id" type="string" required>
          The ID of the customer plan.
        </ParamField>

        <ParamField body="status" type="'active' | 'scheduled' | 'expired'" required>
          The current status of the purchase on the customer.
        </ParamField>

        <ParamField body="expires_at" type="number | null" required>
          When the purchase ends, in milliseconds since the Unix epoch, or null if no expiry is set.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="previous_attributes" type="object | null" required>
      Sparse map of lifecycle scalar fields whose values changed, holding their previous values. Null when the plan is newly activated or scheduled, or when no lifecycle field changed.

      <Expandable title="properties">
        <ParamField body="status" type="'active' | 'scheduled' | 'expired'">
          The current status of the subscription on the customer.
        </ParamField>

        <ParamField body="past_due" type="boolean">
          Whether the subscription has overdue payments.
        </ParamField>

        <ParamField body="canceled_at" type="number | null">
          When the subscription was canceled, in milliseconds since the Unix epoch, or null if not canceled.
        </ParamField>

        <ParamField body="expires_at" type="number | null">
          When the subscription ends, in milliseconds since the Unix epoch, or null if no expiry is set.
        </ParamField>

        <ParamField body="trial_ends_at" type="number | null">
          When the trial ends, in milliseconds since the Unix epoch. Null when not actively trialing.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="plan_change" type="object">
      Content-level change to the plan definition for this customer plan (items, base price, free trial).

      <Expandable title="properties">
        <ParamField body="plan" type="object">
          The plan after the change. Omitted unless the caller expands it.

          <Expandable title="properties">
            <ParamField body="id" type="string" required>
              Unique identifier for the plan.
            </ParamField>

            <ParamField body="name" type="string" required>
              Display name of the plan.
            </ParamField>

            <ParamField body="description" type="string | null" required>
              Optional description of the plan.
            </ParamField>

            <ParamField body="group" type="string | null" required>
              Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
            </ParamField>

            <ParamField body="version" type="number" required>
              Version number of the plan. Incremented when plan configuration changes.
            </ParamField>

            <ParamField body="version_slug" type="string | null">
              User-facing version identity. Defaults to v\{n} when the version is minted.
            </ParamField>

            <ParamField body="active" type="boolean">
              Whether this is the active version of the plan. At most one version is active.
            </ParamField>

            <ParamField body="add_on" type="boolean" required>
              Whether this is an add-on plan that can be attached alongside a main plan.
            </ParamField>

            <ParamField body="auto_enable" type="boolean" required>
              If true, this plan is automatically attached when a customer is created. Used for free plans.
            </ParamField>

            <ParamField body="price" type="object | null" required>
              Base recurring price for the plan. Null for free plans or usage-only plans.

              <Expandable title="properties">
                <ParamField body="amount" type="number" required>
                  Base price amount for the plan, in major currency units (e.g. dollars).
                </ParamField>

                <ParamField body="additional_currencies" type="object[]">
                  Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                  <Expandable title="properties">
                    <ParamField body="currency" type="string" required>
                      Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                    </ParamField>

                    <ParamField body="amount" type="number" required>
                      Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                  Billing interval (e.g. 'month', 'year').
                </ParamField>

                <ParamField body="interval_count" type="number">
                  Number of intervals per billing cycle. Defaults to 1.
                </ParamField>

                <ParamField body="display" type="object">
                  Display text for showing this price in pricing pages.

                  <Expandable title="properties">
                    <ParamField body="primary_text" type="string" required>
                      Main display text (e.g. '\$10' or '100 messages').
                    </ParamField>

                    <ParamField body="secondary_text" type="string">
                      Secondary display text (e.g. 'per month' or 'then \$0.5 per 100').
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="processors" type="object">
                  Payment processors this base price is connected to. Omitted when unset.

                  <Expandable title="properties">
                    <ParamField body="stripe" type="object | null">
                      <Expandable title="properties">
                        <ParamField body="price_id" type="string" required>
                          Stripe price ID. For prepaid with included > 0 this is the V2 price.
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="items" type="object[]" required>
              Feature configurations included in this plan. Each item defines included units, pricing, and reset behavior for a feature.

              <Expandable title="properties">
                <ParamField body="feature_id" type="string" required>
                  The ID of the feature this item configures.
                </ParamField>

                <ParamField body="feature" type="object">
                  The full feature object if expanded.

                  <Expandable title="properties">
                    <ParamField body="id" type="string" required>
                      The ID of the feature, used to refer to it in other API calls like /track or /check.
                    </ParamField>

                    <ParamField body="name" type="string | null">
                      The name of the feature.
                    </ParamField>

                    <ParamField body="type" type="'static' | 'boolean' | 'single_use' | 'continuous_use' | 'credit_system' | 'ai_credit_system'" required>
                      The type of the feature
                    </ParamField>

                    <ParamField body="display" type="object | null">
                      Singular and plural display names for the feature.

                      <Expandable title="properties">
                        <ParamField body="singular" type="string" required>
                          The singular display name for the feature.
                        </ParamField>

                        <ParamField body="plural" type="string" required>
                          The plural display name for the feature.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="credit_schema" type="object[] | null">
                      Credit cost schema for credit system features.

                      <Expandable title="properties">
                        <ParamField body="metered_feature_id" type="string" required>
                          The ID of the metered feature (should be a single\_use feature).
                        </ParamField>

                        <ParamField body="credit_cost" type="number" required>
                          The credit cost of the metered feature.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="archived" type="boolean | null">
                      Whether or not the feature is archived.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="included" type="number" required>
                  Number of free units included. For consumable features, balance resets to this number each interval.
                </ParamField>

                <ParamField body="unlimited" type="boolean" required>
                  Whether the customer has unlimited access to this feature.
                </ParamField>

                <ParamField body="pooled" type="boolean">
                  Whether entity-level grants contribute to a shared customer balance.
                </ParamField>

                <ParamField body="reset" type="object | null" required>
                  Reset configuration for consumable features. Null for non-consumable features like seats where usage persists across billing cycles.

                  <Expandable title="properties">
                    <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                      The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
                    </ParamField>

                    <ParamField body="interval_count" type="number">
                      Number of intervals between resets. Defaults to 1.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="price" type="object | null" required>
                  Pricing configuration for usage beyond included units. Null if feature is entirely free.

                  <Expandable title="properties">
                    <ParamField body="amount" type="number">
                      Price per billing\_units after included usage is consumed. Mutually exclusive with tiers.
                    </ParamField>

                    <ParamField body="additional_currencies" type="object[]">
                      Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers' (tiered prices carry per-currency amounts on each tier).

                      <Expandable title="properties">
                        <ParamField body="currency" type="string" required>
                          Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                        </ParamField>

                        <ParamField body="amount" type="number" required>
                          Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="tiers" type="object[]">
                      Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.

                      <Expandable title="properties">
                        <ParamField body="to" type="number" required />

                        <ParamField body="amount" type="number" required />

                        <ParamField body="flat_amount" type="number" />

                        <ParamField body="additional_currencies" type="object[]">
                          <Expandable title="properties">
                            <ParamField body="currency" type="string" required>
                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                            </ParamField>

                            <ParamField body="amount" type="number">
                              Per-unit amount for this tier in this currency.
                            </ParamField>

                            <ParamField body="flat_amount" type="number">
                              Flat amount for this tier in this currency, if the tier uses one.
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                    <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                      Billing interval for this price. For consumable features, should match reset.interval.
                    </ParamField>

                    <ParamField body="interval_count" type="number">
                      Number of intervals per billing cycle. Defaults to 1.
                    </ParamField>

                    <ParamField body="billing_units" type="number" required>
                      Number of units per price increment. Usage is rounded UP to the nearest billing\_units when billed (e.g. billing\_units=100 means 101 usage rounds to 200).
                    </ParamField>

                    <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                      'prepaid' for features like seats where customers pay upfront, 'usage\_based' for pay-as-you-go after included usage.
                    </ParamField>

                    <ParamField body="max_purchase" type="number | null" required>
                      Maximum units a customer can purchase beyond included. E.g. if included=100 and max\_purchase=300, customer can use up to 400 total before usage is capped. Null for no limit.
                    </ParamField>

                    <ParamField body="processors" type="object">
                      Payment processors this item price is connected to. Omitted when unset.

                      <Expandable title="properties">
                        <ParamField body="stripe" type="object | null">
                          <Expandable title="properties">
                            <ParamField body="price_id" type="string" required>
                              Stripe price ID. For prepaid with included > 0 this is the V2 price.
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="display" type="object">
                  Display text for showing this item in pricing pages.

                  <Expandable title="properties">
                    <ParamField body="primary_text" type="string" required>
                      Main display text (e.g. '\$10' or '100 messages').
                    </ParamField>

                    <ParamField body="secondary_text" type="string">
                      Secondary display text (e.g. 'per month' or 'then \$0.5 per 100').
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="rollover" type="object">
                  Rollover configuration for unused units. If set, unused included units roll over to the next period.

                  <Expandable title="properties">
                    <ParamField body="max" type="number | null" required>
                      Maximum rollover units. Null for unlimited rollover.
                    </ParamField>

                    <ParamField body="max_percentage" type="number | null">
                      Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                    </ParamField>

                    <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                      When rolled over units expire.
                    </ParamField>

                    <ParamField body="expiry_duration_length" type="number">
                      Number of periods before expiry.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="feature_override" type="object">
                  Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

                  <Expandable title="properties">
                    <ParamField body="credit_schema" type="object | object[]">
                      For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                      <Expandable title="properties">
                        <ParamField body="metered_feature_id" type="string">
                          ID of the metered feature that draws from this credit system.
                        </ParamField>

                        <ParamField body="billing_units" type="number">
                          Number of metered-feature units priced together. Defaults to one when omitted.
                        </ParamField>

                        <ParamField body="dimensions.{key}" type="object">
                          Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                          <Expandable title="properties">
                            <ParamField body="match.{key}" type="string" required>
                              Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                            </ParamField>

                            <ParamField body="priority" type="integer">
                              Breaks ties between dimensions that match the same number of keys. Higher wins.
                            </ParamField>

                            <ParamField body="tier_behavior" type="string" required />

                            <ParamField body="tiers" type="object[]" required>
                              <Expandable title="properties">
                                <ParamField body="to" type="number" required>
                                  Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                </ParamField>

                                <ParamField body="credit_cost" type="number" required>
                                  Credits consumed per billing-unit group within this tier.
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="multipliers.{key}" type="object">
                          Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                          <Expandable title="properties">
                            <ParamField body="match.{key}" type="string" required>
                              Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                            </ParamField>

                            <ParamField body="factor" type="number">
                              Multiplies the matched rate. All matching multipliers stack.
                            </ParamField>

                            <ParamField body="add" type="number">
                              Added to the rate after every factor is applied, in credits per billing-unit group.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="tier_behavior" type="string" />

                        <ParamField body="tiers" type="object[]">
                          <Expandable title="properties">
                            <ParamField body="to" type="number" required>
                              Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                            </ParamField>

                            <ParamField body="credit_cost" type="number" required>
                              Credits consumed per billing-unit group within this tier.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="credit_cost" type="number">
                          Credits consumed per billing-unit group.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="markups" type="object">
                      For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                      <Expandable title="properties">
                        <ParamField body="default_markup" type="number">
                          Default percentage markup for customers on this plan. Use -100 to make usage free.
                        </ParamField>

                        <ParamField body="provider_markups.{key}" type="object | null">
                          Per-provider markup percentages for customers on this plan.

                          <Expandable title="properties">
                            <ParamField body="markup" type="number" required />
                          </Expandable>
                        </ParamField>

                        <ParamField body="model_markups.{key}" type="object | null">
                          Per-model markup overrides for customers on this plan.

                          <Expandable title="properties">
                            <ParamField body="markup" type="number" />

                            <ParamField body="input_cost" type="number" />

                            <ParamField body="output_cost" type="number" />
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="processors" type="object">
              Payment processors this plan is connected to. Omitted when unset.

              <Expandable title="properties">
                <ParamField body="stripe" type="object | null">
                  <Expandable title="properties">
                    <ParamField body="product_id" type="string" required>
                      Stripe product ID this plan is billed under.
                    </ParamField>

                    <ParamField body="additional_product_ids" type="string[]">
                      Extra Stripe product IDs aliased to this plan.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="revenuecat" type="object | null">
                  <Expandable title="properties">
                    <ParamField body="products" type="object[]" required>
                      Every RevenueCat product that maps to this plan. Replaces the current set.

                      <Expandable title="properties">
                        <ParamField body="product_id" type="string" required>
                          RevenueCat product ID that grants this plan when purchased.
                        </ParamField>

                        <ParamField body="feature_quantities" type="object[]">
                          Prepaid quantities granted when this specific RevenueCat product is purchased, in feature units.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required />

                            <ParamField body="quantity" type="number" />
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="free_trial" type="object">
              Free trial configuration. If set, new customers can try this plan before being charged.

              <Expandable title="properties">
                <ParamField body="duration_length" type="number" required>
                  Number of duration\_type periods the trial lasts.
                </ParamField>

                <ParamField body="duration_type" type="'day' | 'month' | 'year'" required>
                  Unit of time for the trial duration ('day', 'month', 'year').
                </ParamField>

                <ParamField body="card_required" type="boolean" required>
                  Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
                </ParamField>

                <ParamField body="on_end" type="'bill' | 'revert'">
                  Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="created_at" type="number" required>
              Unix timestamp (ms) when the plan was created.
            </ParamField>

            <ParamField body="env" type="'sandbox' | 'live'" required>
              Environment this plan belongs to ('sandbox' or 'live').
            </ParamField>

            <ParamField body="archived" type="boolean" required>
              Whether the plan is archived. Archived plans cannot be attached to new customers.
            </ParamField>

            <ParamField body="config" type="object" required>
              Miscellaneous plan-level configuration flags.

              <Expandable title="properties">
                <ParamField body="ignore_past_due" type="boolean" required>
                  If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past\_due state.
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="billing_controls" type="object">
              Plan-level billing controls used as customer defaults.

              <Expandable title="properties">
                <ParamField body="auto_topups" type="object[]">
                  List of auto top-up configurations per feature.

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string" required>
                      The ID of the feature (credit balance) to auto top-up.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether auto top-up is enabled.
                    </ParamField>

                    <ParamField body="threshold" type="number" required>
                      When the balance drops below this threshold, an auto top-up will be purchased.
                    </ParamField>

                    <ParamField body="quantity" type="number" required>
                      Amount of credits to add per auto top-up.
                    </ParamField>

                    <ParamField body="purchase_limit" type="object">
                      Optional rate limit to cap how often auto top-ups occur.

                      <Expandable title="properties">
                        <ParamField body="interval" type="'hour' | 'day' | 'week' | 'month'" required>
                          The time interval for the purchase limit window.
                        </ParamField>

                        <ParamField body="interval_count" type="number" required>
                          Number of intervals in the purchase limit window.
                        </ParamField>

                        <ParamField body="limit" type="number" required>
                          Maximum number of auto top-ups allowed within the interval.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="invoice_mode" type="boolean">
                      When true, auto top-up creates a send\_invoice invoice instead of auto-charging.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="spend_limits" type="object[]">
                  List of overage spend limits per feature (caps overage spend).

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string">
                      Optional feature ID this spend limit applies to.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether the overage spend limit is enabled.
                    </ParamField>

                    <ParamField body="limit_type" type="'absolute' | 'usage_percentage'">
                      How overage\_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
                    </ParamField>

                    <ParamField body="overage_limit" type="number">
                      Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit\_type is usage\_percentage.
                    </ParamField>

                    <ParamField body="skip_overage_billing" type="boolean">
                      When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="usage_limits" type="object[]">
                  List of hard usage caps per feature (max units per interval).

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string" required>
                      The feature this usage limit applies to.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether this usage limit is enabled.
                    </ParamField>

                    <ParamField body="limit" type="number" required>
                      Maximum units allowed per interval.
                    </ParamField>

                    <ParamField body="interval" type="'day' | 'week' | 'month' | 'year'" required>
                      Interval for the cap, aligned to the customer's billing cycle.
                    </ParamField>

                    <ParamField body="anchor" type="'billing_cycle' | 'utc'">
                      Window alignment. 'billing\_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
                    </ParamField>

                    <ParamField body="filter" type="object">
                      When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.

                      <Expandable title="properties">
                        <ParamField body="properties.{key}" type="string" required />
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="usage_alerts" type="object[]">
                  List of usage alert configurations per feature.

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string">
                      The feature ID this alert applies to.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether this usage alert is enabled.
                    </ParamField>

                    <ParamField body="threshold" type="number" required>
                      The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage\_percentage or remaining\_percentage, this is a percentage (0-100).
                    </ParamField>

                    <ParamField body="threshold_type" type="'usage' | 'usage_percentage' | 'remaining' | 'remaining_percentage'" required>
                      Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
                    </ParamField>

                    <ParamField body="basis" type="'balance' | 'included' | 'recurring' | 'usage_limit'" required>
                      What 100% means. balance: every grant on the feature. included: the plan allowance only. recurring: grants that reset. usage\_limit: the cap of the usage limit with the same feature and filter.
                    </ParamField>

                    <ParamField body="filter" type="object">
                      Only valid with basis usage\_limit. Points the alert at the usage limit carrying the same filter.

                      <Expandable title="properties">
                        <ParamField body="properties.{key}" type="string" required />
                      </Expandable>
                    </ParamField>

                    <ParamField body="name" type="string">
                      Optional user-defined label to distinguish multiple alerts on the same feature.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="overage_allowed" type="object[]">
                  List of overage allowed controls per feature. When enabled, usage can exceed balance.

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string" required>
                      The feature ID this overage allowed control applies to.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether overage is allowed for this feature.
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="metadata" type="object" required>
              Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
            </ParamField>

            <ParamField body="customer_eligibility" type="object">
              <Expandable title="properties">
                <ParamField body="trial_available" type="boolean">
                  Whether the trial on this plan is available to this customer. For example, if the customer used the trial in the past, this will be false.
                </ParamField>

                <ParamField body="status" type="'active' | 'scheduled'">
                  The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
                </ParamField>

                <ParamField body="canceling" type="boolean">
                  Whether the customer's active instance of this plan is set to cancel.
                </ParamField>

                <ParamField body="trialing" type="boolean">
                  Whether the customer is currently on a free trial of this plan.
                </ParamField>

                <ParamField body="attach_action" type="'activate' | 'upgrade' | 'downgrade' | 'none' | 'purchase'" required>
                  The action that would occur if this plan were attached to the customer.
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="base_variant_id" type="string | null" required>
              Deprecated. Use variant\_details.base\_plan\_id instead. If this is a variant, the ID of the base plan it was created from.
            </ParamField>

            <ParamField body="variant_details" type="object">
              Details about how this variant relates to its latest base plan.

              <Expandable title="properties">
                <ParamField body="base_plan_id" type="string" required>
                  The ID of the base plan this variant was derived from.
                </ParamField>

                <ParamField body="customize" type="object">
                  The customization that transforms the base plan into this variant.

                  <Expandable title="properties">
                    <ParamField body="price" type="object | null">
                      Base price configuration for a plan.

                      <Expandable title="properties">
                        <ParamField body="amount" type="number" required>
                          Base price amount for the plan, in major currency units (e.g. dollars).
                        </ParamField>

                        <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                          Billing interval (e.g. 'month', 'year').
                        </ParamField>

                        <ParamField body="interval_count" type="number">
                          Number of intervals per billing cycle. Defaults to 1.
                        </ParamField>

                        <ParamField body="additional_currencies" type="object[]">
                          Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                          <Expandable title="properties">
                            <ParamField body="currency" type="string" required>
                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                            </ParamField>

                            <ParamField body="amount" type="number" required>
                              Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="add_items" type="object[]">
                      Items to add to the plan.

                      <Expandable title="properties">
                        <ParamField body="feature_id" type="string" required>
                          The ID of the feature to configure.
                        </ParamField>

                        <ParamField body="included" type="number">
                          Number of free units included. Balance resets to this each interval for consumable features.
                        </ParamField>

                        <ParamField body="unlimited" type="boolean">
                          If true, customer has unlimited access to this feature.
                        </ParamField>

                        <ParamField body="pooled" type="boolean">
                          Whether entity-level grants contribute to a shared customer balance.
                        </ParamField>

                        <ParamField body="reset" type="object">
                          Reset configuration for consumable features. Omit for non-consumable features like seats.

                          <Expandable title="properties">
                            <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                              Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
                            </ParamField>

                            <ParamField body="interval_count" type="number">
                              Number of intervals between resets. Defaults to 1.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="price" type="object">
                          Pricing for usage beyond included units. Omit for free features.

                          <Expandable title="properties">
                            <ParamField body="amount" type="number">
                              Price per billing\_units after included usage. Either 'amount' or 'tiers' is required.
                            </ParamField>

                            <ParamField body="additional_currencies" type="object[]">
                              Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.

                              <Expandable title="properties">
                                <ParamField body="currency" type="string" required>
                                  Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                </ParamField>

                                <ParamField body="amount" type="number" required>
                                  Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="tiers" type="object[]">
                              Tiered pricing. Either 'amount' or 'tiers' is required.

                              <Expandable title="properties">
                                <ParamField body="to" type="number" required />

                                <ParamField body="amount" type="number" required />

                                <ParamField body="flat_amount" type="number" />

                                <ParamField body="additional_currencies" type="object[]">
                                  <Expandable title="properties">
                                    <ParamField body="currency" type="string" required>
                                      Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                    </ParamField>

                                    <ParamField body="amount" type="number">
                                      Per-unit amount for this tier in this currency.
                                    </ParamField>

                                    <ParamField body="flat_amount" type="number">
                                      Flat amount for this tier in this currency, if the tier uses one.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                            <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                              Billing interval. For consumable features, should match reset.interval.
                            </ParamField>

                            <ParamField body="interval_count" type="number">
                              Number of intervals per billing cycle. Defaults to 1.
                            </ParamField>

                            <ParamField body="billing_units" type="number">
                              Units per price increment. Usage is rounded UP when billed (e.g. billing\_units=100 means 101 rounds to 200).
                            </ParamField>

                            <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                              'prepaid' for upfront payment (seats), 'usage\_based' for pay-as-you-go.
                            </ParamField>

                            <ParamField body="max_purchase" type="number | null">
                              Max units purchasable beyond included. E.g. included=100, max\_purchase=300 allows 400 total. Null for no limit.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="proration" type="object">
                          Proration settings for prepaid features. Controls mid-cycle quantity change billing.

                          <Expandable title="properties">
                            <ParamField body="on_increase" type="'bill_immediately' | 'prorate_immediately' | 'prorate_next_cycle' | 'bill_next_cycle'" required>
                              Billing behavior when quantity increases mid-cycle.
                            </ParamField>

                            <ParamField body="on_decrease" type="'prorate' | 'prorate_immediately' | 'prorate_next_cycle' | 'none' | 'no_prorations'" required>
                              Credit behavior when quantity decreases mid-cycle.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="rollover" type="object">
                          Rollover config for unused units. If set, unused included units carry over.

                          <Expandable title="properties">
                            <ParamField body="max" type="number">
                              Max rollover units. Omit for unlimited rollover.
                            </ParamField>

                            <ParamField body="max_percentage" type="number">
                              Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                            </ParamField>

                            <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                              When rolled over units expire.
                            </ParamField>

                            <ParamField body="expiry_duration_length" type="number">
                              Number of periods before expiry.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="feature_override" type="object">
                          Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

                          <Expandable title="properties">
                            <ParamField body="credit_schema" type="object | object[]">
                              For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                              <Expandable title="properties">
                                <ParamField body="metered_feature_id" type="string">
                                  ID of the metered feature that draws from this credit system.
                                </ParamField>

                                <ParamField body="billing_units" type="number">
                                  Number of metered-feature units priced together. Defaults to one when omitted.
                                </ParamField>

                                <ParamField body="dimensions.{key}" type="object">
                                  Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                                  <Expandable title="properties">
                                    <ParamField body="match.{key}" type="string" required>
                                      Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                    </ParamField>

                                    <ParamField body="priority" type="integer">
                                      Breaks ties between dimensions that match the same number of keys. Higher wins.
                                    </ParamField>

                                    <ParamField body="tier_behavior" type="string" required />

                                    <ParamField body="tiers" type="object[]" required>
                                      <Expandable title="properties">
                                        <ParamField body="to" type="number" required>
                                          Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                        </ParamField>

                                        <ParamField body="credit_cost" type="number" required>
                                          Credits consumed per billing-unit group within this tier.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="multipliers.{key}" type="object">
                                  Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                                  <Expandable title="properties">
                                    <ParamField body="match.{key}" type="string" required>
                                      Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                    </ParamField>

                                    <ParamField body="factor" type="number">
                                      Multiplies the matched rate. All matching multipliers stack.
                                    </ParamField>

                                    <ParamField body="add" type="number">
                                      Added to the rate after every factor is applied, in credits per billing-unit group.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="tier_behavior" type="string" />

                                <ParamField body="tiers" type="object[]">
                                  <Expandable title="properties">
                                    <ParamField body="to" type="number" required>
                                      Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                    </ParamField>

                                    <ParamField body="credit_cost" type="number" required>
                                      Credits consumed per billing-unit group within this tier.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="credit_cost" type="number">
                                  Credits consumed per billing-unit group.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="markups" type="object">
                              For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                              <Expandable title="properties">
                                <ParamField body="default_markup" type="number">
                                  Default percentage markup for customers on this plan. Use -100 to make usage free.
                                </ParamField>

                                <ParamField body="provider_markups.{key}" type="object | null">
                                  Per-provider markup percentages for customers on this plan.

                                  <Expandable title="properties">
                                    <ParamField body="markup" type="number" required />
                                  </Expandable>
                                </ParamField>

                                <ParamField body="model_markups.{key}" type="object | null">
                                  Per-model markup overrides for customers on this plan.

                                  <Expandable title="properties">
                                    <ParamField body="markup" type="number" />

                                    <ParamField body="input_cost" type="number" />

                                    <ParamField body="output_cost" type="number" />
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="remove_items" type="object[]">
                      Filters selecting items to remove from the plan.

                      <Expandable title="properties">
                        <ParamField body="feature_id" type="string">
                          Match items linked to this feature.
                        </ParamField>

                        <ParamField body="billing_method" type="'prepaid' | 'usage_based'">
                          Match items with this billing method (prepaid or usage\_based).
                        </ParamField>

                        <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'">
                          Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
                        </ParamField>

                        <ParamField body="interval_count" type="integer">
                          Match items with this interval\_count. Disambiguates between items that share an interval but differ in count.
                        </ParamField>

                        <ParamField body="included" type="number">
                          Match items whose grant equals this included usage. Omitted is a wildcard.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="free_trial" type="object | null">
                      Free trial configuration for a plan.

                      <Expandable title="properties">
                        <ParamField body="duration_length" type="number" required>
                          Number of duration\_type periods the trial lasts.
                        </ParamField>

                        <ParamField body="duration_type" type="'day' | 'month' | 'year'" required>
                          Unit of time for the trial ('day', 'month', 'year').
                        </ParamField>

                        <ParamField body="card_required" type="boolean" required>
                          If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
                        </ParamField>

                        <ParamField body="on_end" type="'bill' | 'revert'">
                          Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="billing_controls" type="object">
                      Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.

                      <Expandable title="properties">
                        <ParamField body="auto_topups" type="object[]">
                          List of auto top-up configurations per feature.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required>
                              The ID of the feature (credit balance) to auto top-up.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether auto top-up is enabled.
                            </ParamField>

                            <ParamField body="threshold" type="number" required>
                              When the balance drops below this threshold, an auto top-up will be purchased.
                            </ParamField>

                            <ParamField body="quantity" type="number" required>
                              Amount of credits to add per auto top-up.
                            </ParamField>

                            <ParamField body="purchase_limit" type="object">
                              Optional rate limit to cap how often auto top-ups occur. Pass count to set the current window's consumed top-ups.

                              <Expandable title="properties">
                                <ParamField body="interval" type="'hour' | 'day' | 'week' | 'month'" required>
                                  The time interval for the purchase limit window.
                                </ParamField>

                                <ParamField body="interval_count" type="number" required>
                                  Number of intervals in the purchase limit window.
                                </ParamField>

                                <ParamField body="limit" type="number" required>
                                  Maximum number of auto top-ups allowed within the interval.
                                </ParamField>

                                <ParamField body="count" type="number">
                                  Set the current window's consumed auto top-up count. Omit to leave runtime state unchanged.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="invoice_mode" type="boolean">
                              When true, auto top-up creates a send\_invoice invoice instead of auto-charging.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="spend_limits" type="object[]">
                          List of overage spend limits per feature (caps overage spend).

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string">
                              Optional feature ID this spend limit applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether the overage spend limit is enabled.
                            </ParamField>

                            <ParamField body="limit_type" type="'absolute' | 'usage_percentage'">
                              How overage\_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
                            </ParamField>

                            <ParamField body="overage_limit" type="number">
                              Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit\_type is usage\_percentage.
                            </ParamField>

                            <ParamField body="skip_overage_billing" type="boolean">
                              When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="usage_limits" type="object[]">
                          List of hard usage caps per feature (max units per interval).

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required>
                              The feature this usage limit applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether this usage limit is enabled.
                            </ParamField>

                            <ParamField body="limit" type="number" required>
                              Maximum units allowed per interval.
                            </ParamField>

                            <ParamField body="interval" type="'day' | 'week' | 'month' | 'year'" required>
                              Interval for the cap, aligned to the customer's billing cycle.
                            </ParamField>

                            <ParamField body="anchor" type="'billing_cycle' | 'utc'">
                              Window alignment. 'billing\_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
                            </ParamField>

                            <ParamField body="filter" type="object">
                              When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.

                              <Expandable title="properties">
                                <ParamField body="properties.{key}" type="string" required />
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="usage_alerts" type="object[]">
                          List of usage alert configurations per feature.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string">
                              The feature ID this alert applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether this usage alert is enabled.
                            </ParamField>

                            <ParamField body="threshold" type="number" required>
                              The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage\_percentage or remaining\_percentage, this is a percentage (0-100).
                            </ParamField>

                            <ParamField body="threshold_type" type="'usage' | 'usage_percentage' | 'remaining' | 'remaining_percentage'" required>
                              Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
                            </ParamField>

                            <ParamField body="basis" type="'balance' | 'included' | 'recurring' | 'usage_limit'" required>
                              What 100% means. balance: every grant on the feature. included: the plan allowance only. recurring: grants that reset. usage\_limit: the cap of the usage limit with the same feature and filter.
                            </ParamField>

                            <ParamField body="filter" type="object">
                              Only valid with basis usage\_limit. Points the alert at the usage limit carrying the same filter.

                              <Expandable title="properties">
                                <ParamField body="properties.{key}" type="string" required />
                              </Expandable>
                            </ParamField>

                            <ParamField body="name" type="string">
                              Optional user-defined label to distinguish multiple alerts on the same feature.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="overage_allowed" type="object[]">
                          List of overage allowed controls per feature. When enabled, usage can exceed balance.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required>
                              The feature ID this overage allowed control applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether overage is allowed for this feature.
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="upsert_licenses" type="object[]">
                      License links to add or override for this customer, keyed by license\_plan\_id. Omitted fields inherit the plan catalog link (included defaults to 1 when the license is not in the catalog). A bare entry restores the license to pure catalog inheritance.

                      <Expandable title="properties">
                        <ParamField body="license_plan_id" type="string" required />

                        <ParamField body="version_slug" type="string" />

                        <ParamField body="included" type="integer" />

                        <ParamField body="prepaid_only" type="boolean" />

                        <ParamField body="customize" type="object | null">
                          <Expandable title="properties">
                            <ParamField body="price" type="object | null">
                              Base price configuration for a plan.

                              <Expandable title="properties">
                                <ParamField body="amount" type="number" required>
                                  Base price amount for the plan, in major currency units (e.g. dollars).
                                </ParamField>

                                <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                                  Billing interval (e.g. 'month', 'year').
                                </ParamField>

                                <ParamField body="interval_count" type="number">
                                  Number of intervals per billing cycle. Defaults to 1.
                                </ParamField>

                                <ParamField body="additional_currencies" type="object[]">
                                  Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                                  <Expandable title="properties">
                                    <ParamField body="currency" type="string" required>
                                      Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                    </ParamField>

                                    <ParamField body="amount" type="number" required>
                                      Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="add_items" type="object[]">
                              <Expandable title="properties">
                                <ParamField body="feature_id" type="string" required>
                                  The ID of the feature to configure.
                                </ParamField>

                                <ParamField body="included" type="number">
                                  Number of free units included. Balance resets to this each interval for consumable features.
                                </ParamField>

                                <ParamField body="unlimited" type="boolean">
                                  If true, customer has unlimited access to this feature.
                                </ParamField>

                                <ParamField body="pooled" type="boolean">
                                  Whether entity-level grants contribute to a shared customer balance.
                                </ParamField>

                                <ParamField body="reset" type="object">
                                  Reset configuration for consumable features. Omit for non-consumable features like seats.

                                  <Expandable title="properties">
                                    <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                                      Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
                                    </ParamField>

                                    <ParamField body="interval_count" type="number">
                                      Number of intervals between resets. Defaults to 1.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="price" type="object">
                                  Pricing for usage beyond included units. Omit for free features.

                                  <Expandable title="properties">
                                    <ParamField body="amount" type="number">
                                      Price per billing\_units after included usage. Either 'amount' or 'tiers' is required.
                                    </ParamField>

                                    <ParamField body="additional_currencies" type="object[]">
                                      Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.

                                      <Expandable title="properties">
                                        <ParamField body="currency" type="string" required>
                                          Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                        </ParamField>

                                        <ParamField body="amount" type="number" required>
                                          Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="tiers" type="object[]">
                                      Tiered pricing. Either 'amount' or 'tiers' is required.

                                      <Expandable title="properties">
                                        <ParamField body="to" type="number" required />

                                        <ParamField body="amount" type="number" required />

                                        <ParamField body="flat_amount" type="number" />

                                        <ParamField body="additional_currencies" type="object[]">
                                          <Expandable title="properties">
                                            <ParamField body="currency" type="string" required>
                                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                            </ParamField>

                                            <ParamField body="amount" type="number">
                                              Per-unit amount for this tier in this currency.
                                            </ParamField>

                                            <ParamField body="flat_amount" type="number">
                                              Flat amount for this tier in this currency, if the tier uses one.
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                                    <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                                      Billing interval. For consumable features, should match reset.interval.
                                    </ParamField>

                                    <ParamField body="interval_count" type="number">
                                      Number of intervals per billing cycle. Defaults to 1.
                                    </ParamField>

                                    <ParamField body="billing_units" type="number">
                                      Units per price increment. Usage is rounded UP when billed (e.g. billing\_units=100 means 101 rounds to 200).
                                    </ParamField>

                                    <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                                      'prepaid' for upfront payment (seats), 'usage\_based' for pay-as-you-go.
                                    </ParamField>

                                    <ParamField body="max_purchase" type="number | null">
                                      Max units purchasable beyond included. E.g. included=100, max\_purchase=300 allows 400 total. Null for no limit.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="proration" type="object">
                                  Proration settings for prepaid features. Controls mid-cycle quantity change billing.

                                  <Expandable title="properties">
                                    <ParamField body="on_increase" type="'bill_immediately' | 'prorate_immediately' | 'prorate_next_cycle' | 'bill_next_cycle'" required>
                                      Billing behavior when quantity increases mid-cycle.
                                    </ParamField>

                                    <ParamField body="on_decrease" type="'prorate' | 'prorate_immediately' | 'prorate_next_cycle' | 'none' | 'no_prorations'" required>
                                      Credit behavior when quantity decreases mid-cycle.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="rollover" type="object">
                                  Rollover config for unused units. If set, unused included units carry over.

                                  <Expandable title="properties">
                                    <ParamField body="max" type="number">
                                      Max rollover units. Omit for unlimited rollover.
                                    </ParamField>

                                    <ParamField body="max_percentage" type="number">
                                      Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                                    </ParamField>

                                    <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                                      When rolled over units expire.
                                    </ParamField>

                                    <ParamField body="expiry_duration_length" type="number">
                                      Number of periods before expiry.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="feature_override" type="object">
                                  Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

                                  <Expandable title="properties">
                                    <ParamField body="credit_schema" type="object | object[]">
                                      For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                                      <Expandable title="properties">
                                        <ParamField body="metered_feature_id" type="string">
                                          ID of the metered feature that draws from this credit system.
                                        </ParamField>

                                        <ParamField body="billing_units" type="number">
                                          Number of metered-feature units priced together. Defaults to one when omitted.
                                        </ParamField>

                                        <ParamField body="dimensions.{key}" type="object">
                                          Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                                          <Expandable title="properties">
                                            <ParamField body="match.{key}" type="string" required>
                                              Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                            </ParamField>

                                            <ParamField body="priority" type="integer">
                                              Breaks ties between dimensions that match the same number of keys. Higher wins.
                                            </ParamField>

                                            <ParamField body="tier_behavior" type="string" required />

                                            <ParamField body="tiers" type="object[]" required>
                                              <Expandable title="properties">
                                                <ParamField body="to" type="number" required>
                                                  Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                                </ParamField>

                                                <ParamField body="credit_cost" type="number" required>
                                                  Credits consumed per billing-unit group within this tier.
                                                </ParamField>
                                              </Expandable>
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="multipliers.{key}" type="object">
                                          Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                                          <Expandable title="properties">
                                            <ParamField body="match.{key}" type="string" required>
                                              Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                            </ParamField>

                                            <ParamField body="factor" type="number">
                                              Multiplies the matched rate. All matching multipliers stack.
                                            </ParamField>

                                            <ParamField body="add" type="number">
                                              Added to the rate after every factor is applied, in credits per billing-unit group.
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="tier_behavior" type="string" />

                                        <ParamField body="tiers" type="object[]">
                                          <Expandable title="properties">
                                            <ParamField body="to" type="number" required>
                                              Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                            </ParamField>

                                            <ParamField body="credit_cost" type="number" required>
                                              Credits consumed per billing-unit group within this tier.
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="credit_cost" type="number">
                                          Credits consumed per billing-unit group.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="markups" type="object">
                                      For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                                      <Expandable title="properties">
                                        <ParamField body="default_markup" type="number">
                                          Default percentage markup for customers on this plan. Use -100 to make usage free.
                                        </ParamField>

                                        <ParamField body="provider_markups.{key}" type="object | null">
                                          Per-provider markup percentages for customers on this plan.

                                          <Expandable title="properties">
                                            <ParamField body="markup" type="number" required />
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="model_markups.{key}" type="object | null">
                                          Per-model markup overrides for customers on this plan.

                                          <Expandable title="properties">
                                            <ParamField body="markup" type="number" />

                                            <ParamField body="input_cost" type="number" />

                                            <ParamField body="output_cost" type="number" />
                                          </Expandable>
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="remove_items" type="object[]">
                              <Expandable title="properties">
                                <ParamField body="feature_id" type="string">
                                  Match items linked to this feature.
                                </ParamField>

                                <ParamField body="billing_method" type="'prepaid' | 'usage_based'">
                                  Match items with this billing method (prepaid or usage\_based).
                                </ParamField>

                                <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'">
                                  Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
                                </ParamField>

                                <ParamField body="interval_count" type="integer">
                                  Match items with this interval\_count. Disambiguates between items that share an interval but differ in count.
                                </ParamField>

                                <ParamField body="included" type="number">
                                  Match items whose grant equals this included usage. Omitted is a wildcard.
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="metadata" type="object" />
                      </Expandable>
                    </ParamField>

                    <ParamField body="remove_licenses" type="object[]">
                      License links to drop, keyed by license\_plan\_id. Parallel to remove\_items.

                      <Expandable title="properties">
                        <ParamField body="license_plan_id" type="string" required />
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="previous_attributes" type="object | null" required>
          Sparse map of scalar plan fields that changed, holding their previous values. Null when the plan is new.

          <Expandable title="properties">
            <ParamField body="id" type="string | null">
              Unique identifier for the plan.
            </ParamField>

            <ParamField body="name" type="string | null">
              Display name of the plan.
            </ParamField>

            <ParamField body="description" type="string | null | null">
              Optional description of the plan.
            </ParamField>

            <ParamField body="group" type="string | null | null">
              Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
            </ParamField>

            <ParamField body="add_on" type="boolean | null">
              Whether this is an add-on plan that can be attached alongside a main plan.
            </ParamField>

            <ParamField body="auto_enable" type="boolean | null">
              If true, this plan is automatically attached when a customer is created. Used for free plans.
            </ParamField>

            <ParamField body="config" type="object | null">
              Miscellaneous plan-level configuration flags.

              <Expandable title="properties">
                <ParamField body="ignore_past_due" type="boolean" required>
                  If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past\_due state.
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="active" type="boolean | null">
              Whether this is the active version of the plan. At most one version is active.
            </ParamField>

            <ParamField body="archived" type="boolean | null">
              Whether the plan is archived. Archived plans cannot be attached to new customers.
            </ParamField>

            <ParamField body="metadata" type="object | null">
              Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
            </ParamField>

            <ParamField body="processors" type="object | null">
              Previous payment processors when they changed. Null when the plan had none.

              <Expandable title="properties">
                <ParamField body="stripe" type="object | null">
                  <Expandable title="properties">
                    <ParamField body="product_id" type="string" required>
                      Stripe product ID this plan is billed under.
                    </ParamField>

                    <ParamField body="additional_product_ids" type="string[]">
                      Extra Stripe product IDs aliased to this plan.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="revenuecat" type="object | null">
                  <Expandable title="properties">
                    <ParamField body="products" type="object[]" required>
                      Every RevenueCat product that maps to this plan. Replaces the current set.

                      <Expandable title="properties">
                        <ParamField body="product_id" type="string" required>
                          RevenueCat product ID that grants this plan when purchased.
                        </ParamField>

                        <ParamField body="feature_quantities" type="object[]">
                          Prepaid quantities granted when this specific RevenueCat product is purchased, in feature units.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required />

                            <ParamField body="quantity" type="number" />
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="free_trial" type="object | null">
              Previous free trial when it changed. Null when the plan had none.

              <Expandable title="properties">
                <ParamField body="duration_length" type="number" required>
                  Number of duration\_type periods the trial lasts.
                </ParamField>

                <ParamField body="duration_type" type="'day' | 'month' | 'year'" required>
                  Unit of time for the trial duration ('day', 'month', 'year').
                </ParamField>

                <ParamField body="card_required" type="boolean" required>
                  Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
                </ParamField>

                <ParamField body="on_end" type="'bill' | 'revert'">
                  Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="billing_controls" type="object | null">
              Sparse previous billing\_controls — only keys that changed. Null when unset; a null lane was unset before.

              <Expandable title="properties">
                <ParamField body="auto_topups" type="object[] | null">
                  List of auto top-up configurations per feature.

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string" required>
                      The ID of the feature (credit balance) to auto top-up.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether auto top-up is enabled.
                    </ParamField>

                    <ParamField body="threshold" type="number" required>
                      When the balance drops below this threshold, an auto top-up will be purchased.
                    </ParamField>

                    <ParamField body="quantity" type="number" required>
                      Amount of credits to add per auto top-up.
                    </ParamField>

                    <ParamField body="purchase_limit" type="object">
                      Optional rate limit to cap how often auto top-ups occur.

                      <Expandable title="properties">
                        <ParamField body="interval" type="'hour' | 'day' | 'week' | 'month'" required>
                          The time interval for the purchase limit window.
                        </ParamField>

                        <ParamField body="interval_count" type="number" required>
                          Number of intervals in the purchase limit window.
                        </ParamField>

                        <ParamField body="limit" type="number" required>
                          Maximum number of auto top-ups allowed within the interval.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="invoice_mode" type="boolean">
                      When true, auto top-up creates a send\_invoice invoice instead of auto-charging.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="spend_limits" type="object[] | null">
                  List of overage spend limits per feature (caps overage spend).

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string">
                      Optional feature ID this spend limit applies to.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether the overage spend limit is enabled.
                    </ParamField>

                    <ParamField body="limit_type" type="'absolute' | 'usage_percentage'">
                      How overage\_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
                    </ParamField>

                    <ParamField body="overage_limit" type="number">
                      Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit\_type is usage\_percentage.
                    </ParamField>

                    <ParamField body="skip_overage_billing" type="boolean">
                      When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="usage_limits" type="object[] | null">
                  List of hard usage caps per feature (max units per interval).

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string" required>
                      The feature this usage limit applies to.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether this usage limit is enabled.
                    </ParamField>

                    <ParamField body="limit" type="number" required>
                      Maximum units allowed per interval.
                    </ParamField>

                    <ParamField body="interval" type="'day' | 'week' | 'month' | 'year'" required>
                      Interval for the cap, aligned to the customer's billing cycle.
                    </ParamField>

                    <ParamField body="anchor" type="'billing_cycle' | 'utc'">
                      Window alignment. 'billing\_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
                    </ParamField>

                    <ParamField body="filter" type="object">
                      When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.

                      <Expandable title="properties">
                        <ParamField body="properties.{key}" type="string" required />
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="usage_alerts" type="object[] | null">
                  List of usage alert configurations per feature.

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string">
                      The feature ID this alert applies to.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether this usage alert is enabled.
                    </ParamField>

                    <ParamField body="threshold" type="number" required>
                      The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage\_percentage or remaining\_percentage, this is a percentage (0-100).
                    </ParamField>

                    <ParamField body="threshold_type" type="'usage' | 'usage_percentage' | 'remaining' | 'remaining_percentage'" required>
                      Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
                    </ParamField>

                    <ParamField body="basis" type="'balance' | 'included' | 'recurring' | 'usage_limit'" required>
                      What 100% means. balance: every grant on the feature. included: the plan allowance only. recurring: grants that reset. usage\_limit: the cap of the usage limit with the same feature and filter.
                    </ParamField>

                    <ParamField body="filter" type="object">
                      Only valid with basis usage\_limit. Points the alert at the usage limit carrying the same filter.

                      <Expandable title="properties">
                        <ParamField body="properties.{key}" type="string" required />
                      </Expandable>
                    </ParamField>

                    <ParamField body="name" type="string">
                      Optional user-defined label to distinguish multiple alerts on the same feature.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="overage_allowed" type="object[] | null">
                  List of overage allowed controls per feature. When enabled, usage can exceed balance.

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string" required>
                      The feature ID this overage allowed control applies to.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether overage is allowed for this feature.
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="price_change" type="object">
          Present when the plan's price changed.

          <Expandable title="properties">
            <ParamField body="previous" type="object | null | null" required>
              Base recurring price for the plan. Null for free plans or usage-only plans.

              <Expandable title="properties">
                <ParamField body="amount" type="number" required>
                  Base price amount for the plan, in major currency units (e.g. dollars).
                </ParamField>

                <ParamField body="additional_currencies" type="object[]">
                  Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                  <Expandable title="properties">
                    <ParamField body="currency" type="string" required>
                      Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                    </ParamField>

                    <ParamField body="amount" type="number" required>
                      Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                  Billing interval (e.g. 'month', 'year').
                </ParamField>

                <ParamField body="interval_count" type="number">
                  Number of intervals per billing cycle. Defaults to 1.
                </ParamField>

                <ParamField body="display" type="object">
                  Display text for showing this price in pricing pages.

                  <Expandable title="properties">
                    <ParamField body="primary_text" type="string" required>
                      Main display text (e.g. '\$10' or '100 messages').
                    </ParamField>

                    <ParamField body="secondary_text" type="string">
                      Secondary display text (e.g. 'per month' or 'then \$0.5 per 100').
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="processors" type="object">
                  Payment processors this base price is connected to. Omitted when unset.

                  <Expandable title="properties">
                    <ParamField body="stripe" type="object | null">
                      <Expandable title="properties">
                        <ParamField body="price_id" type="string" required>
                          Stripe price ID. For prepaid with included > 0 this is the V2 price.
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="current" type="object | null" required>
              The plan's price after the change.

              <Expandable title="properties">
                <ParamField body="amount" type="number" required>
                  Base price amount for the plan, in major currency units (e.g. dollars).
                </ParamField>

                <ParamField body="additional_currencies" type="object[]">
                  Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                  <Expandable title="properties">
                    <ParamField body="currency" type="string" required>
                      Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                    </ParamField>

                    <ParamField body="amount" type="number" required>
                      Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                  Billing interval (e.g. 'month', 'year').
                </ParamField>

                <ParamField body="interval_count" type="number">
                  Number of intervals per billing cycle. Defaults to 1.
                </ParamField>

                <ParamField body="display" type="object">
                  Display text for showing this price in pricing pages.

                  <Expandable title="properties">
                    <ParamField body="primary_text" type="string" required>
                      Main display text (e.g. '\$10' or '100 messages').
                    </ParamField>

                    <ParamField body="secondary_text" type="string">
                      Secondary display text (e.g. 'per month' or 'then \$0.5 per 100').
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="processors" type="object">
                  Payment processors this base price is connected to. Omitted when unset.

                  <Expandable title="properties">
                    <ParamField body="stripe" type="object | null">
                      <Expandable title="properties">
                        <ParamField body="price_id" type="string" required>
                          Stripe price ID. For prepaid with included > 0 this is the V2 price.
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="free_trial_change" type="object">
          Present when the plan's free trial changed.

          <Expandable title="properties">
            <ParamField body="previous" type="object | null" required>
              The plan's free trial before the change. Null when none.

              <Expandable title="properties">
                <ParamField body="duration_length" type="number" required>
                  Number of duration\_type periods the trial lasts.
                </ParamField>

                <ParamField body="duration_type" type="'day' | 'month' | 'year'" required>
                  Unit of time for the trial duration ('day', 'month', 'year').
                </ParamField>

                <ParamField body="card_required" type="boolean" required>
                  Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
                </ParamField>

                <ParamField body="on_end" type="'bill' | 'revert'">
                  Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="current" type="object | null" required>
              The plan's free trial after the change. Null when none.

              <Expandable title="properties">
                <ParamField body="duration_length" type="number" required>
                  Number of duration\_type periods the trial lasts.
                </ParamField>

                <ParamField body="duration_type" type="'day' | 'month' | 'year'" required>
                  Unit of time for the trial duration ('day', 'month', 'year').
                </ParamField>

                <ParamField body="card_required" type="boolean" required>
                  Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
                </ParamField>

                <ParamField body="on_end" type="'bill' | 'revert'">
                  Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
                </ParamField>
              </Expandable>
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="item_changes" type="object[]" required>
          Feature items added to or removed from the plan.

          <Expandable title="properties">
            <ParamField body="action" type="'created' | 'deleted'" required>
              Whether the item was added to or removed from the plan.
            </ParamField>

            <ParamField body="feature_id" type="string" required>
              The ID of the feature that was added or removed.
            </ParamField>

            <ParamField body="item" type="object" required>
              The plan item snapshot that was added or removed.

              <Expandable title="properties">
                <ParamField body="feature_id" type="string" required>
                  The ID of the feature this item configures.
                </ParamField>

                <ParamField body="feature" type="object">
                  The full feature object if expanded.

                  <Expandable title="properties">
                    <ParamField body="id" type="string" required>
                      The ID of the feature, used to refer to it in other API calls like /track or /check.
                    </ParamField>

                    <ParamField body="name" type="string | null">
                      The name of the feature.
                    </ParamField>

                    <ParamField body="type" type="'static' | 'boolean' | 'single_use' | 'continuous_use' | 'credit_system' | 'ai_credit_system'" required>
                      The type of the feature
                    </ParamField>

                    <ParamField body="display" type="object | null">
                      Singular and plural display names for the feature.

                      <Expandable title="properties">
                        <ParamField body="singular" type="string" required>
                          The singular display name for the feature.
                        </ParamField>

                        <ParamField body="plural" type="string" required>
                          The plural display name for the feature.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="credit_schema" type="object[] | null">
                      Credit cost schema for credit system features.

                      <Expandable title="properties">
                        <ParamField body="metered_feature_id" type="string" required>
                          The ID of the metered feature (should be a single\_use feature).
                        </ParamField>

                        <ParamField body="credit_cost" type="number" required>
                          The credit cost of the metered feature.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="archived" type="boolean | null">
                      Whether or not the feature is archived.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="included" type="number" required>
                  Number of free units included. For consumable features, balance resets to this number each interval.
                </ParamField>

                <ParamField body="unlimited" type="boolean" required>
                  Whether the customer has unlimited access to this feature.
                </ParamField>

                <ParamField body="pooled" type="boolean">
                  Whether entity-level grants contribute to a shared customer balance.
                </ParamField>

                <ParamField body="reset" type="object | null" required>
                  Reset configuration for consumable features. Null for non-consumable features like seats where usage persists across billing cycles.

                  <Expandable title="properties">
                    <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                      The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
                    </ParamField>

                    <ParamField body="interval_count" type="number">
                      Number of intervals between resets. Defaults to 1.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="price" type="object | null" required>
                  Pricing configuration for usage beyond included units. Null if feature is entirely free.

                  <Expandable title="properties">
                    <ParamField body="amount" type="number">
                      Price per billing\_units after included usage is consumed. Mutually exclusive with tiers.
                    </ParamField>

                    <ParamField body="additional_currencies" type="object[]">
                      Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers' (tiered prices carry per-currency amounts on each tier).

                      <Expandable title="properties">
                        <ParamField body="currency" type="string" required>
                          Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                        </ParamField>

                        <ParamField body="amount" type="number" required>
                          Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="tiers" type="object[]">
                      Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.

                      <Expandable title="properties">
                        <ParamField body="to" type="number" required />

                        <ParamField body="amount" type="number" required />

                        <ParamField body="flat_amount" type="number" />

                        <ParamField body="additional_currencies" type="object[]">
                          <Expandable title="properties">
                            <ParamField body="currency" type="string" required>
                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                            </ParamField>

                            <ParamField body="amount" type="number">
                              Per-unit amount for this tier in this currency.
                            </ParamField>

                            <ParamField body="flat_amount" type="number">
                              Flat amount for this tier in this currency, if the tier uses one.
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                    <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                      Billing interval for this price. For consumable features, should match reset.interval.
                    </ParamField>

                    <ParamField body="interval_count" type="number">
                      Number of intervals per billing cycle. Defaults to 1.
                    </ParamField>

                    <ParamField body="billing_units" type="number" required>
                      Number of units per price increment. Usage is rounded UP to the nearest billing\_units when billed (e.g. billing\_units=100 means 101 usage rounds to 200).
                    </ParamField>

                    <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                      'prepaid' for features like seats where customers pay upfront, 'usage\_based' for pay-as-you-go after included usage.
                    </ParamField>

                    <ParamField body="max_purchase" type="number | null" required>
                      Maximum units a customer can purchase beyond included. E.g. if included=100 and max\_purchase=300, customer can use up to 400 total before usage is capped. Null for no limit.
                    </ParamField>

                    <ParamField body="processors" type="object">
                      Payment processors this item price is connected to. Omitted when unset.

                      <Expandable title="properties">
                        <ParamField body="stripe" type="object | null">
                          <Expandable title="properties">
                            <ParamField body="price_id" type="string" required>
                              Stripe price ID. For prepaid with included > 0 this is the V2 price.
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="display" type="object">
                  Display text for showing this item in pricing pages.

                  <Expandable title="properties">
                    <ParamField body="primary_text" type="string" required>
                      Main display text (e.g. '\$10' or '100 messages').
                    </ParamField>

                    <ParamField body="secondary_text" type="string">
                      Secondary display text (e.g. 'per month' or 'then \$0.5 per 100').
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="rollover" type="object">
                  Rollover configuration for unused units. If set, unused included units roll over to the next period.

                  <Expandable title="properties">
                    <ParamField body="max" type="number | null" required>
                      Maximum rollover units. Null for unlimited rollover.
                    </ParamField>

                    <ParamField body="max_percentage" type="number | null">
                      Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                    </ParamField>

                    <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                      When rolled over units expire.
                    </ParamField>

                    <ParamField body="expiry_duration_length" type="number">
                      Number of periods before expiry.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="feature_override" type="object">
                  Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

                  <Expandable title="properties">
                    <ParamField body="credit_schema" type="object | object[]">
                      For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                      <Expandable title="properties">
                        <ParamField body="metered_feature_id" type="string">
                          ID of the metered feature that draws from this credit system.
                        </ParamField>

                        <ParamField body="billing_units" type="number">
                          Number of metered-feature units priced together. Defaults to one when omitted.
                        </ParamField>

                        <ParamField body="dimensions.{key}" type="object">
                          Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                          <Expandable title="properties">
                            <ParamField body="match.{key}" type="string" required>
                              Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                            </ParamField>

                            <ParamField body="priority" type="integer">
                              Breaks ties between dimensions that match the same number of keys. Higher wins.
                            </ParamField>

                            <ParamField body="tier_behavior" type="string" required />

                            <ParamField body="tiers" type="object[]" required>
                              <Expandable title="properties">
                                <ParamField body="to" type="number" required>
                                  Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                </ParamField>

                                <ParamField body="credit_cost" type="number" required>
                                  Credits consumed per billing-unit group within this tier.
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="multipliers.{key}" type="object">
                          Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                          <Expandable title="properties">
                            <ParamField body="match.{key}" type="string" required>
                              Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                            </ParamField>

                            <ParamField body="factor" type="number">
                              Multiplies the matched rate. All matching multipliers stack.
                            </ParamField>

                            <ParamField body="add" type="number">
                              Added to the rate after every factor is applied, in credits per billing-unit group.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="tier_behavior" type="string" />

                        <ParamField body="tiers" type="object[]">
                          <Expandable title="properties">
                            <ParamField body="to" type="number" required>
                              Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                            </ParamField>

                            <ParamField body="credit_cost" type="number" required>
                              Credits consumed per billing-unit group within this tier.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="credit_cost" type="number">
                          Credits consumed per billing-unit group.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="markups" type="object">
                      For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                      <Expandable title="properties">
                        <ParamField body="default_markup" type="number">
                          Default percentage markup for customers on this plan. Use -100 to make usage free.
                        </ParamField>

                        <ParamField body="provider_markups.{key}" type="object | null">
                          Per-provider markup percentages for customers on this plan.

                          <Expandable title="properties">
                            <ParamField body="markup" type="number" required />
                          </Expandable>
                        </ParamField>

                        <ParamField body="model_markups.{key}" type="object | null">
                          Per-model markup overrides for customers on this plan.

                          <Expandable title="properties">
                            <ParamField body="markup" type="number" />

                            <ParamField body="input_cost" type="number" />

                            <ParamField body="output_cost" type="number" />
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="customize" type="object">
          Params that would transform the previous plan into the current one, including license upserts/removes.

          <Expandable title="properties">
            <ParamField body="price" type="object | null">
              Base price configuration for a plan.

              <Expandable title="properties">
                <ParamField body="amount" type="number" required>
                  Base price amount for the plan, in major currency units (e.g. dollars).
                </ParamField>

                <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                  Billing interval (e.g. 'month', 'year').
                </ParamField>

                <ParamField body="interval_count" type="number">
                  Number of intervals per billing cycle. Defaults to 1.
                </ParamField>

                <ParamField body="additional_currencies" type="object[]">
                  Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                  <Expandable title="properties">
                    <ParamField body="currency" type="string" required>
                      Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                    </ParamField>

                    <ParamField body="amount" type="number" required>
                      Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="add_items" type="object[]">
              Items to add to the plan.

              <Expandable title="properties">
                <ParamField body="feature_id" type="string" required>
                  The ID of the feature to configure.
                </ParamField>

                <ParamField body="included" type="number">
                  Number of free units included. Balance resets to this each interval for consumable features.
                </ParamField>

                <ParamField body="unlimited" type="boolean">
                  If true, customer has unlimited access to this feature.
                </ParamField>

                <ParamField body="pooled" type="boolean">
                  Whether entity-level grants contribute to a shared customer balance.
                </ParamField>

                <ParamField body="reset" type="object">
                  Reset configuration for consumable features. Omit for non-consumable features like seats.

                  <Expandable title="properties">
                    <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                      Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
                    </ParamField>

                    <ParamField body="interval_count" type="number">
                      Number of intervals between resets. Defaults to 1.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="price" type="object">
                  Pricing for usage beyond included units. Omit for free features.

                  <Expandable title="properties">
                    <ParamField body="amount" type="number">
                      Price per billing\_units after included usage. Either 'amount' or 'tiers' is required.
                    </ParamField>

                    <ParamField body="additional_currencies" type="object[]">
                      Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.

                      <Expandable title="properties">
                        <ParamField body="currency" type="string" required>
                          Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                        </ParamField>

                        <ParamField body="amount" type="number" required>
                          Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="tiers" type="object[]">
                      Tiered pricing. Either 'amount' or 'tiers' is required.

                      <Expandable title="properties">
                        <ParamField body="to" type="number" required />

                        <ParamField body="amount" type="number" required />

                        <ParamField body="flat_amount" type="number" />

                        <ParamField body="additional_currencies" type="object[]">
                          <Expandable title="properties">
                            <ParamField body="currency" type="string" required>
                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                            </ParamField>

                            <ParamField body="amount" type="number">
                              Per-unit amount for this tier in this currency.
                            </ParamField>

                            <ParamField body="flat_amount" type="number">
                              Flat amount for this tier in this currency, if the tier uses one.
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                    <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                      Billing interval. For consumable features, should match reset.interval.
                    </ParamField>

                    <ParamField body="interval_count" type="number">
                      Number of intervals per billing cycle. Defaults to 1.
                    </ParamField>

                    <ParamField body="billing_units" type="number">
                      Units per price increment. Usage is rounded UP when billed (e.g. billing\_units=100 means 101 rounds to 200).
                    </ParamField>

                    <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                      'prepaid' for upfront payment (seats), 'usage\_based' for pay-as-you-go.
                    </ParamField>

                    <ParamField body="max_purchase" type="number | null">
                      Max units purchasable beyond included. E.g. included=100, max\_purchase=300 allows 400 total. Null for no limit.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="proration" type="object">
                  Proration settings for prepaid features. Controls mid-cycle quantity change billing.

                  <Expandable title="properties">
                    <ParamField body="on_increase" type="'bill_immediately' | 'prorate_immediately' | 'prorate_next_cycle' | 'bill_next_cycle'" required>
                      Billing behavior when quantity increases mid-cycle.
                    </ParamField>

                    <ParamField body="on_decrease" type="'prorate' | 'prorate_immediately' | 'prorate_next_cycle' | 'none' | 'no_prorations'" required>
                      Credit behavior when quantity decreases mid-cycle.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="rollover" type="object">
                  Rollover config for unused units. If set, unused included units carry over.

                  <Expandable title="properties">
                    <ParamField body="max" type="number">
                      Max rollover units. Omit for unlimited rollover.
                    </ParamField>

                    <ParamField body="max_percentage" type="number">
                      Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                    </ParamField>

                    <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                      When rolled over units expire.
                    </ParamField>

                    <ParamField body="expiry_duration_length" type="number">
                      Number of periods before expiry.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="feature_override" type="object">
                  Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

                  <Expandable title="properties">
                    <ParamField body="credit_schema" type="object | object[]">
                      For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                      <Expandable title="properties">
                        <ParamField body="metered_feature_id" type="string">
                          ID of the metered feature that draws from this credit system.
                        </ParamField>

                        <ParamField body="billing_units" type="number">
                          Number of metered-feature units priced together. Defaults to one when omitted.
                        </ParamField>

                        <ParamField body="dimensions.{key}" type="object">
                          Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                          <Expandable title="properties">
                            <ParamField body="match.{key}" type="string" required>
                              Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                            </ParamField>

                            <ParamField body="priority" type="integer">
                              Breaks ties between dimensions that match the same number of keys. Higher wins.
                            </ParamField>

                            <ParamField body="tier_behavior" type="string" required />

                            <ParamField body="tiers" type="object[]" required>
                              <Expandable title="properties">
                                <ParamField body="to" type="number" required>
                                  Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                </ParamField>

                                <ParamField body="credit_cost" type="number" required>
                                  Credits consumed per billing-unit group within this tier.
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="multipliers.{key}" type="object">
                          Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                          <Expandable title="properties">
                            <ParamField body="match.{key}" type="string" required>
                              Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                            </ParamField>

                            <ParamField body="factor" type="number">
                              Multiplies the matched rate. All matching multipliers stack.
                            </ParamField>

                            <ParamField body="add" type="number">
                              Added to the rate after every factor is applied, in credits per billing-unit group.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="tier_behavior" type="string" />

                        <ParamField body="tiers" type="object[]">
                          <Expandable title="properties">
                            <ParamField body="to" type="number" required>
                              Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                            </ParamField>

                            <ParamField body="credit_cost" type="number" required>
                              Credits consumed per billing-unit group within this tier.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="credit_cost" type="number">
                          Credits consumed per billing-unit group.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="markups" type="object">
                      For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                      <Expandable title="properties">
                        <ParamField body="default_markup" type="number">
                          Default percentage markup for customers on this plan. Use -100 to make usage free.
                        </ParamField>

                        <ParamField body="provider_markups.{key}" type="object | null">
                          Per-provider markup percentages for customers on this plan.

                          <Expandable title="properties">
                            <ParamField body="markup" type="number" required />
                          </Expandable>
                        </ParamField>

                        <ParamField body="model_markups.{key}" type="object | null">
                          Per-model markup overrides for customers on this plan.

                          <Expandable title="properties">
                            <ParamField body="markup" type="number" />

                            <ParamField body="input_cost" type="number" />

                            <ParamField body="output_cost" type="number" />
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="remove_items" type="object[]">
              Filters selecting items to remove from the plan.

              <Expandable title="properties">
                <ParamField body="feature_id" type="string">
                  Match items linked to this feature.
                </ParamField>

                <ParamField body="billing_method" type="'prepaid' | 'usage_based'">
                  Match items with this billing method (prepaid or usage\_based).
                </ParamField>

                <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'">
                  Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
                </ParamField>

                <ParamField body="interval_count" type="integer">
                  Match items with this interval\_count. Disambiguates between items that share an interval but differ in count.
                </ParamField>

                <ParamField body="included" type="number">
                  Match items whose grant equals this included usage. Omitted is a wildcard.
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="free_trial" type="object | null">
              Free trial configuration for a plan.

              <Expandable title="properties">
                <ParamField body="duration_length" type="number" required>
                  Number of duration\_type periods the trial lasts.
                </ParamField>

                <ParamField body="duration_type" type="'day' | 'month' | 'year'" required>
                  Unit of time for the trial ('day', 'month', 'year').
                </ParamField>

                <ParamField body="card_required" type="boolean" required>
                  If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
                </ParamField>

                <ParamField body="on_end" type="'bill' | 'revert'">
                  Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="billing_controls" type="object">
              Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.

              <Expandable title="properties">
                <ParamField body="auto_topups" type="object[]">
                  List of auto top-up configurations per feature.

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string" required>
                      The ID of the feature (credit balance) to auto top-up.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether auto top-up is enabled.
                    </ParamField>

                    <ParamField body="threshold" type="number" required>
                      When the balance drops below this threshold, an auto top-up will be purchased.
                    </ParamField>

                    <ParamField body="quantity" type="number" required>
                      Amount of credits to add per auto top-up.
                    </ParamField>

                    <ParamField body="purchase_limit" type="object">
                      Optional rate limit to cap how often auto top-ups occur. Pass count to set the current window's consumed top-ups.

                      <Expandable title="properties">
                        <ParamField body="interval" type="'hour' | 'day' | 'week' | 'month'" required>
                          The time interval for the purchase limit window.
                        </ParamField>

                        <ParamField body="interval_count" type="number" required>
                          Number of intervals in the purchase limit window.
                        </ParamField>

                        <ParamField body="limit" type="number" required>
                          Maximum number of auto top-ups allowed within the interval.
                        </ParamField>

                        <ParamField body="count" type="number">
                          Set the current window's consumed auto top-up count. Omit to leave runtime state unchanged.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="invoice_mode" type="boolean">
                      When true, auto top-up creates a send\_invoice invoice instead of auto-charging.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="spend_limits" type="object[]">
                  List of overage spend limits per feature (caps overage spend).

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string">
                      Optional feature ID this spend limit applies to.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether the overage spend limit is enabled.
                    </ParamField>

                    <ParamField body="limit_type" type="'absolute' | 'usage_percentage'">
                      How overage\_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
                    </ParamField>

                    <ParamField body="overage_limit" type="number">
                      Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit\_type is usage\_percentage.
                    </ParamField>

                    <ParamField body="skip_overage_billing" type="boolean">
                      When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="usage_limits" type="object[]">
                  List of hard usage caps per feature (max units per interval).

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string" required>
                      The feature this usage limit applies to.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether this usage limit is enabled.
                    </ParamField>

                    <ParamField body="limit" type="number" required>
                      Maximum units allowed per interval.
                    </ParamField>

                    <ParamField body="interval" type="'day' | 'week' | 'month' | 'year'" required>
                      Interval for the cap, aligned to the customer's billing cycle.
                    </ParamField>

                    <ParamField body="anchor" type="'billing_cycle' | 'utc'">
                      Window alignment. 'billing\_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
                    </ParamField>

                    <ParamField body="filter" type="object">
                      When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.

                      <Expandable title="properties">
                        <ParamField body="properties.{key}" type="string" required />
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="usage_alerts" type="object[]">
                  List of usage alert configurations per feature.

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string">
                      The feature ID this alert applies to.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether this usage alert is enabled.
                    </ParamField>

                    <ParamField body="threshold" type="number" required>
                      The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage\_percentage or remaining\_percentage, this is a percentage (0-100).
                    </ParamField>

                    <ParamField body="threshold_type" type="'usage' | 'usage_percentage' | 'remaining' | 'remaining_percentage'" required>
                      Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
                    </ParamField>

                    <ParamField body="basis" type="'balance' | 'included' | 'recurring' | 'usage_limit'" required>
                      What 100% means. balance: every grant on the feature. included: the plan allowance only. recurring: grants that reset. usage\_limit: the cap of the usage limit with the same feature and filter.
                    </ParamField>

                    <ParamField body="filter" type="object">
                      Only valid with basis usage\_limit. Points the alert at the usage limit carrying the same filter.

                      <Expandable title="properties">
                        <ParamField body="properties.{key}" type="string" required />
                      </Expandable>
                    </ParamField>

                    <ParamField body="name" type="string">
                      Optional user-defined label to distinguish multiple alerts on the same feature.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="overage_allowed" type="object[]">
                  List of overage allowed controls per feature. When enabled, usage can exceed balance.

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string" required>
                      The feature ID this overage allowed control applies to.
                    </ParamField>

                    <ParamField body="enabled" type="boolean" required>
                      Whether overage is allowed for this feature.
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="upsert_licenses" type="object[]">
              planLicenses created or overridden. Same shape as customize.upsert\_licenses / licenses\[] entries.

              <Expandable title="properties">
                <ParamField body="license_plan_id" type="string" required />

                <ParamField body="version_slug" type="string" />

                <ParamField body="included" type="integer" />

                <ParamField body="prepaid_only" type="boolean" />

                <ParamField body="customize" type="object | null">
                  <Expandable title="properties">
                    <ParamField body="price" type="object | null">
                      Base price configuration for a plan.

                      <Expandable title="properties">
                        <ParamField body="amount" type="number" required>
                          Base price amount for the plan, in major currency units (e.g. dollars).
                        </ParamField>

                        <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                          Billing interval (e.g. 'month', 'year').
                        </ParamField>

                        <ParamField body="interval_count" type="number">
                          Number of intervals per billing cycle. Defaults to 1.
                        </ParamField>

                        <ParamField body="additional_currencies" type="object[]">
                          Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                          <Expandable title="properties">
                            <ParamField body="currency" type="string" required>
                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                            </ParamField>

                            <ParamField body="amount" type="number" required>
                              Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="add_items" type="object[]">
                      <Expandable title="properties">
                        <ParamField body="feature_id" type="string" required>
                          The ID of the feature to configure.
                        </ParamField>

                        <ParamField body="included" type="number">
                          Number of free units included. Balance resets to this each interval for consumable features.
                        </ParamField>

                        <ParamField body="unlimited" type="boolean">
                          If true, customer has unlimited access to this feature.
                        </ParamField>

                        <ParamField body="pooled" type="boolean">
                          Whether entity-level grants contribute to a shared customer balance.
                        </ParamField>

                        <ParamField body="reset" type="object">
                          Reset configuration for consumable features. Omit for non-consumable features like seats.

                          <Expandable title="properties">
                            <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                              Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
                            </ParamField>

                            <ParamField body="interval_count" type="number">
                              Number of intervals between resets. Defaults to 1.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="price" type="object">
                          Pricing for usage beyond included units. Omit for free features.

                          <Expandable title="properties">
                            <ParamField body="amount" type="number">
                              Price per billing\_units after included usage. Either 'amount' or 'tiers' is required.
                            </ParamField>

                            <ParamField body="additional_currencies" type="object[]">
                              Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.

                              <Expandable title="properties">
                                <ParamField body="currency" type="string" required>
                                  Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                </ParamField>

                                <ParamField body="amount" type="number" required>
                                  Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="tiers" type="object[]">
                              Tiered pricing. Either 'amount' or 'tiers' is required.

                              <Expandable title="properties">
                                <ParamField body="to" type="number" required />

                                <ParamField body="amount" type="number" required />

                                <ParamField body="flat_amount" type="number" />

                                <ParamField body="additional_currencies" type="object[]">
                                  <Expandable title="properties">
                                    <ParamField body="currency" type="string" required>
                                      Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                    </ParamField>

                                    <ParamField body="amount" type="number">
                                      Per-unit amount for this tier in this currency.
                                    </ParamField>

                                    <ParamField body="flat_amount" type="number">
                                      Flat amount for this tier in this currency, if the tier uses one.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                            <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                              Billing interval. For consumable features, should match reset.interval.
                            </ParamField>

                            <ParamField body="interval_count" type="number">
                              Number of intervals per billing cycle. Defaults to 1.
                            </ParamField>

                            <ParamField body="billing_units" type="number">
                              Units per price increment. Usage is rounded UP when billed (e.g. billing\_units=100 means 101 rounds to 200).
                            </ParamField>

                            <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                              'prepaid' for upfront payment (seats), 'usage\_based' for pay-as-you-go.
                            </ParamField>

                            <ParamField body="max_purchase" type="number | null">
                              Max units purchasable beyond included. E.g. included=100, max\_purchase=300 allows 400 total. Null for no limit.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="proration" type="object">
                          Proration settings for prepaid features. Controls mid-cycle quantity change billing.

                          <Expandable title="properties">
                            <ParamField body="on_increase" type="'bill_immediately' | 'prorate_immediately' | 'prorate_next_cycle' | 'bill_next_cycle'" required>
                              Billing behavior when quantity increases mid-cycle.
                            </ParamField>

                            <ParamField body="on_decrease" type="'prorate' | 'prorate_immediately' | 'prorate_next_cycle' | 'none' | 'no_prorations'" required>
                              Credit behavior when quantity decreases mid-cycle.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="rollover" type="object">
                          Rollover config for unused units. If set, unused included units carry over.

                          <Expandable title="properties">
                            <ParamField body="max" type="number">
                              Max rollover units. Omit for unlimited rollover.
                            </ParamField>

                            <ParamField body="max_percentage" type="number">
                              Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                            </ParamField>

                            <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                              When rolled over units expire.
                            </ParamField>

                            <ParamField body="expiry_duration_length" type="number">
                              Number of periods before expiry.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="feature_override" type="object">
                          Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

                          <Expandable title="properties">
                            <ParamField body="credit_schema" type="object | object[]">
                              For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                              <Expandable title="properties">
                                <ParamField body="metered_feature_id" type="string">
                                  ID of the metered feature that draws from this credit system.
                                </ParamField>

                                <ParamField body="billing_units" type="number">
                                  Number of metered-feature units priced together. Defaults to one when omitted.
                                </ParamField>

                                <ParamField body="dimensions.{key}" type="object">
                                  Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                                  <Expandable title="properties">
                                    <ParamField body="match.{key}" type="string" required>
                                      Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                    </ParamField>

                                    <ParamField body="priority" type="integer">
                                      Breaks ties between dimensions that match the same number of keys. Higher wins.
                                    </ParamField>

                                    <ParamField body="tier_behavior" type="string" required />

                                    <ParamField body="tiers" type="object[]" required>
                                      <Expandable title="properties">
                                        <ParamField body="to" type="number" required>
                                          Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                        </ParamField>

                                        <ParamField body="credit_cost" type="number" required>
                                          Credits consumed per billing-unit group within this tier.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="multipliers.{key}" type="object">
                                  Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                                  <Expandable title="properties">
                                    <ParamField body="match.{key}" type="string" required>
                                      Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                    </ParamField>

                                    <ParamField body="factor" type="number">
                                      Multiplies the matched rate. All matching multipliers stack.
                                    </ParamField>

                                    <ParamField body="add" type="number">
                                      Added to the rate after every factor is applied, in credits per billing-unit group.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="tier_behavior" type="string" />

                                <ParamField body="tiers" type="object[]">
                                  <Expandable title="properties">
                                    <ParamField body="to" type="number" required>
                                      Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                    </ParamField>

                                    <ParamField body="credit_cost" type="number" required>
                                      Credits consumed per billing-unit group within this tier.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="credit_cost" type="number">
                                  Credits consumed per billing-unit group.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="markups" type="object">
                              For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                              <Expandable title="properties">
                                <ParamField body="default_markup" type="number">
                                  Default percentage markup for customers on this plan. Use -100 to make usage free.
                                </ParamField>

                                <ParamField body="provider_markups.{key}" type="object | null">
                                  Per-provider markup percentages for customers on this plan.

                                  <Expandable title="properties">
                                    <ParamField body="markup" type="number" required />
                                  </Expandable>
                                </ParamField>

                                <ParamField body="model_markups.{key}" type="object | null">
                                  Per-model markup overrides for customers on this plan.

                                  <Expandable title="properties">
                                    <ParamField body="markup" type="number" />

                                    <ParamField body="input_cost" type="number" />

                                    <ParamField body="output_cost" type="number" />
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="remove_items" type="object[]">
                      <Expandable title="properties">
                        <ParamField body="feature_id" type="string">
                          Match items linked to this feature.
                        </ParamField>

                        <ParamField body="billing_method" type="'prepaid' | 'usage_based'">
                          Match items with this billing method (prepaid or usage\_based).
                        </ParamField>

                        <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'">
                          Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
                        </ParamField>

                        <ParamField body="interval_count" type="integer">
                          Match items with this interval\_count. Disambiguates between items that share an interval but differ in count.
                        </ParamField>

                        <ParamField body="included" type="number">
                          Match items whose grant equals this included usage. Omitted is a wildcard.
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="metadata" type="object" />
              </Expandable>
            </ParamField>

            <ParamField body="remove_licenses" type="object[]">
              planLicenses dropped from this plan.

              <Expandable title="properties">
                <ParamField body="license_plan_id" type="string" required />
              </Expandable>
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="license_changes" type="object[]">
          planLicenses created, updated, or removed on this plan. Omitted when none. Nested plan\_change is core-only.

          <Expandable title="properties">
            <ParamField body="license_plan_id" type="string" required>
              The plan offered as a license under this plan.
            </ParamField>

            <ParamField body="version" type="integer" required>
              The exact license-plan version pinned by this link.
            </ParamField>

            <ParamField body="version_slug" type="string">
              Version slug of the license-plan row this link points at.
            </ParamField>

            <ParamField body="included" type="number" required>
              Number of license assignments included with this plan for free.
            </ParamField>

            <ParamField body="metadata" type="object">
              Arbitrary key-value metadata defined by you on this link.
            </ParamField>

            <ParamField body="plan" type="object">
              The effective plan for this license link — the pinned version, with the link's customize applied. Present when license plans are expanded.

              <Expandable title="properties">
                <ParamField body="id" type="string" required>
                  Unique identifier for the plan.
                </ParamField>

                <ParamField body="name" type="string" required>
                  Display name of the plan.
                </ParamField>

                <ParamField body="description" type="string | null" required>
                  Optional description of the plan.
                </ParamField>

                <ParamField body="group" type="string | null" required>
                  Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
                </ParamField>

                <ParamField body="version" type="number" required>
                  Version number of the plan. Incremented when plan configuration changes.
                </ParamField>

                <ParamField body="version_slug" type="string | null">
                  User-facing version identity. Defaults to v\{n} when the version is minted.
                </ParamField>

                <ParamField body="active" type="boolean">
                  Whether this is the active version of the plan. At most one version is active.
                </ParamField>

                <ParamField body="add_on" type="boolean" required>
                  Whether this is an add-on plan that can be attached alongside a main plan.
                </ParamField>

                <ParamField body="auto_enable" type="boolean" required>
                  If true, this plan is automatically attached when a customer is created. Used for free plans.
                </ParamField>

                <ParamField body="price" type="object | null" required>
                  Base recurring price for the plan. Null for free plans or usage-only plans.

                  <Expandable title="properties">
                    <ParamField body="amount" type="number" required>
                      Base price amount for the plan, in major currency units (e.g. dollars).
                    </ParamField>

                    <ParamField body="additional_currencies" type="object[]">
                      Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                      <Expandable title="properties">
                        <ParamField body="currency" type="string" required>
                          Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                        </ParamField>

                        <ParamField body="amount" type="number" required>
                          Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                      Billing interval (e.g. 'month', 'year').
                    </ParamField>

                    <ParamField body="interval_count" type="number">
                      Number of intervals per billing cycle. Defaults to 1.
                    </ParamField>

                    <ParamField body="display" type="object">
                      Display text for showing this price in pricing pages.

                      <Expandable title="properties">
                        <ParamField body="primary_text" type="string" required>
                          Main display text (e.g. '\$10' or '100 messages').
                        </ParamField>

                        <ParamField body="secondary_text" type="string">
                          Secondary display text (e.g. 'per month' or 'then \$0.5 per 100').
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="processors" type="object">
                      Payment processors this base price is connected to. Omitted when unset.

                      <Expandable title="properties">
                        <ParamField body="stripe" type="object | null">
                          <Expandable title="properties">
                            <ParamField body="price_id" type="string" required>
                              Stripe price ID. For prepaid with included > 0 this is the V2 price.
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="items" type="object[]" required>
                  Feature configurations included in this plan. Each item defines included units, pricing, and reset behavior for a feature.

                  <Expandable title="properties">
                    <ParamField body="feature_id" type="string" required>
                      The ID of the feature this item configures.
                    </ParamField>

                    <ParamField body="feature" type="object">
                      The full feature object if expanded.

                      <Expandable title="properties">
                        <ParamField body="id" type="string" required>
                          The ID of the feature, used to refer to it in other API calls like /track or /check.
                        </ParamField>

                        <ParamField body="name" type="string | null">
                          The name of the feature.
                        </ParamField>

                        <ParamField body="type" type="'static' | 'boolean' | 'single_use' | 'continuous_use' | 'credit_system' | 'ai_credit_system'" required>
                          The type of the feature
                        </ParamField>

                        <ParamField body="display" type="object | null">
                          Singular and plural display names for the feature.

                          <Expandable title="properties">
                            <ParamField body="singular" type="string" required>
                              The singular display name for the feature.
                            </ParamField>

                            <ParamField body="plural" type="string" required>
                              The plural display name for the feature.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="credit_schema" type="object[] | null">
                          Credit cost schema for credit system features.

                          <Expandable title="properties">
                            <ParamField body="metered_feature_id" type="string" required>
                              The ID of the metered feature (should be a single\_use feature).
                            </ParamField>

                            <ParamField body="credit_cost" type="number" required>
                              The credit cost of the metered feature.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="archived" type="boolean | null">
                          Whether or not the feature is archived.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="included" type="number" required>
                      Number of free units included. For consumable features, balance resets to this number each interval.
                    </ParamField>

                    <ParamField body="unlimited" type="boolean" required>
                      Whether the customer has unlimited access to this feature.
                    </ParamField>

                    <ParamField body="pooled" type="boolean">
                      Whether entity-level grants contribute to a shared customer balance.
                    </ParamField>

                    <ParamField body="reset" type="object | null" required>
                      Reset configuration for consumable features. Null for non-consumable features like seats where usage persists across billing cycles.

                      <Expandable title="properties">
                        <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                          The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
                        </ParamField>

                        <ParamField body="interval_count" type="number">
                          Number of intervals between resets. Defaults to 1.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="price" type="object | null" required>
                      Pricing configuration for usage beyond included units. Null if feature is entirely free.

                      <Expandable title="properties">
                        <ParamField body="amount" type="number">
                          Price per billing\_units after included usage is consumed. Mutually exclusive with tiers.
                        </ParamField>

                        <ParamField body="additional_currencies" type="object[]">
                          Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers' (tiered prices carry per-currency amounts on each tier).

                          <Expandable title="properties">
                            <ParamField body="currency" type="string" required>
                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                            </ParamField>

                            <ParamField body="amount" type="number" required>
                              Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="tiers" type="object[]">
                          Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.

                          <Expandable title="properties">
                            <ParamField body="to" type="number" required />

                            <ParamField body="amount" type="number" required />

                            <ParamField body="flat_amount" type="number" />

                            <ParamField body="additional_currencies" type="object[]">
                              <Expandable title="properties">
                                <ParamField body="currency" type="string" required>
                                  Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                </ParamField>

                                <ParamField body="amount" type="number">
                                  Per-unit amount for this tier in this currency.
                                </ParamField>

                                <ParamField body="flat_amount" type="number">
                                  Flat amount for this tier in this currency, if the tier uses one.
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                        <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                          Billing interval for this price. For consumable features, should match reset.interval.
                        </ParamField>

                        <ParamField body="interval_count" type="number">
                          Number of intervals per billing cycle. Defaults to 1.
                        </ParamField>

                        <ParamField body="billing_units" type="number" required>
                          Number of units per price increment. Usage is rounded UP to the nearest billing\_units when billed (e.g. billing\_units=100 means 101 usage rounds to 200).
                        </ParamField>

                        <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                          'prepaid' for features like seats where customers pay upfront, 'usage\_based' for pay-as-you-go after included usage.
                        </ParamField>

                        <ParamField body="max_purchase" type="number | null" required>
                          Maximum units a customer can purchase beyond included. E.g. if included=100 and max\_purchase=300, customer can use up to 400 total before usage is capped. Null for no limit.
                        </ParamField>

                        <ParamField body="processors" type="object">
                          Payment processors this item price is connected to. Omitted when unset.

                          <Expandable title="properties">
                            <ParamField body="stripe" type="object | null">
                              <Expandable title="properties">
                                <ParamField body="price_id" type="string" required>
                                  Stripe price ID. For prepaid with included > 0 this is the V2 price.
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="display" type="object">
                      Display text for showing this item in pricing pages.

                      <Expandable title="properties">
                        <ParamField body="primary_text" type="string" required>
                          Main display text (e.g. '\$10' or '100 messages').
                        </ParamField>

                        <ParamField body="secondary_text" type="string">
                          Secondary display text (e.g. 'per month' or 'then \$0.5 per 100').
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="rollover" type="object">
                      Rollover configuration for unused units. If set, unused included units roll over to the next period.

                      <Expandable title="properties">
                        <ParamField body="max" type="number | null" required>
                          Maximum rollover units. Null for unlimited rollover.
                        </ParamField>

                        <ParamField body="max_percentage" type="number | null">
                          Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                        </ParamField>

                        <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                          When rolled over units expire.
                        </ParamField>

                        <ParamField body="expiry_duration_length" type="number">
                          Number of periods before expiry.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="feature_override" type="object">
                      Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

                      <Expandable title="properties">
                        <ParamField body="credit_schema" type="object | object[]">
                          For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                          <Expandable title="properties">
                            <ParamField body="metered_feature_id" type="string">
                              ID of the metered feature that draws from this credit system.
                            </ParamField>

                            <ParamField body="billing_units" type="number">
                              Number of metered-feature units priced together. Defaults to one when omitted.
                            </ParamField>

                            <ParamField body="dimensions.{key}" type="object">
                              Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                              <Expandable title="properties">
                                <ParamField body="match.{key}" type="string" required>
                                  Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                </ParamField>

                                <ParamField body="priority" type="integer">
                                  Breaks ties between dimensions that match the same number of keys. Higher wins.
                                </ParamField>

                                <ParamField body="tier_behavior" type="string" required />

                                <ParamField body="tiers" type="object[]" required>
                                  <Expandable title="properties">
                                    <ParamField body="to" type="number" required>
                                      Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                    </ParamField>

                                    <ParamField body="credit_cost" type="number" required>
                                      Credits consumed per billing-unit group within this tier.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="multipliers.{key}" type="object">
                              Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                              <Expandable title="properties">
                                <ParamField body="match.{key}" type="string" required>
                                  Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                </ParamField>

                                <ParamField body="factor" type="number">
                                  Multiplies the matched rate. All matching multipliers stack.
                                </ParamField>

                                <ParamField body="add" type="number">
                                  Added to the rate after every factor is applied, in credits per billing-unit group.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="tier_behavior" type="string" />

                            <ParamField body="tiers" type="object[]">
                              <Expandable title="properties">
                                <ParamField body="to" type="number" required>
                                  Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                </ParamField>

                                <ParamField body="credit_cost" type="number" required>
                                  Credits consumed per billing-unit group within this tier.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="credit_cost" type="number">
                              Credits consumed per billing-unit group.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="markups" type="object">
                          For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                          <Expandable title="properties">
                            <ParamField body="default_markup" type="number">
                              Default percentage markup for customers on this plan. Use -100 to make usage free.
                            </ParamField>

                            <ParamField body="provider_markups.{key}" type="object | null">
                              Per-provider markup percentages for customers on this plan.

                              <Expandable title="properties">
                                <ParamField body="markup" type="number" required />
                              </Expandable>
                            </ParamField>

                            <ParamField body="model_markups.{key}" type="object | null">
                              Per-model markup overrides for customers on this plan.

                              <Expandable title="properties">
                                <ParamField body="markup" type="number" />

                                <ParamField body="input_cost" type="number" />

                                <ParamField body="output_cost" type="number" />
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="processors" type="object">
                  Payment processors this plan is connected to. Omitted when unset.

                  <Expandable title="properties">
                    <ParamField body="stripe" type="object | null">
                      <Expandable title="properties">
                        <ParamField body="product_id" type="string" required>
                          Stripe product ID this plan is billed under.
                        </ParamField>

                        <ParamField body="additional_product_ids" type="string[]">
                          Extra Stripe product IDs aliased to this plan.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="revenuecat" type="object | null">
                      <Expandable title="properties">
                        <ParamField body="products" type="object[]" required>
                          Every RevenueCat product that maps to this plan. Replaces the current set.

                          <Expandable title="properties">
                            <ParamField body="product_id" type="string" required>
                              RevenueCat product ID that grants this plan when purchased.
                            </ParamField>

                            <ParamField body="feature_quantities" type="object[]">
                              Prepaid quantities granted when this specific RevenueCat product is purchased, in feature units.

                              <Expandable title="properties">
                                <ParamField body="feature_id" type="string" required />

                                <ParamField body="quantity" type="number" />
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="free_trial" type="object">
                  Free trial configuration. If set, new customers can try this plan before being charged.

                  <Expandable title="properties">
                    <ParamField body="duration_length" type="number" required>
                      Number of duration\_type periods the trial lasts.
                    </ParamField>

                    <ParamField body="duration_type" type="'day' | 'month' | 'year'" required>
                      Unit of time for the trial duration ('day', 'month', 'year').
                    </ParamField>

                    <ParamField body="card_required" type="boolean" required>
                      Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
                    </ParamField>

                    <ParamField body="on_end" type="'bill' | 'revert'">
                      Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="created_at" type="number" required>
                  Unix timestamp (ms) when the plan was created.
                </ParamField>

                <ParamField body="env" type="'sandbox' | 'live'" required>
                  Environment this plan belongs to ('sandbox' or 'live').
                </ParamField>

                <ParamField body="archived" type="boolean" required>
                  Whether the plan is archived. Archived plans cannot be attached to new customers.
                </ParamField>

                <ParamField body="config" type="object" required>
                  Miscellaneous plan-level configuration flags.

                  <Expandable title="properties">
                    <ParamField body="ignore_past_due" type="boolean" required>
                      If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past\_due state.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="billing_controls" type="object">
                  Plan-level billing controls used as customer defaults.

                  <Expandable title="properties">
                    <ParamField body="auto_topups" type="object[]">
                      List of auto top-up configurations per feature.

                      <Expandable title="properties">
                        <ParamField body="feature_id" type="string" required>
                          The ID of the feature (credit balance) to auto top-up.
                        </ParamField>

                        <ParamField body="enabled" type="boolean" required>
                          Whether auto top-up is enabled.
                        </ParamField>

                        <ParamField body="threshold" type="number" required>
                          When the balance drops below this threshold, an auto top-up will be purchased.
                        </ParamField>

                        <ParamField body="quantity" type="number" required>
                          Amount of credits to add per auto top-up.
                        </ParamField>

                        <ParamField body="purchase_limit" type="object">
                          Optional rate limit to cap how often auto top-ups occur.

                          <Expandable title="properties">
                            <ParamField body="interval" type="'hour' | 'day' | 'week' | 'month'" required>
                              The time interval for the purchase limit window.
                            </ParamField>

                            <ParamField body="interval_count" type="number" required>
                              Number of intervals in the purchase limit window.
                            </ParamField>

                            <ParamField body="limit" type="number" required>
                              Maximum number of auto top-ups allowed within the interval.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="invoice_mode" type="boolean">
                          When true, auto top-up creates a send\_invoice invoice instead of auto-charging.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="spend_limits" type="object[]">
                      List of overage spend limits per feature (caps overage spend).

                      <Expandable title="properties">
                        <ParamField body="feature_id" type="string">
                          Optional feature ID this spend limit applies to.
                        </ParamField>

                        <ParamField body="enabled" type="boolean" required>
                          Whether the overage spend limit is enabled.
                        </ParamField>

                        <ParamField body="limit_type" type="'absolute' | 'usage_percentage'">
                          How overage\_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
                        </ParamField>

                        <ParamField body="overage_limit" type="number">
                          Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit\_type is usage\_percentage.
                        </ParamField>

                        <ParamField body="skip_overage_billing" type="boolean">
                          When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="usage_limits" type="object[]">
                      List of hard usage caps per feature (max units per interval).

                      <Expandable title="properties">
                        <ParamField body="feature_id" type="string" required>
                          The feature this usage limit applies to.
                        </ParamField>

                        <ParamField body="enabled" type="boolean" required>
                          Whether this usage limit is enabled.
                        </ParamField>

                        <ParamField body="limit" type="number" required>
                          Maximum units allowed per interval.
                        </ParamField>

                        <ParamField body="interval" type="'day' | 'week' | 'month' | 'year'" required>
                          Interval for the cap, aligned to the customer's billing cycle.
                        </ParamField>

                        <ParamField body="anchor" type="'billing_cycle' | 'utc'">
                          Window alignment. 'billing\_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
                        </ParamField>

                        <ParamField body="filter" type="object">
                          When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.

                          <Expandable title="properties">
                            <ParamField body="properties.{key}" type="string" required />
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="usage_alerts" type="object[]">
                      List of usage alert configurations per feature.

                      <Expandable title="properties">
                        <ParamField body="feature_id" type="string">
                          The feature ID this alert applies to.
                        </ParamField>

                        <ParamField body="enabled" type="boolean" required>
                          Whether this usage alert is enabled.
                        </ParamField>

                        <ParamField body="threshold" type="number" required>
                          The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage\_percentage or remaining\_percentage, this is a percentage (0-100).
                        </ParamField>

                        <ParamField body="threshold_type" type="'usage' | 'usage_percentage' | 'remaining' | 'remaining_percentage'" required>
                          Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
                        </ParamField>

                        <ParamField body="basis" type="'balance' | 'included' | 'recurring' | 'usage_limit'" required>
                          What 100% means. balance: every grant on the feature. included: the plan allowance only. recurring: grants that reset. usage\_limit: the cap of the usage limit with the same feature and filter.
                        </ParamField>

                        <ParamField body="filter" type="object">
                          Only valid with basis usage\_limit. Points the alert at the usage limit carrying the same filter.

                          <Expandable title="properties">
                            <ParamField body="properties.{key}" type="string" required />
                          </Expandable>
                        </ParamField>

                        <ParamField body="name" type="string">
                          Optional user-defined label to distinguish multiple alerts on the same feature.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="overage_allowed" type="object[]">
                      List of overage allowed controls per feature. When enabled, usage can exceed balance.

                      <Expandable title="properties">
                        <ParamField body="feature_id" type="string" required>
                          The feature ID this overage allowed control applies to.
                        </ParamField>

                        <ParamField body="enabled" type="boolean" required>
                          Whether overage is allowed for this feature.
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="metadata" type="object" required>
                  Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
                </ParamField>

                <ParamField body="customer_eligibility" type="object">
                  <Expandable title="properties">
                    <ParamField body="trial_available" type="boolean">
                      Whether the trial on this plan is available to this customer. For example, if the customer used the trial in the past, this will be false.
                    </ParamField>

                    <ParamField body="status" type="'active' | 'scheduled'">
                      The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
                    </ParamField>

                    <ParamField body="canceling" type="boolean">
                      Whether the customer's active instance of this plan is set to cancel.
                    </ParamField>

                    <ParamField body="trialing" type="boolean">
                      Whether the customer is currently on a free trial of this plan.
                    </ParamField>

                    <ParamField body="attach_action" type="'activate' | 'upgrade' | 'downgrade' | 'none' | 'purchase'" required>
                      The action that would occur if this plan were attached to the customer.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="base_variant_id" type="string | null" required>
                  Deprecated. Use variant\_details.base\_plan\_id instead. If this is a variant, the ID of the base plan it was created from.
                </ParamField>

                <ParamField body="variant_details" type="object">
                  Details about how this variant relates to its latest base plan.

                  <Expandable title="properties">
                    <ParamField body="base_plan_id" type="string" required>
                      The ID of the base plan this variant was derived from.
                    </ParamField>

                    <ParamField body="customize" type="object">
                      The customization that transforms the base plan into this variant.

                      <Expandable title="properties">
                        <ParamField body="price" type="object | null">
                          Base price configuration for a plan.

                          <Expandable title="properties">
                            <ParamField body="amount" type="number" required>
                              Base price amount for the plan, in major currency units (e.g. dollars).
                            </ParamField>

                            <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                              Billing interval (e.g. 'month', 'year').
                            </ParamField>

                            <ParamField body="interval_count" type="number">
                              Number of intervals per billing cycle. Defaults to 1.
                            </ParamField>

                            <ParamField body="additional_currencies" type="object[]">
                              Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                              <Expandable title="properties">
                                <ParamField body="currency" type="string" required>
                                  Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                </ParamField>

                                <ParamField body="amount" type="number" required>
                                  Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="add_items" type="object[]">
                          Items to add to the plan.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required>
                              The ID of the feature to configure.
                            </ParamField>

                            <ParamField body="included" type="number">
                              Number of free units included. Balance resets to this each interval for consumable features.
                            </ParamField>

                            <ParamField body="unlimited" type="boolean">
                              If true, customer has unlimited access to this feature.
                            </ParamField>

                            <ParamField body="pooled" type="boolean">
                              Whether entity-level grants contribute to a shared customer balance.
                            </ParamField>

                            <ParamField body="reset" type="object">
                              Reset configuration for consumable features. Omit for non-consumable features like seats.

                              <Expandable title="properties">
                                <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                                  Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
                                </ParamField>

                                <ParamField body="interval_count" type="number">
                                  Number of intervals between resets. Defaults to 1.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="price" type="object">
                              Pricing for usage beyond included units. Omit for free features.

                              <Expandable title="properties">
                                <ParamField body="amount" type="number">
                                  Price per billing\_units after included usage. Either 'amount' or 'tiers' is required.
                                </ParamField>

                                <ParamField body="additional_currencies" type="object[]">
                                  Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.

                                  <Expandable title="properties">
                                    <ParamField body="currency" type="string" required>
                                      Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                    </ParamField>

                                    <ParamField body="amount" type="number" required>
                                      Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="tiers" type="object[]">
                                  Tiered pricing. Either 'amount' or 'tiers' is required.

                                  <Expandable title="properties">
                                    <ParamField body="to" type="number" required />

                                    <ParamField body="amount" type="number" required />

                                    <ParamField body="flat_amount" type="number" />

                                    <ParamField body="additional_currencies" type="object[]">
                                      <Expandable title="properties">
                                        <ParamField body="currency" type="string" required>
                                          Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                        </ParamField>

                                        <ParamField body="amount" type="number">
                                          Per-unit amount for this tier in this currency.
                                        </ParamField>

                                        <ParamField body="flat_amount" type="number">
                                          Flat amount for this tier in this currency, if the tier uses one.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                                <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                                  Billing interval. For consumable features, should match reset.interval.
                                </ParamField>

                                <ParamField body="interval_count" type="number">
                                  Number of intervals per billing cycle. Defaults to 1.
                                </ParamField>

                                <ParamField body="billing_units" type="number">
                                  Units per price increment. Usage is rounded UP when billed (e.g. billing\_units=100 means 101 rounds to 200).
                                </ParamField>

                                <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                                  'prepaid' for upfront payment (seats), 'usage\_based' for pay-as-you-go.
                                </ParamField>

                                <ParamField body="max_purchase" type="number | null">
                                  Max units purchasable beyond included. E.g. included=100, max\_purchase=300 allows 400 total. Null for no limit.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="proration" type="object">
                              Proration settings for prepaid features. Controls mid-cycle quantity change billing.

                              <Expandable title="properties">
                                <ParamField body="on_increase" type="'bill_immediately' | 'prorate_immediately' | 'prorate_next_cycle' | 'bill_next_cycle'" required>
                                  Billing behavior when quantity increases mid-cycle.
                                </ParamField>

                                <ParamField body="on_decrease" type="'prorate' | 'prorate_immediately' | 'prorate_next_cycle' | 'none' | 'no_prorations'" required>
                                  Credit behavior when quantity decreases mid-cycle.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="rollover" type="object">
                              Rollover config for unused units. If set, unused included units carry over.

                              <Expandable title="properties">
                                <ParamField body="max" type="number">
                                  Max rollover units. Omit for unlimited rollover.
                                </ParamField>

                                <ParamField body="max_percentage" type="number">
                                  Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                                </ParamField>

                                <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                                  When rolled over units expire.
                                </ParamField>

                                <ParamField body="expiry_duration_length" type="number">
                                  Number of periods before expiry.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="feature_override" type="object">
                              Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

                              <Expandable title="properties">
                                <ParamField body="credit_schema" type="object | object[]">
                                  For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                                  <Expandable title="properties">
                                    <ParamField body="metered_feature_id" type="string">
                                      ID of the metered feature that draws from this credit system.
                                    </ParamField>

                                    <ParamField body="billing_units" type="number">
                                      Number of metered-feature units priced together. Defaults to one when omitted.
                                    </ParamField>

                                    <ParamField body="dimensions.{key}" type="object">
                                      Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                                      <Expandable title="properties">
                                        <ParamField body="match.{key}" type="string" required>
                                          Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                        </ParamField>

                                        <ParamField body="priority" type="integer">
                                          Breaks ties between dimensions that match the same number of keys. Higher wins.
                                        </ParamField>

                                        <ParamField body="tier_behavior" type="string" required />

                                        <ParamField body="tiers" type="object[]" required>
                                          <Expandable title="properties">
                                            <ParamField body="to" type="number" required>
                                              Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                            </ParamField>

                                            <ParamField body="credit_cost" type="number" required>
                                              Credits consumed per billing-unit group within this tier.
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="multipliers.{key}" type="object">
                                      Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                                      <Expandable title="properties">
                                        <ParamField body="match.{key}" type="string" required>
                                          Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                        </ParamField>

                                        <ParamField body="factor" type="number">
                                          Multiplies the matched rate. All matching multipliers stack.
                                        </ParamField>

                                        <ParamField body="add" type="number">
                                          Added to the rate after every factor is applied, in credits per billing-unit group.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="tier_behavior" type="string" />

                                    <ParamField body="tiers" type="object[]">
                                      <Expandable title="properties">
                                        <ParamField body="to" type="number" required>
                                          Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                        </ParamField>

                                        <ParamField body="credit_cost" type="number" required>
                                          Credits consumed per billing-unit group within this tier.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="credit_cost" type="number">
                                      Credits consumed per billing-unit group.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="markups" type="object">
                                  For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                                  <Expandable title="properties">
                                    <ParamField body="default_markup" type="number">
                                      Default percentage markup for customers on this plan. Use -100 to make usage free.
                                    </ParamField>

                                    <ParamField body="provider_markups.{key}" type="object | null">
                                      Per-provider markup percentages for customers on this plan.

                                      <Expandable title="properties">
                                        <ParamField body="markup" type="number" required />
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="model_markups.{key}" type="object | null">
                                      Per-model markup overrides for customers on this plan.

                                      <Expandable title="properties">
                                        <ParamField body="markup" type="number" />

                                        <ParamField body="input_cost" type="number" />

                                        <ParamField body="output_cost" type="number" />
                                      </Expandable>
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="remove_items" type="object[]">
                          Filters selecting items to remove from the plan.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string">
                              Match items linked to this feature.
                            </ParamField>

                            <ParamField body="billing_method" type="'prepaid' | 'usage_based'">
                              Match items with this billing method (prepaid or usage\_based).
                            </ParamField>

                            <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'">
                              Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
                            </ParamField>

                            <ParamField body="interval_count" type="integer">
                              Match items with this interval\_count. Disambiguates between items that share an interval but differ in count.
                            </ParamField>

                            <ParamField body="included" type="number">
                              Match items whose grant equals this included usage. Omitted is a wildcard.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="free_trial" type="object | null">
                          Free trial configuration for a plan.

                          <Expandable title="properties">
                            <ParamField body="duration_length" type="number" required>
                              Number of duration\_type periods the trial lasts.
                            </ParamField>

                            <ParamField body="duration_type" type="'day' | 'month' | 'year'" required>
                              Unit of time for the trial ('day', 'month', 'year').
                            </ParamField>

                            <ParamField body="card_required" type="boolean" required>
                              If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
                            </ParamField>

                            <ParamField body="on_end" type="'bill' | 'revert'">
                              Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="billing_controls" type="object">
                          Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.

                          <Expandable title="properties">
                            <ParamField body="auto_topups" type="object[]">
                              List of auto top-up configurations per feature.

                              <Expandable title="properties">
                                <ParamField body="feature_id" type="string" required>
                                  The ID of the feature (credit balance) to auto top-up.
                                </ParamField>

                                <ParamField body="enabled" type="boolean" required>
                                  Whether auto top-up is enabled.
                                </ParamField>

                                <ParamField body="threshold" type="number" required>
                                  When the balance drops below this threshold, an auto top-up will be purchased.
                                </ParamField>

                                <ParamField body="quantity" type="number" required>
                                  Amount of credits to add per auto top-up.
                                </ParamField>

                                <ParamField body="purchase_limit" type="object">
                                  Optional rate limit to cap how often auto top-ups occur. Pass count to set the current window's consumed top-ups.

                                  <Expandable title="properties">
                                    <ParamField body="interval" type="'hour' | 'day' | 'week' | 'month'" required>
                                      The time interval for the purchase limit window.
                                    </ParamField>

                                    <ParamField body="interval_count" type="number" required>
                                      Number of intervals in the purchase limit window.
                                    </ParamField>

                                    <ParamField body="limit" type="number" required>
                                      Maximum number of auto top-ups allowed within the interval.
                                    </ParamField>

                                    <ParamField body="count" type="number">
                                      Set the current window's consumed auto top-up count. Omit to leave runtime state unchanged.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="invoice_mode" type="boolean">
                                  When true, auto top-up creates a send\_invoice invoice instead of auto-charging.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="spend_limits" type="object[]">
                              List of overage spend limits per feature (caps overage spend).

                              <Expandable title="properties">
                                <ParamField body="feature_id" type="string">
                                  Optional feature ID this spend limit applies to.
                                </ParamField>

                                <ParamField body="enabled" type="boolean" required>
                                  Whether the overage spend limit is enabled.
                                </ParamField>

                                <ParamField body="limit_type" type="'absolute' | 'usage_percentage'">
                                  How overage\_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
                                </ParamField>

                                <ParamField body="overage_limit" type="number">
                                  Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit\_type is usage\_percentage.
                                </ParamField>

                                <ParamField body="skip_overage_billing" type="boolean">
                                  When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="usage_limits" type="object[]">
                              List of hard usage caps per feature (max units per interval).

                              <Expandable title="properties">
                                <ParamField body="feature_id" type="string" required>
                                  The feature this usage limit applies to.
                                </ParamField>

                                <ParamField body="enabled" type="boolean" required>
                                  Whether this usage limit is enabled.
                                </ParamField>

                                <ParamField body="limit" type="number" required>
                                  Maximum units allowed per interval.
                                </ParamField>

                                <ParamField body="interval" type="'day' | 'week' | 'month' | 'year'" required>
                                  Interval for the cap, aligned to the customer's billing cycle.
                                </ParamField>

                                <ParamField body="anchor" type="'billing_cycle' | 'utc'">
                                  Window alignment. 'billing\_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
                                </ParamField>

                                <ParamField body="filter" type="object">
                                  When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.

                                  <Expandable title="properties">
                                    <ParamField body="properties.{key}" type="string" required />
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="usage_alerts" type="object[]">
                              List of usage alert configurations per feature.

                              <Expandable title="properties">
                                <ParamField body="feature_id" type="string">
                                  The feature ID this alert applies to.
                                </ParamField>

                                <ParamField body="enabled" type="boolean" required>
                                  Whether this usage alert is enabled.
                                </ParamField>

                                <ParamField body="threshold" type="number" required>
                                  The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage\_percentage or remaining\_percentage, this is a percentage (0-100).
                                </ParamField>

                                <ParamField body="threshold_type" type="'usage' | 'usage_percentage' | 'remaining' | 'remaining_percentage'" required>
                                  Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
                                </ParamField>

                                <ParamField body="basis" type="'balance' | 'included' | 'recurring' | 'usage_limit'" required>
                                  What 100% means. balance: every grant on the feature. included: the plan allowance only. recurring: grants that reset. usage\_limit: the cap of the usage limit with the same feature and filter.
                                </ParamField>

                                <ParamField body="filter" type="object">
                                  Only valid with basis usage\_limit. Points the alert at the usage limit carrying the same filter.

                                  <Expandable title="properties">
                                    <ParamField body="properties.{key}" type="string" required />
                                  </Expandable>
                                </ParamField>

                                <ParamField body="name" type="string">
                                  Optional user-defined label to distinguish multiple alerts on the same feature.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="overage_allowed" type="object[]">
                              List of overage allowed controls per feature. When enabled, usage can exceed balance.

                              <Expandable title="properties">
                                <ParamField body="feature_id" type="string" required>
                                  The feature ID this overage allowed control applies to.
                                </ParamField>

                                <ParamField body="enabled" type="boolean" required>
                                  Whether overage is allowed for this feature.
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="upsert_licenses" type="object[]">
                          License links to add or override for this customer, keyed by license\_plan\_id. Omitted fields inherit the plan catalog link (included defaults to 1 when the license is not in the catalog). A bare entry restores the license to pure catalog inheritance.

                          <Expandable title="properties">
                            <ParamField body="license_plan_id" type="string" required />

                            <ParamField body="version_slug" type="string" />

                            <ParamField body="included" type="integer" />

                            <ParamField body="prepaid_only" type="boolean" />

                            <ParamField body="customize" type="object | null">
                              <Expandable title="properties">
                                <ParamField body="price" type="object | null">
                                  Base price configuration for a plan.

                                  <Expandable title="properties">
                                    <ParamField body="amount" type="number" required>
                                      Base price amount for the plan, in major currency units (e.g. dollars).
                                    </ParamField>

                                    <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                                      Billing interval (e.g. 'month', 'year').
                                    </ParamField>

                                    <ParamField body="interval_count" type="number">
                                      Number of intervals per billing cycle. Defaults to 1.
                                    </ParamField>

                                    <ParamField body="additional_currencies" type="object[]">
                                      Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                                      <Expandable title="properties">
                                        <ParamField body="currency" type="string" required>
                                          Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                        </ParamField>

                                        <ParamField body="amount" type="number" required>
                                          Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="add_items" type="object[]">
                                  <Expandable title="properties">
                                    <ParamField body="feature_id" type="string" required>
                                      The ID of the feature to configure.
                                    </ParamField>

                                    <ParamField body="included" type="number">
                                      Number of free units included. Balance resets to this each interval for consumable features.
                                    </ParamField>

                                    <ParamField body="unlimited" type="boolean">
                                      If true, customer has unlimited access to this feature.
                                    </ParamField>

                                    <ParamField body="pooled" type="boolean">
                                      Whether entity-level grants contribute to a shared customer balance.
                                    </ParamField>

                                    <ParamField body="reset" type="object">
                                      Reset configuration for consumable features. Omit for non-consumable features like seats.

                                      <Expandable title="properties">
                                        <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                                          Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
                                        </ParamField>

                                        <ParamField body="interval_count" type="number">
                                          Number of intervals between resets. Defaults to 1.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="price" type="object">
                                      Pricing for usage beyond included units. Omit for free features.

                                      <Expandable title="properties">
                                        <ParamField body="amount" type="number">
                                          Price per billing\_units after included usage. Either 'amount' or 'tiers' is required.
                                        </ParamField>

                                        <ParamField body="additional_currencies" type="object[]">
                                          Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.

                                          <Expandable title="properties">
                                            <ParamField body="currency" type="string" required>
                                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                            </ParamField>

                                            <ParamField body="amount" type="number" required>
                                              Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="tiers" type="object[]">
                                          Tiered pricing. Either 'amount' or 'tiers' is required.

                                          <Expandable title="properties">
                                            <ParamField body="to" type="number" required />

                                            <ParamField body="amount" type="number" required />

                                            <ParamField body="flat_amount" type="number" />

                                            <ParamField body="additional_currencies" type="object[]">
                                              <Expandable title="properties">
                                                <ParamField body="currency" type="string" required>
                                                  Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                                </ParamField>

                                                <ParamField body="amount" type="number">
                                                  Per-unit amount for this tier in this currency.
                                                </ParamField>

                                                <ParamField body="flat_amount" type="number">
                                                  Flat amount for this tier in this currency, if the tier uses one.
                                                </ParamField>
                                              </Expandable>
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                                        <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                                          Billing interval. For consumable features, should match reset.interval.
                                        </ParamField>

                                        <ParamField body="interval_count" type="number">
                                          Number of intervals per billing cycle. Defaults to 1.
                                        </ParamField>

                                        <ParamField body="billing_units" type="number">
                                          Units per price increment. Usage is rounded UP when billed (e.g. billing\_units=100 means 101 rounds to 200).
                                        </ParamField>

                                        <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                                          'prepaid' for upfront payment (seats), 'usage\_based' for pay-as-you-go.
                                        </ParamField>

                                        <ParamField body="max_purchase" type="number | null">
                                          Max units purchasable beyond included. E.g. included=100, max\_purchase=300 allows 400 total. Null for no limit.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="proration" type="object">
                                      Proration settings for prepaid features. Controls mid-cycle quantity change billing.

                                      <Expandable title="properties">
                                        <ParamField body="on_increase" type="'bill_immediately' | 'prorate_immediately' | 'prorate_next_cycle' | 'bill_next_cycle'" required>
                                          Billing behavior when quantity increases mid-cycle.
                                        </ParamField>

                                        <ParamField body="on_decrease" type="'prorate' | 'prorate_immediately' | 'prorate_next_cycle' | 'none' | 'no_prorations'" required>
                                          Credit behavior when quantity decreases mid-cycle.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="rollover" type="object">
                                      Rollover config for unused units. If set, unused included units carry over.

                                      <Expandable title="properties">
                                        <ParamField body="max" type="number">
                                          Max rollover units. Omit for unlimited rollover.
                                        </ParamField>

                                        <ParamField body="max_percentage" type="number">
                                          Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                                        </ParamField>

                                        <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                                          When rolled over units expire.
                                        </ParamField>

                                        <ParamField body="expiry_duration_length" type="number">
                                          Number of periods before expiry.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="feature_override" type="object">
                                      Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

                                      <Expandable title="properties">
                                        <ParamField body="credit_schema" type="object | object[]">
                                          For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                                          <Expandable title="properties">
                                            <ParamField body="metered_feature_id" type="string">
                                              ID of the metered feature that draws from this credit system.
                                            </ParamField>

                                            <ParamField body="billing_units" type="number">
                                              Number of metered-feature units priced together. Defaults to one when omitted.
                                            </ParamField>

                                            <ParamField body="dimensions.{key}" type="object">
                                              Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                                              <Expandable title="properties">
                                                <ParamField body="match.{key}" type="string" required>
                                                  Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                                </ParamField>

                                                <ParamField body="priority" type="integer">
                                                  Breaks ties between dimensions that match the same number of keys. Higher wins.
                                                </ParamField>

                                                <ParamField body="tier_behavior" type="string" required />

                                                <ParamField body="tiers" type="object[]" required>
                                                  <Expandable title="properties">
                                                    <ParamField body="to" type="number" required>
                                                      Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                                    </ParamField>

                                                    <ParamField body="credit_cost" type="number" required>
                                                      Credits consumed per billing-unit group within this tier.
                                                    </ParamField>
                                                  </Expandable>
                                                </ParamField>
                                              </Expandable>
                                            </ParamField>

                                            <ParamField body="multipliers.{key}" type="object">
                                              Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                                              <Expandable title="properties">
                                                <ParamField body="match.{key}" type="string" required>
                                                  Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                                </ParamField>

                                                <ParamField body="factor" type="number">
                                                  Multiplies the matched rate. All matching multipliers stack.
                                                </ParamField>

                                                <ParamField body="add" type="number">
                                                  Added to the rate after every factor is applied, in credits per billing-unit group.
                                                </ParamField>
                                              </Expandable>
                                            </ParamField>

                                            <ParamField body="tier_behavior" type="string" />

                                            <ParamField body="tiers" type="object[]">
                                              <Expandable title="properties">
                                                <ParamField body="to" type="number" required>
                                                  Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                                </ParamField>

                                                <ParamField body="credit_cost" type="number" required>
                                                  Credits consumed per billing-unit group within this tier.
                                                </ParamField>
                                              </Expandable>
                                            </ParamField>

                                            <ParamField body="credit_cost" type="number">
                                              Credits consumed per billing-unit group.
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="markups" type="object">
                                          For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                                          <Expandable title="properties">
                                            <ParamField body="default_markup" type="number">
                                              Default percentage markup for customers on this plan. Use -100 to make usage free.
                                            </ParamField>

                                            <ParamField body="provider_markups.{key}" type="object | null">
                                              Per-provider markup percentages for customers on this plan.

                                              <Expandable title="properties">
                                                <ParamField body="markup" type="number" required />
                                              </Expandable>
                                            </ParamField>

                                            <ParamField body="model_markups.{key}" type="object | null">
                                              Per-model markup overrides for customers on this plan.

                                              <Expandable title="properties">
                                                <ParamField body="markup" type="number" />

                                                <ParamField body="input_cost" type="number" />

                                                <ParamField body="output_cost" type="number" />
                                              </Expandable>
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="remove_items" type="object[]">
                                  <Expandable title="properties">
                                    <ParamField body="feature_id" type="string">
                                      Match items linked to this feature.
                                    </ParamField>

                                    <ParamField body="billing_method" type="'prepaid' | 'usage_based'">
                                      Match items with this billing method (prepaid or usage\_based).
                                    </ParamField>

                                    <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'">
                                      Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
                                    </ParamField>

                                    <ParamField body="interval_count" type="integer">
                                      Match items with this interval\_count. Disambiguates between items that share an interval but differ in count.
                                    </ParamField>

                                    <ParamField body="included" type="number">
                                      Match items whose grant equals this included usage. Omitted is a wildcard.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="metadata" type="object" />
                          </Expandable>
                        </ParamField>

                        <ParamField body="remove_licenses" type="object[]">
                          License links to drop, keyed by license\_plan\_id. Parallel to remove\_items.

                          <Expandable title="properties">
                            <ParamField body="license_plan_id" type="string" required />
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="action" type="'created' | 'updated' | 'removed'" required>
              created = new planLicense; updated = row or effective content changed; removed = dropped.
            </ParamField>

            <ParamField body="previous_attributes" type="object | null" required>
              Previous included / prepaid\_only / version. Null when created or removed, or when no row scalar changed.

              <Expandable title="properties">
                <ParamField body="version" type="integer">
                  The exact license-plan version pinned by this link.
                </ParamField>

                <ParamField body="version_slug" type="string">
                  Version slug of the license-plan row this link points at.
                </ParamField>

                <ParamField body="included" type="number">
                  Number of license assignments included with this plan for free.
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="plan_change" type="object | null">
              Diff of the license's effective plan. Null when created, removed, or the effective content is unchanged.

              <Expandable title="properties">
                <ParamField body="plan" type="object">
                  The plan after the change. Omitted unless the caller expands it.

                  <Expandable title="properties">
                    <ParamField body="id" type="string" required>
                      Unique identifier for the plan.
                    </ParamField>

                    <ParamField body="name" type="string" required>
                      Display name of the plan.
                    </ParamField>

                    <ParamField body="description" type="string | null" required>
                      Optional description of the plan.
                    </ParamField>

                    <ParamField body="group" type="string | null" required>
                      Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
                    </ParamField>

                    <ParamField body="version" type="number" required>
                      Version number of the plan. Incremented when plan configuration changes.
                    </ParamField>

                    <ParamField body="version_slug" type="string | null">
                      User-facing version identity. Defaults to v\{n} when the version is minted.
                    </ParamField>

                    <ParamField body="active" type="boolean">
                      Whether this is the active version of the plan. At most one version is active.
                    </ParamField>

                    <ParamField body="add_on" type="boolean" required>
                      Whether this is an add-on plan that can be attached alongside a main plan.
                    </ParamField>

                    <ParamField body="auto_enable" type="boolean" required>
                      If true, this plan is automatically attached when a customer is created. Used for free plans.
                    </ParamField>

                    <ParamField body="price" type="object | null" required>
                      Base recurring price for the plan. Null for free plans or usage-only plans.

                      <Expandable title="properties">
                        <ParamField body="amount" type="number" required>
                          Base price amount for the plan, in major currency units (e.g. dollars).
                        </ParamField>

                        <ParamField body="additional_currencies" type="object[]">
                          Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                          <Expandable title="properties">
                            <ParamField body="currency" type="string" required>
                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                            </ParamField>

                            <ParamField body="amount" type="number" required>
                              Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                          Billing interval (e.g. 'month', 'year').
                        </ParamField>

                        <ParamField body="interval_count" type="number">
                          Number of intervals per billing cycle. Defaults to 1.
                        </ParamField>

                        <ParamField body="display" type="object">
                          Display text for showing this price in pricing pages.

                          <Expandable title="properties">
                            <ParamField body="primary_text" type="string" required>
                              Main display text (e.g. '\$10' or '100 messages').
                            </ParamField>

                            <ParamField body="secondary_text" type="string">
                              Secondary display text (e.g. 'per month' or 'then \$0.5 per 100').
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="processors" type="object">
                          Payment processors this base price is connected to. Omitted when unset.

                          <Expandable title="properties">
                            <ParamField body="stripe" type="object | null">
                              <Expandable title="properties">
                                <ParamField body="price_id" type="string" required>
                                  Stripe price ID. For prepaid with included > 0 this is the V2 price.
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="items" type="object[]" required>
                      Feature configurations included in this plan. Each item defines included units, pricing, and reset behavior for a feature.

                      <Expandable title="properties">
                        <ParamField body="feature_id" type="string" required>
                          The ID of the feature this item configures.
                        </ParamField>

                        <ParamField body="feature" type="object">
                          The full feature object if expanded.

                          <Expandable title="properties">
                            <ParamField body="id" type="string" required>
                              The ID of the feature, used to refer to it in other API calls like /track or /check.
                            </ParamField>

                            <ParamField body="name" type="string | null">
                              The name of the feature.
                            </ParamField>

                            <ParamField body="type" type="'static' | 'boolean' | 'single_use' | 'continuous_use' | 'credit_system' | 'ai_credit_system'" required>
                              The type of the feature
                            </ParamField>

                            <ParamField body="display" type="object | null">
                              Singular and plural display names for the feature.

                              <Expandable title="properties">
                                <ParamField body="singular" type="string" required>
                                  The singular display name for the feature.
                                </ParamField>

                                <ParamField body="plural" type="string" required>
                                  The plural display name for the feature.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="credit_schema" type="object[] | null">
                              Credit cost schema for credit system features.

                              <Expandable title="properties">
                                <ParamField body="metered_feature_id" type="string" required>
                                  The ID of the metered feature (should be a single\_use feature).
                                </ParamField>

                                <ParamField body="credit_cost" type="number" required>
                                  The credit cost of the metered feature.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="archived" type="boolean | null">
                              Whether or not the feature is archived.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="included" type="number" required>
                          Number of free units included. For consumable features, balance resets to this number each interval.
                        </ParamField>

                        <ParamField body="unlimited" type="boolean" required>
                          Whether the customer has unlimited access to this feature.
                        </ParamField>

                        <ParamField body="pooled" type="boolean">
                          Whether entity-level grants contribute to a shared customer balance.
                        </ParamField>

                        <ParamField body="reset" type="object | null" required>
                          Reset configuration for consumable features. Null for non-consumable features like seats where usage persists across billing cycles.

                          <Expandable title="properties">
                            <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                              The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
                            </ParamField>

                            <ParamField body="interval_count" type="number">
                              Number of intervals between resets. Defaults to 1.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="price" type="object | null" required>
                          Pricing configuration for usage beyond included units. Null if feature is entirely free.

                          <Expandable title="properties">
                            <ParamField body="amount" type="number">
                              Price per billing\_units after included usage is consumed. Mutually exclusive with tiers.
                            </ParamField>

                            <ParamField body="additional_currencies" type="object[]">
                              Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers' (tiered prices carry per-currency amounts on each tier).

                              <Expandable title="properties">
                                <ParamField body="currency" type="string" required>
                                  Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                </ParamField>

                                <ParamField body="amount" type="number" required>
                                  Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="tiers" type="object[]">
                              Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.

                              <Expandable title="properties">
                                <ParamField body="to" type="number" required />

                                <ParamField body="amount" type="number" required />

                                <ParamField body="flat_amount" type="number" />

                                <ParamField body="additional_currencies" type="object[]">
                                  <Expandable title="properties">
                                    <ParamField body="currency" type="string" required>
                                      Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                    </ParamField>

                                    <ParamField body="amount" type="number">
                                      Per-unit amount for this tier in this currency.
                                    </ParamField>

                                    <ParamField body="flat_amount" type="number">
                                      Flat amount for this tier in this currency, if the tier uses one.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                            <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                              Billing interval for this price. For consumable features, should match reset.interval.
                            </ParamField>

                            <ParamField body="interval_count" type="number">
                              Number of intervals per billing cycle. Defaults to 1.
                            </ParamField>

                            <ParamField body="billing_units" type="number" required>
                              Number of units per price increment. Usage is rounded UP to the nearest billing\_units when billed (e.g. billing\_units=100 means 101 usage rounds to 200).
                            </ParamField>

                            <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                              'prepaid' for features like seats where customers pay upfront, 'usage\_based' for pay-as-you-go after included usage.
                            </ParamField>

                            <ParamField body="max_purchase" type="number | null" required>
                              Maximum units a customer can purchase beyond included. E.g. if included=100 and max\_purchase=300, customer can use up to 400 total before usage is capped. Null for no limit.
                            </ParamField>

                            <ParamField body="processors" type="object">
                              Payment processors this item price is connected to. Omitted when unset.

                              <Expandable title="properties">
                                <ParamField body="stripe" type="object | null">
                                  <Expandable title="properties">
                                    <ParamField body="price_id" type="string" required>
                                      Stripe price ID. For prepaid with included > 0 this is the V2 price.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="display" type="object">
                          Display text for showing this item in pricing pages.

                          <Expandable title="properties">
                            <ParamField body="primary_text" type="string" required>
                              Main display text (e.g. '\$10' or '100 messages').
                            </ParamField>

                            <ParamField body="secondary_text" type="string">
                              Secondary display text (e.g. 'per month' or 'then \$0.5 per 100').
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="rollover" type="object">
                          Rollover configuration for unused units. If set, unused included units roll over to the next period.

                          <Expandable title="properties">
                            <ParamField body="max" type="number | null" required>
                              Maximum rollover units. Null for unlimited rollover.
                            </ParamField>

                            <ParamField body="max_percentage" type="number | null">
                              Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                            </ParamField>

                            <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                              When rolled over units expire.
                            </ParamField>

                            <ParamField body="expiry_duration_length" type="number">
                              Number of periods before expiry.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="feature_override" type="object">
                          Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

                          <Expandable title="properties">
                            <ParamField body="credit_schema" type="object | object[]">
                              For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                              <Expandable title="properties">
                                <ParamField body="metered_feature_id" type="string">
                                  ID of the metered feature that draws from this credit system.
                                </ParamField>

                                <ParamField body="billing_units" type="number">
                                  Number of metered-feature units priced together. Defaults to one when omitted.
                                </ParamField>

                                <ParamField body="dimensions.{key}" type="object">
                                  Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                                  <Expandable title="properties">
                                    <ParamField body="match.{key}" type="string" required>
                                      Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                    </ParamField>

                                    <ParamField body="priority" type="integer">
                                      Breaks ties between dimensions that match the same number of keys. Higher wins.
                                    </ParamField>

                                    <ParamField body="tier_behavior" type="string" required />

                                    <ParamField body="tiers" type="object[]" required>
                                      <Expandable title="properties">
                                        <ParamField body="to" type="number" required>
                                          Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                        </ParamField>

                                        <ParamField body="credit_cost" type="number" required>
                                          Credits consumed per billing-unit group within this tier.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="multipliers.{key}" type="object">
                                  Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                                  <Expandable title="properties">
                                    <ParamField body="match.{key}" type="string" required>
                                      Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                    </ParamField>

                                    <ParamField body="factor" type="number">
                                      Multiplies the matched rate. All matching multipliers stack.
                                    </ParamField>

                                    <ParamField body="add" type="number">
                                      Added to the rate after every factor is applied, in credits per billing-unit group.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="tier_behavior" type="string" />

                                <ParamField body="tiers" type="object[]">
                                  <Expandable title="properties">
                                    <ParamField body="to" type="number" required>
                                      Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                    </ParamField>

                                    <ParamField body="credit_cost" type="number" required>
                                      Credits consumed per billing-unit group within this tier.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="credit_cost" type="number">
                                  Credits consumed per billing-unit group.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="markups" type="object">
                              For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                              <Expandable title="properties">
                                <ParamField body="default_markup" type="number">
                                  Default percentage markup for customers on this plan. Use -100 to make usage free.
                                </ParamField>

                                <ParamField body="provider_markups.{key}" type="object | null">
                                  Per-provider markup percentages for customers on this plan.

                                  <Expandable title="properties">
                                    <ParamField body="markup" type="number" required />
                                  </Expandable>
                                </ParamField>

                                <ParamField body="model_markups.{key}" type="object | null">
                                  Per-model markup overrides for customers on this plan.

                                  <Expandable title="properties">
                                    <ParamField body="markup" type="number" />

                                    <ParamField body="input_cost" type="number" />

                                    <ParamField body="output_cost" type="number" />
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="processors" type="object">
                      Payment processors this plan is connected to. Omitted when unset.

                      <Expandable title="properties">
                        <ParamField body="stripe" type="object | null">
                          <Expandable title="properties">
                            <ParamField body="product_id" type="string" required>
                              Stripe product ID this plan is billed under.
                            </ParamField>

                            <ParamField body="additional_product_ids" type="string[]">
                              Extra Stripe product IDs aliased to this plan.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="revenuecat" type="object | null">
                          <Expandable title="properties">
                            <ParamField body="products" type="object[]" required>
                              Every RevenueCat product that maps to this plan. Replaces the current set.

                              <Expandable title="properties">
                                <ParamField body="product_id" type="string" required>
                                  RevenueCat product ID that grants this plan when purchased.
                                </ParamField>

                                <ParamField body="feature_quantities" type="object[]">
                                  Prepaid quantities granted when this specific RevenueCat product is purchased, in feature units.

                                  <Expandable title="properties">
                                    <ParamField body="feature_id" type="string" required />

                                    <ParamField body="quantity" type="number" />
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="free_trial" type="object">
                      Free trial configuration. If set, new customers can try this plan before being charged.

                      <Expandable title="properties">
                        <ParamField body="duration_length" type="number" required>
                          Number of duration\_type periods the trial lasts.
                        </ParamField>

                        <ParamField body="duration_type" type="'day' | 'month' | 'year'" required>
                          Unit of time for the trial duration ('day', 'month', 'year').
                        </ParamField>

                        <ParamField body="card_required" type="boolean" required>
                          Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
                        </ParamField>

                        <ParamField body="on_end" type="'bill' | 'revert'">
                          Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="created_at" type="number" required>
                      Unix timestamp (ms) when the plan was created.
                    </ParamField>

                    <ParamField body="env" type="'sandbox' | 'live'" required>
                      Environment this plan belongs to ('sandbox' or 'live').
                    </ParamField>

                    <ParamField body="archived" type="boolean" required>
                      Whether the plan is archived. Archived plans cannot be attached to new customers.
                    </ParamField>

                    <ParamField body="config" type="object" required>
                      Miscellaneous plan-level configuration flags.

                      <Expandable title="properties">
                        <ParamField body="ignore_past_due" type="boolean" required>
                          If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past\_due state.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="billing_controls" type="object">
                      Plan-level billing controls used as customer defaults.

                      <Expandable title="properties">
                        <ParamField body="auto_topups" type="object[]">
                          List of auto top-up configurations per feature.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required>
                              The ID of the feature (credit balance) to auto top-up.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether auto top-up is enabled.
                            </ParamField>

                            <ParamField body="threshold" type="number" required>
                              When the balance drops below this threshold, an auto top-up will be purchased.
                            </ParamField>

                            <ParamField body="quantity" type="number" required>
                              Amount of credits to add per auto top-up.
                            </ParamField>

                            <ParamField body="purchase_limit" type="object">
                              Optional rate limit to cap how often auto top-ups occur.

                              <Expandable title="properties">
                                <ParamField body="interval" type="'hour' | 'day' | 'week' | 'month'" required>
                                  The time interval for the purchase limit window.
                                </ParamField>

                                <ParamField body="interval_count" type="number" required>
                                  Number of intervals in the purchase limit window.
                                </ParamField>

                                <ParamField body="limit" type="number" required>
                                  Maximum number of auto top-ups allowed within the interval.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="invoice_mode" type="boolean">
                              When true, auto top-up creates a send\_invoice invoice instead of auto-charging.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="spend_limits" type="object[]">
                          List of overage spend limits per feature (caps overage spend).

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string">
                              Optional feature ID this spend limit applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether the overage spend limit is enabled.
                            </ParamField>

                            <ParamField body="limit_type" type="'absolute' | 'usage_percentage'">
                              How overage\_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
                            </ParamField>

                            <ParamField body="overage_limit" type="number">
                              Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit\_type is usage\_percentage.
                            </ParamField>

                            <ParamField body="skip_overage_billing" type="boolean">
                              When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="usage_limits" type="object[]">
                          List of hard usage caps per feature (max units per interval).

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required>
                              The feature this usage limit applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether this usage limit is enabled.
                            </ParamField>

                            <ParamField body="limit" type="number" required>
                              Maximum units allowed per interval.
                            </ParamField>

                            <ParamField body="interval" type="'day' | 'week' | 'month' | 'year'" required>
                              Interval for the cap, aligned to the customer's billing cycle.
                            </ParamField>

                            <ParamField body="anchor" type="'billing_cycle' | 'utc'">
                              Window alignment. 'billing\_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
                            </ParamField>

                            <ParamField body="filter" type="object">
                              When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.

                              <Expandable title="properties">
                                <ParamField body="properties.{key}" type="string" required />
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="usage_alerts" type="object[]">
                          List of usage alert configurations per feature.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string">
                              The feature ID this alert applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether this usage alert is enabled.
                            </ParamField>

                            <ParamField body="threshold" type="number" required>
                              The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage\_percentage or remaining\_percentage, this is a percentage (0-100).
                            </ParamField>

                            <ParamField body="threshold_type" type="'usage' | 'usage_percentage' | 'remaining' | 'remaining_percentage'" required>
                              Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
                            </ParamField>

                            <ParamField body="basis" type="'balance' | 'included' | 'recurring' | 'usage_limit'" required>
                              What 100% means. balance: every grant on the feature. included: the plan allowance only. recurring: grants that reset. usage\_limit: the cap of the usage limit with the same feature and filter.
                            </ParamField>

                            <ParamField body="filter" type="object">
                              Only valid with basis usage\_limit. Points the alert at the usage limit carrying the same filter.

                              <Expandable title="properties">
                                <ParamField body="properties.{key}" type="string" required />
                              </Expandable>
                            </ParamField>

                            <ParamField body="name" type="string">
                              Optional user-defined label to distinguish multiple alerts on the same feature.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="overage_allowed" type="object[]">
                          List of overage allowed controls per feature. When enabled, usage can exceed balance.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required>
                              The feature ID this overage allowed control applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether overage is allowed for this feature.
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="metadata" type="object" required>
                      Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
                    </ParamField>

                    <ParamField body="customer_eligibility" type="object">
                      <Expandable title="properties">
                        <ParamField body="trial_available" type="boolean">
                          Whether the trial on this plan is available to this customer. For example, if the customer used the trial in the past, this will be false.
                        </ParamField>

                        <ParamField body="status" type="'active' | 'scheduled'">
                          The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
                        </ParamField>

                        <ParamField body="canceling" type="boolean">
                          Whether the customer's active instance of this plan is set to cancel.
                        </ParamField>

                        <ParamField body="trialing" type="boolean">
                          Whether the customer is currently on a free trial of this plan.
                        </ParamField>

                        <ParamField body="attach_action" type="'activate' | 'upgrade' | 'downgrade' | 'none' | 'purchase'" required>
                          The action that would occur if this plan were attached to the customer.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="base_variant_id" type="string | null" required>
                      Deprecated. Use variant\_details.base\_plan\_id instead. If this is a variant, the ID of the base plan it was created from.
                    </ParamField>

                    <ParamField body="variant_details" type="object">
                      Details about how this variant relates to its latest base plan.

                      <Expandable title="properties">
                        <ParamField body="base_plan_id" type="string" required>
                          The ID of the base plan this variant was derived from.
                        </ParamField>

                        <ParamField body="customize" type="object">
                          The customization that transforms the base plan into this variant.

                          <Expandable title="properties">
                            <ParamField body="price" type="object | null">
                              Base price configuration for a plan.

                              <Expandable title="properties">
                                <ParamField body="amount" type="number" required>
                                  Base price amount for the plan, in major currency units (e.g. dollars).
                                </ParamField>

                                <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                                  Billing interval (e.g. 'month', 'year').
                                </ParamField>

                                <ParamField body="interval_count" type="number">
                                  Number of intervals per billing cycle. Defaults to 1.
                                </ParamField>

                                <ParamField body="additional_currencies" type="object[]">
                                  Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                                  <Expandable title="properties">
                                    <ParamField body="currency" type="string" required>
                                      Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                    </ParamField>

                                    <ParamField body="amount" type="number" required>
                                      Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="add_items" type="object[]">
                              Items to add to the plan.

                              <Expandable title="properties">
                                <ParamField body="feature_id" type="string" required>
                                  The ID of the feature to configure.
                                </ParamField>

                                <ParamField body="included" type="number">
                                  Number of free units included. Balance resets to this each interval for consumable features.
                                </ParamField>

                                <ParamField body="unlimited" type="boolean">
                                  If true, customer has unlimited access to this feature.
                                </ParamField>

                                <ParamField body="pooled" type="boolean">
                                  Whether entity-level grants contribute to a shared customer balance.
                                </ParamField>

                                <ParamField body="reset" type="object">
                                  Reset configuration for consumable features. Omit for non-consumable features like seats.

                                  <Expandable title="properties">
                                    <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                                      Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
                                    </ParamField>

                                    <ParamField body="interval_count" type="number">
                                      Number of intervals between resets. Defaults to 1.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="price" type="object">
                                  Pricing for usage beyond included units. Omit for free features.

                                  <Expandable title="properties">
                                    <ParamField body="amount" type="number">
                                      Price per billing\_units after included usage. Either 'amount' or 'tiers' is required.
                                    </ParamField>

                                    <ParamField body="additional_currencies" type="object[]">
                                      Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.

                                      <Expandable title="properties">
                                        <ParamField body="currency" type="string" required>
                                          Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                        </ParamField>

                                        <ParamField body="amount" type="number" required>
                                          Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="tiers" type="object[]">
                                      Tiered pricing. Either 'amount' or 'tiers' is required.

                                      <Expandable title="properties">
                                        <ParamField body="to" type="number" required />

                                        <ParamField body="amount" type="number" required />

                                        <ParamField body="flat_amount" type="number" />

                                        <ParamField body="additional_currencies" type="object[]">
                                          <Expandable title="properties">
                                            <ParamField body="currency" type="string" required>
                                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                            </ParamField>

                                            <ParamField body="amount" type="number">
                                              Per-unit amount for this tier in this currency.
                                            </ParamField>

                                            <ParamField body="flat_amount" type="number">
                                              Flat amount for this tier in this currency, if the tier uses one.
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                                    <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                                      Billing interval. For consumable features, should match reset.interval.
                                    </ParamField>

                                    <ParamField body="interval_count" type="number">
                                      Number of intervals per billing cycle. Defaults to 1.
                                    </ParamField>

                                    <ParamField body="billing_units" type="number">
                                      Units per price increment. Usage is rounded UP when billed (e.g. billing\_units=100 means 101 rounds to 200).
                                    </ParamField>

                                    <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                                      'prepaid' for upfront payment (seats), 'usage\_based' for pay-as-you-go.
                                    </ParamField>

                                    <ParamField body="max_purchase" type="number | null">
                                      Max units purchasable beyond included. E.g. included=100, max\_purchase=300 allows 400 total. Null for no limit.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="proration" type="object">
                                  Proration settings for prepaid features. Controls mid-cycle quantity change billing.

                                  <Expandable title="properties">
                                    <ParamField body="on_increase" type="'bill_immediately' | 'prorate_immediately' | 'prorate_next_cycle' | 'bill_next_cycle'" required>
                                      Billing behavior when quantity increases mid-cycle.
                                    </ParamField>

                                    <ParamField body="on_decrease" type="'prorate' | 'prorate_immediately' | 'prorate_next_cycle' | 'none' | 'no_prorations'" required>
                                      Credit behavior when quantity decreases mid-cycle.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="rollover" type="object">
                                  Rollover config for unused units. If set, unused included units carry over.

                                  <Expandable title="properties">
                                    <ParamField body="max" type="number">
                                      Max rollover units. Omit for unlimited rollover.
                                    </ParamField>

                                    <ParamField body="max_percentage" type="number">
                                      Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                                    </ParamField>

                                    <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                                      When rolled over units expire.
                                    </ParamField>

                                    <ParamField body="expiry_duration_length" type="number">
                                      Number of periods before expiry.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="feature_override" type="object">
                                  Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

                                  <Expandable title="properties">
                                    <ParamField body="credit_schema" type="object | object[]">
                                      For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                                      <Expandable title="properties">
                                        <ParamField body="metered_feature_id" type="string">
                                          ID of the metered feature that draws from this credit system.
                                        </ParamField>

                                        <ParamField body="billing_units" type="number">
                                          Number of metered-feature units priced together. Defaults to one when omitted.
                                        </ParamField>

                                        <ParamField body="dimensions.{key}" type="object">
                                          Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                                          <Expandable title="properties">
                                            <ParamField body="match.{key}" type="string" required>
                                              Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                            </ParamField>

                                            <ParamField body="priority" type="integer">
                                              Breaks ties between dimensions that match the same number of keys. Higher wins.
                                            </ParamField>

                                            <ParamField body="tier_behavior" type="string" required />

                                            <ParamField body="tiers" type="object[]" required>
                                              <Expandable title="properties">
                                                <ParamField body="to" type="number" required>
                                                  Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                                </ParamField>

                                                <ParamField body="credit_cost" type="number" required>
                                                  Credits consumed per billing-unit group within this tier.
                                                </ParamField>
                                              </Expandable>
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="multipliers.{key}" type="object">
                                          Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                                          <Expandable title="properties">
                                            <ParamField body="match.{key}" type="string" required>
                                              Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                            </ParamField>

                                            <ParamField body="factor" type="number">
                                              Multiplies the matched rate. All matching multipliers stack.
                                            </ParamField>

                                            <ParamField body="add" type="number">
                                              Added to the rate after every factor is applied, in credits per billing-unit group.
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="tier_behavior" type="string" />

                                        <ParamField body="tiers" type="object[]">
                                          <Expandable title="properties">
                                            <ParamField body="to" type="number" required>
                                              Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                            </ParamField>

                                            <ParamField body="credit_cost" type="number" required>
                                              Credits consumed per billing-unit group within this tier.
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="credit_cost" type="number">
                                          Credits consumed per billing-unit group.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="markups" type="object">
                                      For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                                      <Expandable title="properties">
                                        <ParamField body="default_markup" type="number">
                                          Default percentage markup for customers on this plan. Use -100 to make usage free.
                                        </ParamField>

                                        <ParamField body="provider_markups.{key}" type="object | null">
                                          Per-provider markup percentages for customers on this plan.

                                          <Expandable title="properties">
                                            <ParamField body="markup" type="number" required />
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="model_markups.{key}" type="object | null">
                                          Per-model markup overrides for customers on this plan.

                                          <Expandable title="properties">
                                            <ParamField body="markup" type="number" />

                                            <ParamField body="input_cost" type="number" />

                                            <ParamField body="output_cost" type="number" />
                                          </Expandable>
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="remove_items" type="object[]">
                              Filters selecting items to remove from the plan.

                              <Expandable title="properties">
                                <ParamField body="feature_id" type="string">
                                  Match items linked to this feature.
                                </ParamField>

                                <ParamField body="billing_method" type="'prepaid' | 'usage_based'">
                                  Match items with this billing method (prepaid or usage\_based).
                                </ParamField>

                                <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'">
                                  Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
                                </ParamField>

                                <ParamField body="interval_count" type="integer">
                                  Match items with this interval\_count. Disambiguates between items that share an interval but differ in count.
                                </ParamField>

                                <ParamField body="included" type="number">
                                  Match items whose grant equals this included usage. Omitted is a wildcard.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="free_trial" type="object | null">
                              Free trial configuration for a plan.

                              <Expandable title="properties">
                                <ParamField body="duration_length" type="number" required>
                                  Number of duration\_type periods the trial lasts.
                                </ParamField>

                                <ParamField body="duration_type" type="'day' | 'month' | 'year'" required>
                                  Unit of time for the trial ('day', 'month', 'year').
                                </ParamField>

                                <ParamField body="card_required" type="boolean" required>
                                  If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
                                </ParamField>

                                <ParamField body="on_end" type="'bill' | 'revert'">
                                  Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="billing_controls" type="object">
                              Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.

                              <Expandable title="properties">
                                <ParamField body="auto_topups" type="object[]">
                                  List of auto top-up configurations per feature.

                                  <Expandable title="properties">
                                    <ParamField body="feature_id" type="string" required>
                                      The ID of the feature (credit balance) to auto top-up.
                                    </ParamField>

                                    <ParamField body="enabled" type="boolean" required>
                                      Whether auto top-up is enabled.
                                    </ParamField>

                                    <ParamField body="threshold" type="number" required>
                                      When the balance drops below this threshold, an auto top-up will be purchased.
                                    </ParamField>

                                    <ParamField body="quantity" type="number" required>
                                      Amount of credits to add per auto top-up.
                                    </ParamField>

                                    <ParamField body="purchase_limit" type="object">
                                      Optional rate limit to cap how often auto top-ups occur. Pass count to set the current window's consumed top-ups.

                                      <Expandable title="properties">
                                        <ParamField body="interval" type="'hour' | 'day' | 'week' | 'month'" required>
                                          The time interval for the purchase limit window.
                                        </ParamField>

                                        <ParamField body="interval_count" type="number" required>
                                          Number of intervals in the purchase limit window.
                                        </ParamField>

                                        <ParamField body="limit" type="number" required>
                                          Maximum number of auto top-ups allowed within the interval.
                                        </ParamField>

                                        <ParamField body="count" type="number">
                                          Set the current window's consumed auto top-up count. Omit to leave runtime state unchanged.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="invoice_mode" type="boolean">
                                      When true, auto top-up creates a send\_invoice invoice instead of auto-charging.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="spend_limits" type="object[]">
                                  List of overage spend limits per feature (caps overage spend).

                                  <Expandable title="properties">
                                    <ParamField body="feature_id" type="string">
                                      Optional feature ID this spend limit applies to.
                                    </ParamField>

                                    <ParamField body="enabled" type="boolean" required>
                                      Whether the overage spend limit is enabled.
                                    </ParamField>

                                    <ParamField body="limit_type" type="'absolute' | 'usage_percentage'">
                                      How overage\_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
                                    </ParamField>

                                    <ParamField body="overage_limit" type="number">
                                      Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit\_type is usage\_percentage.
                                    </ParamField>

                                    <ParamField body="skip_overage_billing" type="boolean">
                                      When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="usage_limits" type="object[]">
                                  List of hard usage caps per feature (max units per interval).

                                  <Expandable title="properties">
                                    <ParamField body="feature_id" type="string" required>
                                      The feature this usage limit applies to.
                                    </ParamField>

                                    <ParamField body="enabled" type="boolean" required>
                                      Whether this usage limit is enabled.
                                    </ParamField>

                                    <ParamField body="limit" type="number" required>
                                      Maximum units allowed per interval.
                                    </ParamField>

                                    <ParamField body="interval" type="'day' | 'week' | 'month' | 'year'" required>
                                      Interval for the cap, aligned to the customer's billing cycle.
                                    </ParamField>

                                    <ParamField body="anchor" type="'billing_cycle' | 'utc'">
                                      Window alignment. 'billing\_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
                                    </ParamField>

                                    <ParamField body="filter" type="object">
                                      When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.

                                      <Expandable title="properties">
                                        <ParamField body="properties.{key}" type="string" required />
                                      </Expandable>
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="usage_alerts" type="object[]">
                                  List of usage alert configurations per feature.

                                  <Expandable title="properties">
                                    <ParamField body="feature_id" type="string">
                                      The feature ID this alert applies to.
                                    </ParamField>

                                    <ParamField body="enabled" type="boolean" required>
                                      Whether this usage alert is enabled.
                                    </ParamField>

                                    <ParamField body="threshold" type="number" required>
                                      The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage\_percentage or remaining\_percentage, this is a percentage (0-100).
                                    </ParamField>

                                    <ParamField body="threshold_type" type="'usage' | 'usage_percentage' | 'remaining' | 'remaining_percentage'" required>
                                      Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
                                    </ParamField>

                                    <ParamField body="basis" type="'balance' | 'included' | 'recurring' | 'usage_limit'" required>
                                      What 100% means. balance: every grant on the feature. included: the plan allowance only. recurring: grants that reset. usage\_limit: the cap of the usage limit with the same feature and filter.
                                    </ParamField>

                                    <ParamField body="filter" type="object">
                                      Only valid with basis usage\_limit. Points the alert at the usage limit carrying the same filter.

                                      <Expandable title="properties">
                                        <ParamField body="properties.{key}" type="string" required />
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="name" type="string">
                                      Optional user-defined label to distinguish multiple alerts on the same feature.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="overage_allowed" type="object[]">
                                  List of overage allowed controls per feature. When enabled, usage can exceed balance.

                                  <Expandable title="properties">
                                    <ParamField body="feature_id" type="string" required>
                                      The feature ID this overage allowed control applies to.
                                    </ParamField>

                                    <ParamField body="enabled" type="boolean" required>
                                      Whether overage is allowed for this feature.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="upsert_licenses" type="object[]">
                              License links to add or override for this customer, keyed by license\_plan\_id. Omitted fields inherit the plan catalog link (included defaults to 1 when the license is not in the catalog). A bare entry restores the license to pure catalog inheritance.

                              <Expandable title="properties">
                                <ParamField body="license_plan_id" type="string" required />

                                <ParamField body="version_slug" type="string" />

                                <ParamField body="included" type="integer" />

                                <ParamField body="prepaid_only" type="boolean" />

                                <ParamField body="customize" type="object | null">
                                  <Expandable title="properties">
                                    <ParamField body="price" type="object | null">
                                      Base price configuration for a plan.

                                      <Expandable title="properties">
                                        <ParamField body="amount" type="number" required>
                                          Base price amount for the plan, in major currency units (e.g. dollars).
                                        </ParamField>

                                        <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                                          Billing interval (e.g. 'month', 'year').
                                        </ParamField>

                                        <ParamField body="interval_count" type="number">
                                          Number of intervals per billing cycle. Defaults to 1.
                                        </ParamField>

                                        <ParamField body="additional_currencies" type="object[]">
                                          Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                                          <Expandable title="properties">
                                            <ParamField body="currency" type="string" required>
                                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                            </ParamField>

                                            <ParamField body="amount" type="number" required>
                                              Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="add_items" type="object[]">
                                      <Expandable title="properties">
                                        <ParamField body="feature_id" type="string" required>
                                          The ID of the feature to configure.
                                        </ParamField>

                                        <ParamField body="included" type="number">
                                          Number of free units included. Balance resets to this each interval for consumable features.
                                        </ParamField>

                                        <ParamField body="unlimited" type="boolean">
                                          If true, customer has unlimited access to this feature.
                                        </ParamField>

                                        <ParamField body="pooled" type="boolean">
                                          Whether entity-level grants contribute to a shared customer balance.
                                        </ParamField>

                                        <ParamField body="reset" type="object">
                                          Reset configuration for consumable features. Omit for non-consumable features like seats.

                                          <Expandable title="properties">
                                            <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                                              Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
                                            </ParamField>

                                            <ParamField body="interval_count" type="number">
                                              Number of intervals between resets. Defaults to 1.
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="price" type="object">
                                          Pricing for usage beyond included units. Omit for free features.

                                          <Expandable title="properties">
                                            <ParamField body="amount" type="number">
                                              Price per billing\_units after included usage. Either 'amount' or 'tiers' is required.
                                            </ParamField>

                                            <ParamField body="additional_currencies" type="object[]">
                                              Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.

                                              <Expandable title="properties">
                                                <ParamField body="currency" type="string" required>
                                                  Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                                </ParamField>

                                                <ParamField body="amount" type="number" required>
                                                  Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                                </ParamField>
                                              </Expandable>
                                            </ParamField>

                                            <ParamField body="tiers" type="object[]">
                                              Tiered pricing. Either 'amount' or 'tiers' is required.

                                              <Expandable title="properties">
                                                <ParamField body="to" type="number" required />

                                                <ParamField body="amount" type="number" required />

                                                <ParamField body="flat_amount" type="number" />

                                                <ParamField body="additional_currencies" type="object[]">
                                                  <Expandable title="properties">
                                                    <ParamField body="currency" type="string" required>
                                                      Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                                    </ParamField>

                                                    <ParamField body="amount" type="number">
                                                      Per-unit amount for this tier in this currency.
                                                    </ParamField>

                                                    <ParamField body="flat_amount" type="number">
                                                      Flat amount for this tier in this currency, if the tier uses one.
                                                    </ParamField>
                                                  </Expandable>
                                                </ParamField>
                                              </Expandable>
                                            </ParamField>

                                            <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                                            <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                                              Billing interval. For consumable features, should match reset.interval.
                                            </ParamField>

                                            <ParamField body="interval_count" type="number">
                                              Number of intervals per billing cycle. Defaults to 1.
                                            </ParamField>

                                            <ParamField body="billing_units" type="number">
                                              Units per price increment. Usage is rounded UP when billed (e.g. billing\_units=100 means 101 rounds to 200).
                                            </ParamField>

                                            <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                                              'prepaid' for upfront payment (seats), 'usage\_based' for pay-as-you-go.
                                            </ParamField>

                                            <ParamField body="max_purchase" type="number | null">
                                              Max units purchasable beyond included. E.g. included=100, max\_purchase=300 allows 400 total. Null for no limit.
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="proration" type="object">
                                          Proration settings for prepaid features. Controls mid-cycle quantity change billing.

                                          <Expandable title="properties">
                                            <ParamField body="on_increase" type="'bill_immediately' | 'prorate_immediately' | 'prorate_next_cycle' | 'bill_next_cycle'" required>
                                              Billing behavior when quantity increases mid-cycle.
                                            </ParamField>

                                            <ParamField body="on_decrease" type="'prorate' | 'prorate_immediately' | 'prorate_next_cycle' | 'none' | 'no_prorations'" required>
                                              Credit behavior when quantity decreases mid-cycle.
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="rollover" type="object">
                                          Rollover config for unused units. If set, unused included units carry over.

                                          <Expandable title="properties">
                                            <ParamField body="max" type="number">
                                              Max rollover units. Omit for unlimited rollover.
                                            </ParamField>

                                            <ParamField body="max_percentage" type="number">
                                              Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                                            </ParamField>

                                            <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                                              When rolled over units expire.
                                            </ParamField>

                                            <ParamField body="expiry_duration_length" type="number">
                                              Number of periods before expiry.
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>

                                        <ParamField body="feature_override" type="object">
                                          Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

                                          <Expandable title="properties">
                                            <ParamField body="credit_schema" type="object | object[]">
                                              For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                                              <Expandable title="properties">
                                                <ParamField body="metered_feature_id" type="string">
                                                  ID of the metered feature that draws from this credit system.
                                                </ParamField>

                                                <ParamField body="billing_units" type="number">
                                                  Number of metered-feature units priced together. Defaults to one when omitted.
                                                </ParamField>

                                                <ParamField body="dimensions.{key}" type="object">
                                                  Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                                                  <Expandable title="properties">
                                                    <ParamField body="match.{key}" type="string" required>
                                                      Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                                    </ParamField>

                                                    <ParamField body="priority" type="integer">
                                                      Breaks ties between dimensions that match the same number of keys. Higher wins.
                                                    </ParamField>

                                                    <ParamField body="tier_behavior" type="string" required />

                                                    <ParamField body="tiers" type="object[]" required>
                                                      <Expandable title="properties">
                                                        <ParamField body="to" type="number" required>
                                                          Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                                        </ParamField>

                                                        <ParamField body="credit_cost" type="number" required>
                                                          Credits consumed per billing-unit group within this tier.
                                                        </ParamField>
                                                      </Expandable>
                                                    </ParamField>
                                                  </Expandable>
                                                </ParamField>

                                                <ParamField body="multipliers.{key}" type="object">
                                                  Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                                                  <Expandable title="properties">
                                                    <ParamField body="match.{key}" type="string" required>
                                                      Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                                    </ParamField>

                                                    <ParamField body="factor" type="number">
                                                      Multiplies the matched rate. All matching multipliers stack.
                                                    </ParamField>

                                                    <ParamField body="add" type="number">
                                                      Added to the rate after every factor is applied, in credits per billing-unit group.
                                                    </ParamField>
                                                  </Expandable>
                                                </ParamField>

                                                <ParamField body="tier_behavior" type="string" />

                                                <ParamField body="tiers" type="object[]">
                                                  <Expandable title="properties">
                                                    <ParamField body="to" type="number" required>
                                                      Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                                    </ParamField>

                                                    <ParamField body="credit_cost" type="number" required>
                                                      Credits consumed per billing-unit group within this tier.
                                                    </ParamField>
                                                  </Expandable>
                                                </ParamField>

                                                <ParamField body="credit_cost" type="number">
                                                  Credits consumed per billing-unit group.
                                                </ParamField>
                                              </Expandable>
                                            </ParamField>

                                            <ParamField body="markups" type="object">
                                              For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                                              <Expandable title="properties">
                                                <ParamField body="default_markup" type="number">
                                                  Default percentage markup for customers on this plan. Use -100 to make usage free.
                                                </ParamField>

                                                <ParamField body="provider_markups.{key}" type="object | null">
                                                  Per-provider markup percentages for customers on this plan.

                                                  <Expandable title="properties">
                                                    <ParamField body="markup" type="number" required />
                                                  </Expandable>
                                                </ParamField>

                                                <ParamField body="model_markups.{key}" type="object | null">
                                                  Per-model markup overrides for customers on this plan.

                                                  <Expandable title="properties">
                                                    <ParamField body="markup" type="number" />

                                                    <ParamField body="input_cost" type="number" />

                                                    <ParamField body="output_cost" type="number" />
                                                  </Expandable>
                                                </ParamField>
                                              </Expandable>
                                            </ParamField>
                                          </Expandable>
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>

                                    <ParamField body="remove_items" type="object[]">
                                      <Expandable title="properties">
                                        <ParamField body="feature_id" type="string">
                                          Match items linked to this feature.
                                        </ParamField>

                                        <ParamField body="billing_method" type="'prepaid' | 'usage_based'">
                                          Match items with this billing method (prepaid or usage\_based).
                                        </ParamField>

                                        <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'">
                                          Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
                                        </ParamField>

                                        <ParamField body="interval_count" type="integer">
                                          Match items with this interval\_count. Disambiguates between items that share an interval but differ in count.
                                        </ParamField>

                                        <ParamField body="included" type="number">
                                          Match items whose grant equals this included usage. Omitted is a wildcard.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="metadata" type="object" />
                              </Expandable>
                            </ParamField>

                            <ParamField body="remove_licenses" type="object[]">
                              License links to drop, keyed by license\_plan\_id. Parallel to remove\_items.

                              <Expandable title="properties">
                                <ParamField body="license_plan_id" type="string" required />
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="previous_attributes" type="object | null" required>
                  Sparse map of scalar plan fields that changed, holding their previous values. Null when the plan is new.

                  <Expandable title="properties">
                    <ParamField body="id" type="string | null">
                      Unique identifier for the plan.
                    </ParamField>

                    <ParamField body="name" type="string | null">
                      Display name of the plan.
                    </ParamField>

                    <ParamField body="description" type="string | null | null">
                      Optional description of the plan.
                    </ParamField>

                    <ParamField body="group" type="string | null | null">
                      Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
                    </ParamField>

                    <ParamField body="add_on" type="boolean | null">
                      Whether this is an add-on plan that can be attached alongside a main plan.
                    </ParamField>

                    <ParamField body="auto_enable" type="boolean | null">
                      If true, this plan is automatically attached when a customer is created. Used for free plans.
                    </ParamField>

                    <ParamField body="config" type="object | null">
                      Miscellaneous plan-level configuration flags.

                      <Expandable title="properties">
                        <ParamField body="ignore_past_due" type="boolean" required>
                          If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past\_due state.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="active" type="boolean | null">
                      Whether this is the active version of the plan. At most one version is active.
                    </ParamField>

                    <ParamField body="archived" type="boolean | null">
                      Whether the plan is archived. Archived plans cannot be attached to new customers.
                    </ParamField>

                    <ParamField body="metadata" type="object | null">
                      Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
                    </ParamField>

                    <ParamField body="processors" type="object | null">
                      Previous payment processors when they changed. Null when the plan had none.

                      <Expandable title="properties">
                        <ParamField body="stripe" type="object | null">
                          <Expandable title="properties">
                            <ParamField body="product_id" type="string" required>
                              Stripe product ID this plan is billed under.
                            </ParamField>

                            <ParamField body="additional_product_ids" type="string[]">
                              Extra Stripe product IDs aliased to this plan.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="revenuecat" type="object | null">
                          <Expandable title="properties">
                            <ParamField body="products" type="object[]" required>
                              Every RevenueCat product that maps to this plan. Replaces the current set.

                              <Expandable title="properties">
                                <ParamField body="product_id" type="string" required>
                                  RevenueCat product ID that grants this plan when purchased.
                                </ParamField>

                                <ParamField body="feature_quantities" type="object[]">
                                  Prepaid quantities granted when this specific RevenueCat product is purchased, in feature units.

                                  <Expandable title="properties">
                                    <ParamField body="feature_id" type="string" required />

                                    <ParamField body="quantity" type="number" />
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="free_trial" type="object | null">
                      Previous free trial when it changed. Null when the plan had none.

                      <Expandable title="properties">
                        <ParamField body="duration_length" type="number" required>
                          Number of duration\_type periods the trial lasts.
                        </ParamField>

                        <ParamField body="duration_type" type="'day' | 'month' | 'year'" required>
                          Unit of time for the trial duration ('day', 'month', 'year').
                        </ParamField>

                        <ParamField body="card_required" type="boolean" required>
                          Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
                        </ParamField>

                        <ParamField body="on_end" type="'bill' | 'revert'">
                          Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="billing_controls" type="object | null">
                      Sparse previous billing\_controls — only keys that changed. Null when unset; a null lane was unset before.

                      <Expandable title="properties">
                        <ParamField body="auto_topups" type="object[] | null">
                          List of auto top-up configurations per feature.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required>
                              The ID of the feature (credit balance) to auto top-up.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether auto top-up is enabled.
                            </ParamField>

                            <ParamField body="threshold" type="number" required>
                              When the balance drops below this threshold, an auto top-up will be purchased.
                            </ParamField>

                            <ParamField body="quantity" type="number" required>
                              Amount of credits to add per auto top-up.
                            </ParamField>

                            <ParamField body="purchase_limit" type="object">
                              Optional rate limit to cap how often auto top-ups occur.

                              <Expandable title="properties">
                                <ParamField body="interval" type="'hour' | 'day' | 'week' | 'month'" required>
                                  The time interval for the purchase limit window.
                                </ParamField>

                                <ParamField body="interval_count" type="number" required>
                                  Number of intervals in the purchase limit window.
                                </ParamField>

                                <ParamField body="limit" type="number" required>
                                  Maximum number of auto top-ups allowed within the interval.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="invoice_mode" type="boolean">
                              When true, auto top-up creates a send\_invoice invoice instead of auto-charging.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="spend_limits" type="object[] | null">
                          List of overage spend limits per feature (caps overage spend).

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string">
                              Optional feature ID this spend limit applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether the overage spend limit is enabled.
                            </ParamField>

                            <ParamField body="limit_type" type="'absolute' | 'usage_percentage'">
                              How overage\_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
                            </ParamField>

                            <ParamField body="overage_limit" type="number">
                              Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit\_type is usage\_percentage.
                            </ParamField>

                            <ParamField body="skip_overage_billing" type="boolean">
                              When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="usage_limits" type="object[] | null">
                          List of hard usage caps per feature (max units per interval).

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required>
                              The feature this usage limit applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether this usage limit is enabled.
                            </ParamField>

                            <ParamField body="limit" type="number" required>
                              Maximum units allowed per interval.
                            </ParamField>

                            <ParamField body="interval" type="'day' | 'week' | 'month' | 'year'" required>
                              Interval for the cap, aligned to the customer's billing cycle.
                            </ParamField>

                            <ParamField body="anchor" type="'billing_cycle' | 'utc'">
                              Window alignment. 'billing\_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
                            </ParamField>

                            <ParamField body="filter" type="object">
                              When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.

                              <Expandable title="properties">
                                <ParamField body="properties.{key}" type="string" required />
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="usage_alerts" type="object[] | null">
                          List of usage alert configurations per feature.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string">
                              The feature ID this alert applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether this usage alert is enabled.
                            </ParamField>

                            <ParamField body="threshold" type="number" required>
                              The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage\_percentage or remaining\_percentage, this is a percentage (0-100).
                            </ParamField>

                            <ParamField body="threshold_type" type="'usage' | 'usage_percentage' | 'remaining' | 'remaining_percentage'" required>
                              Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
                            </ParamField>

                            <ParamField body="basis" type="'balance' | 'included' | 'recurring' | 'usage_limit'" required>
                              What 100% means. balance: every grant on the feature. included: the plan allowance only. recurring: grants that reset. usage\_limit: the cap of the usage limit with the same feature and filter.
                            </ParamField>

                            <ParamField body="filter" type="object">
                              Only valid with basis usage\_limit. Points the alert at the usage limit carrying the same filter.

                              <Expandable title="properties">
                                <ParamField body="properties.{key}" type="string" required />
                              </Expandable>
                            </ParamField>

                            <ParamField body="name" type="string">
                              Optional user-defined label to distinguish multiple alerts on the same feature.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="overage_allowed" type="object[] | null">
                          List of overage allowed controls per feature. When enabled, usage can exceed balance.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required>
                              The feature ID this overage allowed control applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether overage is allowed for this feature.
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="price_change" type="object">
                  Present when the plan's price changed.

                  <Expandable title="properties">
                    <ParamField body="previous" type="object | null | null" required>
                      Base recurring price for the plan. Null for free plans or usage-only plans.

                      <Expandable title="properties">
                        <ParamField body="amount" type="number" required>
                          Base price amount for the plan, in major currency units (e.g. dollars).
                        </ParamField>

                        <ParamField body="additional_currencies" type="object[]">
                          Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                          <Expandable title="properties">
                            <ParamField body="currency" type="string" required>
                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                            </ParamField>

                            <ParamField body="amount" type="number" required>
                              Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                          Billing interval (e.g. 'month', 'year').
                        </ParamField>

                        <ParamField body="interval_count" type="number">
                          Number of intervals per billing cycle. Defaults to 1.
                        </ParamField>

                        <ParamField body="display" type="object">
                          Display text for showing this price in pricing pages.

                          <Expandable title="properties">
                            <ParamField body="primary_text" type="string" required>
                              Main display text (e.g. '\$10' or '100 messages').
                            </ParamField>

                            <ParamField body="secondary_text" type="string">
                              Secondary display text (e.g. 'per month' or 'then \$0.5 per 100').
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="processors" type="object">
                          Payment processors this base price is connected to. Omitted when unset.

                          <Expandable title="properties">
                            <ParamField body="stripe" type="object | null">
                              <Expandable title="properties">
                                <ParamField body="price_id" type="string" required>
                                  Stripe price ID. For prepaid with included > 0 this is the V2 price.
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="current" type="object | null" required>
                      The plan's price after the change.

                      <Expandable title="properties">
                        <ParamField body="amount" type="number" required>
                          Base price amount for the plan, in major currency units (e.g. dollars).
                        </ParamField>

                        <ParamField body="additional_currencies" type="object[]">
                          Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                          <Expandable title="properties">
                            <ParamField body="currency" type="string" required>
                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                            </ParamField>

                            <ParamField body="amount" type="number" required>
                              Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                          Billing interval (e.g. 'month', 'year').
                        </ParamField>

                        <ParamField body="interval_count" type="number">
                          Number of intervals per billing cycle. Defaults to 1.
                        </ParamField>

                        <ParamField body="display" type="object">
                          Display text for showing this price in pricing pages.

                          <Expandable title="properties">
                            <ParamField body="primary_text" type="string" required>
                              Main display text (e.g. '\$10' or '100 messages').
                            </ParamField>

                            <ParamField body="secondary_text" type="string">
                              Secondary display text (e.g. 'per month' or 'then \$0.5 per 100').
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="processors" type="object">
                          Payment processors this base price is connected to. Omitted when unset.

                          <Expandable title="properties">
                            <ParamField body="stripe" type="object | null">
                              <Expandable title="properties">
                                <ParamField body="price_id" type="string" required>
                                  Stripe price ID. For prepaid with included > 0 this is the V2 price.
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="free_trial_change" type="object">
                  Present when the plan's free trial changed.

                  <Expandable title="properties">
                    <ParamField body="previous" type="object | null" required>
                      The plan's free trial before the change. Null when none.

                      <Expandable title="properties">
                        <ParamField body="duration_length" type="number" required>
                          Number of duration\_type periods the trial lasts.
                        </ParamField>

                        <ParamField body="duration_type" type="'day' | 'month' | 'year'" required>
                          Unit of time for the trial duration ('day', 'month', 'year').
                        </ParamField>

                        <ParamField body="card_required" type="boolean" required>
                          Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
                        </ParamField>

                        <ParamField body="on_end" type="'bill' | 'revert'">
                          Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="current" type="object | null" required>
                      The plan's free trial after the change. Null when none.

                      <Expandable title="properties">
                        <ParamField body="duration_length" type="number" required>
                          Number of duration\_type periods the trial lasts.
                        </ParamField>

                        <ParamField body="duration_type" type="'day' | 'month' | 'year'" required>
                          Unit of time for the trial duration ('day', 'month', 'year').
                        </ParamField>

                        <ParamField body="card_required" type="boolean" required>
                          Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
                        </ParamField>

                        <ParamField body="on_end" type="'bill' | 'revert'">
                          Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="item_changes" type="object[]" required>
                  Feature items added to or removed from the plan.

                  <Expandable title="properties">
                    <ParamField body="action" type="'created' | 'deleted'" required>
                      Whether the item was added to or removed from the plan.
                    </ParamField>

                    <ParamField body="feature_id" type="string" required>
                      The ID of the feature that was added or removed.
                    </ParamField>

                    <ParamField body="item" type="object" required>
                      The plan item snapshot that was added or removed.

                      <Expandable title="properties">
                        <ParamField body="feature_id" type="string" required>
                          The ID of the feature this item configures.
                        </ParamField>

                        <ParamField body="feature" type="object">
                          The full feature object if expanded.

                          <Expandable title="properties">
                            <ParamField body="id" type="string" required>
                              The ID of the feature, used to refer to it in other API calls like /track or /check.
                            </ParamField>

                            <ParamField body="name" type="string | null">
                              The name of the feature.
                            </ParamField>

                            <ParamField body="type" type="'static' | 'boolean' | 'single_use' | 'continuous_use' | 'credit_system' | 'ai_credit_system'" required>
                              The type of the feature
                            </ParamField>

                            <ParamField body="display" type="object | null">
                              Singular and plural display names for the feature.

                              <Expandable title="properties">
                                <ParamField body="singular" type="string" required>
                                  The singular display name for the feature.
                                </ParamField>

                                <ParamField body="plural" type="string" required>
                                  The plural display name for the feature.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="credit_schema" type="object[] | null">
                              Credit cost schema for credit system features.

                              <Expandable title="properties">
                                <ParamField body="metered_feature_id" type="string" required>
                                  The ID of the metered feature (should be a single\_use feature).
                                </ParamField>

                                <ParamField body="credit_cost" type="number" required>
                                  The credit cost of the metered feature.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="archived" type="boolean | null">
                              Whether or not the feature is archived.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="included" type="number" required>
                          Number of free units included. For consumable features, balance resets to this number each interval.
                        </ParamField>

                        <ParamField body="unlimited" type="boolean" required>
                          Whether the customer has unlimited access to this feature.
                        </ParamField>

                        <ParamField body="pooled" type="boolean">
                          Whether entity-level grants contribute to a shared customer balance.
                        </ParamField>

                        <ParamField body="reset" type="object | null" required>
                          Reset configuration for consumable features. Null for non-consumable features like seats where usage persists across billing cycles.

                          <Expandable title="properties">
                            <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                              The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
                            </ParamField>

                            <ParamField body="interval_count" type="number">
                              Number of intervals between resets. Defaults to 1.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="price" type="object | null" required>
                          Pricing configuration for usage beyond included units. Null if feature is entirely free.

                          <Expandable title="properties">
                            <ParamField body="amount" type="number">
                              Price per billing\_units after included usage is consumed. Mutually exclusive with tiers.
                            </ParamField>

                            <ParamField body="additional_currencies" type="object[]">
                              Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers' (tiered prices carry per-currency amounts on each tier).

                              <Expandable title="properties">
                                <ParamField body="currency" type="string" required>
                                  Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                </ParamField>

                                <ParamField body="amount" type="number" required>
                                  Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="tiers" type="object[]">
                              Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.

                              <Expandable title="properties">
                                <ParamField body="to" type="number" required />

                                <ParamField body="amount" type="number" required />

                                <ParamField body="flat_amount" type="number" />

                                <ParamField body="additional_currencies" type="object[]">
                                  <Expandable title="properties">
                                    <ParamField body="currency" type="string" required>
                                      Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                    </ParamField>

                                    <ParamField body="amount" type="number">
                                      Per-unit amount for this tier in this currency.
                                    </ParamField>

                                    <ParamField body="flat_amount" type="number">
                                      Flat amount for this tier in this currency, if the tier uses one.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                            <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                              Billing interval for this price. For consumable features, should match reset.interval.
                            </ParamField>

                            <ParamField body="interval_count" type="number">
                              Number of intervals per billing cycle. Defaults to 1.
                            </ParamField>

                            <ParamField body="billing_units" type="number" required>
                              Number of units per price increment. Usage is rounded UP to the nearest billing\_units when billed (e.g. billing\_units=100 means 101 usage rounds to 200).
                            </ParamField>

                            <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                              'prepaid' for features like seats where customers pay upfront, 'usage\_based' for pay-as-you-go after included usage.
                            </ParamField>

                            <ParamField body="max_purchase" type="number | null" required>
                              Maximum units a customer can purchase beyond included. E.g. if included=100 and max\_purchase=300, customer can use up to 400 total before usage is capped. Null for no limit.
                            </ParamField>

                            <ParamField body="processors" type="object">
                              Payment processors this item price is connected to. Omitted when unset.

                              <Expandable title="properties">
                                <ParamField body="stripe" type="object | null">
                                  <Expandable title="properties">
                                    <ParamField body="price_id" type="string" required>
                                      Stripe price ID. For prepaid with included > 0 this is the V2 price.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="display" type="object">
                          Display text for showing this item in pricing pages.

                          <Expandable title="properties">
                            <ParamField body="primary_text" type="string" required>
                              Main display text (e.g. '\$10' or '100 messages').
                            </ParamField>

                            <ParamField body="secondary_text" type="string">
                              Secondary display text (e.g. 'per month' or 'then \$0.5 per 100').
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="rollover" type="object">
                          Rollover configuration for unused units. If set, unused included units roll over to the next period.

                          <Expandable title="properties">
                            <ParamField body="max" type="number | null" required>
                              Maximum rollover units. Null for unlimited rollover.
                            </ParamField>

                            <ParamField body="max_percentage" type="number | null">
                              Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                            </ParamField>

                            <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                              When rolled over units expire.
                            </ParamField>

                            <ParamField body="expiry_duration_length" type="number">
                              Number of periods before expiry.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="feature_override" type="object">
                          Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

                          <Expandable title="properties">
                            <ParamField body="credit_schema" type="object | object[]">
                              For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                              <Expandable title="properties">
                                <ParamField body="metered_feature_id" type="string">
                                  ID of the metered feature that draws from this credit system.
                                </ParamField>

                                <ParamField body="billing_units" type="number">
                                  Number of metered-feature units priced together. Defaults to one when omitted.
                                </ParamField>

                                <ParamField body="dimensions.{key}" type="object">
                                  Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                                  <Expandable title="properties">
                                    <ParamField body="match.{key}" type="string" required>
                                      Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                    </ParamField>

                                    <ParamField body="priority" type="integer">
                                      Breaks ties between dimensions that match the same number of keys. Higher wins.
                                    </ParamField>

                                    <ParamField body="tier_behavior" type="string" required />

                                    <ParamField body="tiers" type="object[]" required>
                                      <Expandable title="properties">
                                        <ParamField body="to" type="number" required>
                                          Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                        </ParamField>

                                        <ParamField body="credit_cost" type="number" required>
                                          Credits consumed per billing-unit group within this tier.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="multipliers.{key}" type="object">
                                  Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                                  <Expandable title="properties">
                                    <ParamField body="match.{key}" type="string" required>
                                      Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                    </ParamField>

                                    <ParamField body="factor" type="number">
                                      Multiplies the matched rate. All matching multipliers stack.
                                    </ParamField>

                                    <ParamField body="add" type="number">
                                      Added to the rate after every factor is applied, in credits per billing-unit group.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="tier_behavior" type="string" />

                                <ParamField body="tiers" type="object[]">
                                  <Expandable title="properties">
                                    <ParamField body="to" type="number" required>
                                      Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                    </ParamField>

                                    <ParamField body="credit_cost" type="number" required>
                                      Credits consumed per billing-unit group within this tier.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="credit_cost" type="number">
                                  Credits consumed per billing-unit group.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="markups" type="object">
                              For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                              <Expandable title="properties">
                                <ParamField body="default_markup" type="number">
                                  Default percentage markup for customers on this plan. Use -100 to make usage free.
                                </ParamField>

                                <ParamField body="provider_markups.{key}" type="object | null">
                                  Per-provider markup percentages for customers on this plan.

                                  <Expandable title="properties">
                                    <ParamField body="markup" type="number" required />
                                  </Expandable>
                                </ParamField>

                                <ParamField body="model_markups.{key}" type="object | null">
                                  Per-model markup overrides for customers on this plan.

                                  <Expandable title="properties">
                                    <ParamField body="markup" type="number" />

                                    <ParamField body="input_cost" type="number" />

                                    <ParamField body="output_cost" type="number" />
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="customize" type="object">
                  Params that would transform the previous plan into the current one. Omitted when nothing customizable changed.

                  <Expandable title="properties">
                    <ParamField body="price" type="object | null">
                      Base price configuration for a plan.

                      <Expandable title="properties">
                        <ParamField body="amount" type="number" required>
                          Base price amount for the plan, in major currency units (e.g. dollars).
                        </ParamField>

                        <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                          Billing interval (e.g. 'month', 'year').
                        </ParamField>

                        <ParamField body="interval_count" type="number">
                          Number of intervals per billing cycle. Defaults to 1.
                        </ParamField>

                        <ParamField body="additional_currencies" type="object[]">
                          Base price amounts in additional currencies. The base 'amount' is in the org's default currency.

                          <Expandable title="properties">
                            <ParamField body="currency" type="string" required>
                              Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                            </ParamField>

                            <ParamField body="amount" type="number" required>
                              Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="add_items" type="object[]">
                      Items to add to the plan.

                      <Expandable title="properties">
                        <ParamField body="feature_id" type="string" required>
                          The ID of the feature to configure.
                        </ParamField>

                        <ParamField body="included" type="number">
                          Number of free units included. Balance resets to this each interval for consumable features.
                        </ParamField>

                        <ParamField body="unlimited" type="boolean">
                          If true, customer has unlimited access to this feature.
                        </ParamField>

                        <ParamField body="pooled" type="boolean">
                          Whether entity-level grants contribute to a shared customer balance.
                        </ParamField>

                        <ParamField body="reset" type="object">
                          Reset configuration for consumable features. Omit for non-consumable features like seats.

                          <Expandable title="properties">
                            <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                              Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
                            </ParamField>

                            <ParamField body="interval_count" type="number">
                              Number of intervals between resets. Defaults to 1.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="price" type="object">
                          Pricing for usage beyond included units. Omit for free features.

                          <Expandable title="properties">
                            <ParamField body="amount" type="number">
                              Price per billing\_units after included usage. Either 'amount' or 'tiers' is required.
                            </ParamField>

                            <ParamField body="additional_currencies" type="object[]">
                              Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.

                              <Expandable title="properties">
                                <ParamField body="currency" type="string" required>
                                  Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                </ParamField>

                                <ParamField body="amount" type="number" required>
                                  Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="tiers" type="object[]">
                              Tiered pricing. Either 'amount' or 'tiers' is required.

                              <Expandable title="properties">
                                <ParamField body="to" type="number" required />

                                <ParamField body="amount" type="number" required />

                                <ParamField body="flat_amount" type="number" />

                                <ParamField body="additional_currencies" type="object[]">
                                  <Expandable title="properties">
                                    <ParamField body="currency" type="string" required>
                                      Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                                    </ParamField>

                                    <ParamField body="amount" type="number">
                                      Per-unit amount for this tier in this currency.
                                    </ParamField>

                                    <ParamField body="flat_amount" type="number">
                                      Flat amount for this tier in this currency, if the tier uses one.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                            <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                              Billing interval. For consumable features, should match reset.interval.
                            </ParamField>

                            <ParamField body="interval_count" type="number">
                              Number of intervals per billing cycle. Defaults to 1.
                            </ParamField>

                            <ParamField body="billing_units" type="number">
                              Units per price increment. Usage is rounded UP when billed (e.g. billing\_units=100 means 101 rounds to 200).
                            </ParamField>

                            <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                              'prepaid' for upfront payment (seats), 'usage\_based' for pay-as-you-go.
                            </ParamField>

                            <ParamField body="max_purchase" type="number | null">
                              Max units purchasable beyond included. E.g. included=100, max\_purchase=300 allows 400 total. Null for no limit.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="proration" type="object">
                          Proration settings for prepaid features. Controls mid-cycle quantity change billing.

                          <Expandable title="properties">
                            <ParamField body="on_increase" type="'bill_immediately' | 'prorate_immediately' | 'prorate_next_cycle' | 'bill_next_cycle'" required>
                              Billing behavior when quantity increases mid-cycle.
                            </ParamField>

                            <ParamField body="on_decrease" type="'prorate' | 'prorate_immediately' | 'prorate_next_cycle' | 'none' | 'no_prorations'" required>
                              Credit behavior when quantity decreases mid-cycle.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="rollover" type="object">
                          Rollover config for unused units. If set, unused included units carry over.

                          <Expandable title="properties">
                            <ParamField body="max" type="number">
                              Max rollover units. Omit for unlimited rollover.
                            </ParamField>

                            <ParamField body="max_percentage" type="number">
                              Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                            </ParamField>

                            <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                              When rolled over units expire.
                            </ParamField>

                            <ParamField body="expiry_duration_length" type="number">
                              Number of periods before expiry.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="feature_override" type="object">
                          Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

                          <Expandable title="properties">
                            <ParamField body="credit_schema" type="object | object[]">
                              For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                              <Expandable title="properties">
                                <ParamField body="metered_feature_id" type="string">
                                  ID of the metered feature that draws from this credit system.
                                </ParamField>

                                <ParamField body="billing_units" type="number">
                                  Number of metered-feature units priced together. Defaults to one when omitted.
                                </ParamField>

                                <ParamField body="dimensions.{key}" type="object">
                                  Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                                  <Expandable title="properties">
                                    <ParamField body="match.{key}" type="string" required>
                                      Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                    </ParamField>

                                    <ParamField body="priority" type="integer">
                                      Breaks ties between dimensions that match the same number of keys. Higher wins.
                                    </ParamField>

                                    <ParamField body="tier_behavior" type="string" required />

                                    <ParamField body="tiers" type="object[]" required>
                                      <Expandable title="properties">
                                        <ParamField body="to" type="number" required>
                                          Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                        </ParamField>

                                        <ParamField body="credit_cost" type="number" required>
                                          Credits consumed per billing-unit group within this tier.
                                        </ParamField>
                                      </Expandable>
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="multipliers.{key}" type="object">
                                  Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                                  <Expandable title="properties">
                                    <ParamField body="match.{key}" type="string" required>
                                      Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                                    </ParamField>

                                    <ParamField body="factor" type="number">
                                      Multiplies the matched rate. All matching multipliers stack.
                                    </ParamField>

                                    <ParamField body="add" type="number">
                                      Added to the rate after every factor is applied, in credits per billing-unit group.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="tier_behavior" type="string" />

                                <ParamField body="tiers" type="object[]">
                                  <Expandable title="properties">
                                    <ParamField body="to" type="number" required>
                                      Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                                    </ParamField>

                                    <ParamField body="credit_cost" type="number" required>
                                      Credits consumed per billing-unit group within this tier.
                                    </ParamField>
                                  </Expandable>
                                </ParamField>

                                <ParamField body="credit_cost" type="number">
                                  Credits consumed per billing-unit group.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="markups" type="object">
                              For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                              <Expandable title="properties">
                                <ParamField body="default_markup" type="number">
                                  Default percentage markup for customers on this plan. Use -100 to make usage free.
                                </ParamField>

                                <ParamField body="provider_markups.{key}" type="object | null">
                                  Per-provider markup percentages for customers on this plan.

                                  <Expandable title="properties">
                                    <ParamField body="markup" type="number" required />
                                  </Expandable>
                                </ParamField>

                                <ParamField body="model_markups.{key}" type="object | null">
                                  Per-model markup overrides for customers on this plan.

                                  <Expandable title="properties">
                                    <ParamField body="markup" type="number" />

                                    <ParamField body="input_cost" type="number" />

                                    <ParamField body="output_cost" type="number" />
                                  </Expandable>
                                </ParamField>
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="remove_items" type="object[]">
                      Filters selecting items to remove from the plan.

                      <Expandable title="properties">
                        <ParamField body="feature_id" type="string">
                          Match items linked to this feature.
                        </ParamField>

                        <ParamField body="billing_method" type="'prepaid' | 'usage_based'">
                          Match items with this billing method (prepaid or usage\_based).
                        </ParamField>

                        <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'">
                          Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
                        </ParamField>

                        <ParamField body="interval_count" type="integer">
                          Match items with this interval\_count. Disambiguates between items that share an interval but differ in count.
                        </ParamField>

                        <ParamField body="included" type="number">
                          Match items whose grant equals this included usage. Omitted is a wildcard.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="free_trial" type="object | null">
                      Free trial configuration for a plan.

                      <Expandable title="properties">
                        <ParamField body="duration_length" type="number" required>
                          Number of duration\_type periods the trial lasts.
                        </ParamField>

                        <ParamField body="duration_type" type="'day' | 'month' | 'year'" required>
                          Unit of time for the trial ('day', 'month', 'year').
                        </ParamField>

                        <ParamField body="card_required" type="boolean" required>
                          If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
                        </ParamField>

                        <ParamField body="on_end" type="'bill' | 'revert'">
                          Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="billing_controls" type="object">
                      Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.

                      <Expandable title="properties">
                        <ParamField body="auto_topups" type="object[]">
                          List of auto top-up configurations per feature.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required>
                              The ID of the feature (credit balance) to auto top-up.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether auto top-up is enabled.
                            </ParamField>

                            <ParamField body="threshold" type="number" required>
                              When the balance drops below this threshold, an auto top-up will be purchased.
                            </ParamField>

                            <ParamField body="quantity" type="number" required>
                              Amount of credits to add per auto top-up.
                            </ParamField>

                            <ParamField body="purchase_limit" type="object">
                              Optional rate limit to cap how often auto top-ups occur. Pass count to set the current window's consumed top-ups.

                              <Expandable title="properties">
                                <ParamField body="interval" type="'hour' | 'day' | 'week' | 'month'" required>
                                  The time interval for the purchase limit window.
                                </ParamField>

                                <ParamField body="interval_count" type="number" required>
                                  Number of intervals in the purchase limit window.
                                </ParamField>

                                <ParamField body="limit" type="number" required>
                                  Maximum number of auto top-ups allowed within the interval.
                                </ParamField>

                                <ParamField body="count" type="number">
                                  Set the current window's consumed auto top-up count. Omit to leave runtime state unchanged.
                                </ParamField>
                              </Expandable>
                            </ParamField>

                            <ParamField body="invoice_mode" type="boolean">
                              When true, auto top-up creates a send\_invoice invoice instead of auto-charging.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="spend_limits" type="object[]">
                          List of overage spend limits per feature (caps overage spend).

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string">
                              Optional feature ID this spend limit applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether the overage spend limit is enabled.
                            </ParamField>

                            <ParamField body="limit_type" type="'absolute' | 'usage_percentage'">
                              How overage\_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
                            </ParamField>

                            <ParamField body="overage_limit" type="number">
                              Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit\_type is usage\_percentage.
                            </ParamField>

                            <ParamField body="skip_overage_billing" type="boolean">
                              When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="usage_limits" type="object[]">
                          List of hard usage caps per feature (max units per interval).

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required>
                              The feature this usage limit applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether this usage limit is enabled.
                            </ParamField>

                            <ParamField body="limit" type="number" required>
                              Maximum units allowed per interval.
                            </ParamField>

                            <ParamField body="interval" type="'day' | 'week' | 'month' | 'year'" required>
                              Interval for the cap, aligned to the customer's billing cycle.
                            </ParamField>

                            <ParamField body="anchor" type="'billing_cycle' | 'utc'">
                              Window alignment. 'billing\_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
                            </ParamField>

                            <ParamField body="filter" type="object">
                              When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.

                              <Expandable title="properties">
                                <ParamField body="properties.{key}" type="string" required />
                              </Expandable>
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="usage_alerts" type="object[]">
                          List of usage alert configurations per feature.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string">
                              The feature ID this alert applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether this usage alert is enabled.
                            </ParamField>

                            <ParamField body="threshold" type="number" required>
                              The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage\_percentage or remaining\_percentage, this is a percentage (0-100).
                            </ParamField>

                            <ParamField body="threshold_type" type="'usage' | 'usage_percentage' | 'remaining' | 'remaining_percentage'" required>
                              Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
                            </ParamField>

                            <ParamField body="basis" type="'balance' | 'included' | 'recurring' | 'usage_limit'" required>
                              What 100% means. balance: every grant on the feature. included: the plan allowance only. recurring: grants that reset. usage\_limit: the cap of the usage limit with the same feature and filter.
                            </ParamField>

                            <ParamField body="filter" type="object">
                              Only valid with basis usage\_limit. Points the alert at the usage limit carrying the same filter.

                              <Expandable title="properties">
                                <ParamField body="properties.{key}" type="string" required />
                              </Expandable>
                            </ParamField>

                            <ParamField body="name" type="string">
                              Optional user-defined label to distinguish multiple alerts on the same feature.
                            </ParamField>
                          </Expandable>
                        </ParamField>

                        <ParamField body="overage_allowed" type="object[]">
                          List of overage allowed controls per feature. When enabled, usage can exceed balance.

                          <Expandable title="properties">
                            <ParamField body="feature_id" type="string" required>
                              The feature ID this overage allowed control applies to.
                            </ParamField>

                            <ParamField body="enabled" type="boolean" required>
                              Whether overage is allowed for this feature.
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="item_changes" type="object[]" required>
      Deprecated — use plan\_change.item\_changes. Features that were added to or removed from this plan.

      <Expandable title="properties">
        <ParamField body="action" type="'created' | 'deleted'" required>
          Whether the item was added to or removed from the plan.
        </ParamField>

        <ParamField body="feature_id" type="string" required>
          The ID of the feature that was added or removed.
        </ParamField>

        <ParamField body="item" type="object" required>
          The plan item snapshot that was added or removed.

          <Expandable title="properties">
            <ParamField body="feature_id" type="string" required>
              The ID of the feature this item configures.
            </ParamField>

            <ParamField body="feature" type="object">
              The full feature object if expanded.

              <Expandable title="properties">
                <ParamField body="id" type="string" required>
                  The ID of the feature, used to refer to it in other API calls like /track or /check.
                </ParamField>

                <ParamField body="name" type="string | null">
                  The name of the feature.
                </ParamField>

                <ParamField body="type" type="'static' | 'boolean' | 'single_use' | 'continuous_use' | 'credit_system' | 'ai_credit_system'" required>
                  The type of the feature
                </ParamField>

                <ParamField body="display" type="object | null">
                  Singular and plural display names for the feature.

                  <Expandable title="properties">
                    <ParamField body="singular" type="string" required>
                      The singular display name for the feature.
                    </ParamField>

                    <ParamField body="plural" type="string" required>
                      The plural display name for the feature.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="credit_schema" type="object[] | null">
                  Credit cost schema for credit system features.

                  <Expandable title="properties">
                    <ParamField body="metered_feature_id" type="string" required>
                      The ID of the metered feature (should be a single\_use feature).
                    </ParamField>

                    <ParamField body="credit_cost" type="number" required>
                      The credit cost of the metered feature.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="archived" type="boolean | null">
                  Whether or not the feature is archived.
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="included" type="number" required>
              Number of free units included. For consumable features, balance resets to this number each interval.
            </ParamField>

            <ParamField body="unlimited" type="boolean" required>
              Whether the customer has unlimited access to this feature.
            </ParamField>

            <ParamField body="pooled" type="boolean">
              Whether entity-level grants contribute to a shared customer balance.
            </ParamField>

            <ParamField body="reset" type="object | null" required>
              Reset configuration for consumable features. Null for non-consumable features like seats where usage persists across billing cycles.

              <Expandable title="properties">
                <ParamField body="interval" type="'one_off' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                  The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
                </ParamField>

                <ParamField body="interval_count" type="number">
                  Number of intervals between resets. Defaults to 1.
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="price" type="object | null" required>
              Pricing configuration for usage beyond included units. Null if feature is entirely free.

              <Expandable title="properties">
                <ParamField body="amount" type="number">
                  Price per billing\_units after included usage is consumed. Mutually exclusive with tiers.
                </ParamField>

                <ParamField body="additional_currencies" type="object[]">
                  Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers' (tiered prices carry per-currency amounts on each tier).

                  <Expandable title="properties">
                    <ParamField body="currency" type="string" required>
                      Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                    </ParamField>

                    <ParamField body="amount" type="number" required>
                      Price amount in this currency. Set explicitly per currency, not converted from the base amount.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="tiers" type="object[]">
                  Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.

                  <Expandable title="properties">
                    <ParamField body="to" type="number" required />

                    <ParamField body="amount" type="number" required />

                    <ParamField body="flat_amount" type="number" />

                    <ParamField body="additional_currencies" type="object[]">
                      <Expandable title="properties">
                        <ParamField body="currency" type="string" required>
                          Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
                        </ParamField>

                        <ParamField body="amount" type="number">
                          Per-unit amount for this tier in this currency.
                        </ParamField>

                        <ParamField body="flat_amount" type="number">
                          Flat amount for this tier in this currency, if the tier uses one.
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="tier_behavior" type="'graduated' | 'volume'" />

                <ParamField body="interval" type="'one_off' | 'week' | 'month' | 'quarter' | 'semi_annual' | 'year'" required>
                  Billing interval for this price. For consumable features, should match reset.interval.
                </ParamField>

                <ParamField body="interval_count" type="number">
                  Number of intervals per billing cycle. Defaults to 1.
                </ParamField>

                <ParamField body="billing_units" type="number" required>
                  Number of units per price increment. Usage is rounded UP to the nearest billing\_units when billed (e.g. billing\_units=100 means 101 usage rounds to 200).
                </ParamField>

                <ParamField body="billing_method" type="'prepaid' | 'usage_based'" required>
                  'prepaid' for features like seats where customers pay upfront, 'usage\_based' for pay-as-you-go after included usage.
                </ParamField>

                <ParamField body="max_purchase" type="number | null" required>
                  Maximum units a customer can purchase beyond included. E.g. if included=100 and max\_purchase=300, customer can use up to 400 total before usage is capped. Null for no limit.
                </ParamField>

                <ParamField body="processors" type="object">
                  Payment processors this item price is connected to. Omitted when unset.

                  <Expandable title="properties">
                    <ParamField body="stripe" type="object | null">
                      <Expandable title="properties">
                        <ParamField body="price_id" type="string" required>
                          Stripe price ID. For prepaid with included > 0 this is the V2 price.
                        </ParamField>
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="display" type="object">
              Display text for showing this item in pricing pages.

              <Expandable title="properties">
                <ParamField body="primary_text" type="string" required>
                  Main display text (e.g. '\$10' or '100 messages').
                </ParamField>

                <ParamField body="secondary_text" type="string">
                  Secondary display text (e.g. 'per month' or 'then \$0.5 per 100').
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="rollover" type="object">
              Rollover configuration for unused units. If set, unused included units roll over to the next period.

              <Expandable title="properties">
                <ParamField body="max" type="number | null" required>
                  Maximum rollover units. Null for unlimited rollover.
                </ParamField>

                <ParamField body="max_percentage" type="number | null">
                  Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
                </ParamField>

                <ParamField body="expiry_duration_type" type="'month' | 'forever'" required>
                  When rolled over units expire.
                </ParamField>

                <ParamField body="expiry_duration_length" type="number">
                  Number of periods before expiry.
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="feature_override" type="object">
              Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit\_schema).

              <Expandable title="properties">
                <ParamField body="credit_schema" type="object | object[]">
                  For credit system features: replaces the feature's credit\_schema entirely for customers on this plan.

                  <Expandable title="properties">
                    <ParamField body="metered_feature_id" type="string">
                      ID of the metered feature that draws from this credit system.
                    </ParamField>

                    <ParamField body="billing_units" type="number">
                      Number of metered-feature units priced together. Defaults to one when omitted.
                    </ParamField>

                    <ParamField body="dimensions.{key}" type="object">
                      Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.

                      <Expandable title="properties">
                        <ParamField body="match.{key}" type="string" required>
                          Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                        </ParamField>

                        <ParamField body="priority" type="integer">
                          Breaks ties between dimensions that match the same number of keys. Higher wins.
                        </ParamField>

                        <ParamField body="tier_behavior" type="string" required />

                        <ParamField body="tiers" type="object[]" required>
                          <Expandable title="properties">
                            <ParamField body="to" type="number" required>
                              Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                            </ParamField>

                            <ParamField body="credit_cost" type="number" required>
                              Credits consumed per billing-unit group within this tier.
                            </ParamField>
                          </Expandable>
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="multipliers.{key}" type="object">
                      Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.

                      <Expandable title="properties">
                        <ParamField body="match.{key}" type="string" required>
                          Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
                        </ParamField>

                        <ParamField body="factor" type="number">
                          Multiplies the matched rate. All matching multipliers stack.
                        </ParamField>

                        <ParamField body="add" type="number">
                          Added to the rate after every factor is applied, in credits per billing-unit group.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="tier_behavior" type="string" />

                    <ParamField body="tiers" type="object[]">
                      <Expandable title="properties">
                        <ParamField body="to" type="number" required>
                          Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
                        </ParamField>

                        <ParamField body="credit_cost" type="number" required>
                          Credits consumed per billing-unit group within this tier.
                        </ParamField>
                      </Expandable>
                    </ParamField>

                    <ParamField body="credit_cost" type="number">
                      Credits consumed per billing-unit group.
                    </ParamField>
                  </Expandable>
                </ParamField>

                <ParamField body="markups" type="object">
                  For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.

                  <Expandable title="properties">
                    <ParamField body="default_markup" type="number">
                      Default percentage markup for customers on this plan. Use -100 to make usage free.
                    </ParamField>

                    <ParamField body="provider_markups.{key}" type="object | null">
                      Per-provider markup percentages for customers on this plan.

                      <Expandable title="properties">
                        <ParamField body="markup" type="number" required />
                      </Expandable>
                    </ParamField>

                    <ParamField body="model_markups.{key}" type="object | null">
                      Per-model markup overrides for customers on this plan.

                      <Expandable title="properties">
                        <ParamField body="markup" type="number" />

                        <ParamField body="input_cost" type="number" />

                        <ParamField body="output_cost" type="number" />
                      </Expandable>
                    </ParamField>
                  </Expandable>
                </ParamField>
              </Expandable>
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="tags" type="string[]" required>
  Reason tags describing why this event fired (e.g. 'trial\_ended', 'phase\_changed'). Always present; empty when no specific reason applies.
</ParamField>


## OpenAPI

````yaml api/openapi.yml webhook billing.updated
openapi: 3.1.0
info:
  title: Autumn API
  version: 2.4.0
servers:
  - url: https://api.useautumn.com
    description: Production server
security:
  - secretKey: []
paths: {}
components:
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````