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

# Apply changes to a subscription

> Applies a delta (`add`, `remove`, `update`) on top of a source version. The API computes the new version, creates it, and publishes it unless `draft: true` is set. The `effective` field controls when the change takes effect (keyword or specific date). This is the high-level mutation endpoint. See the [Updating a Subscription](/docs/api-reference/v2/examples/updating-a-subscription) examples for concrete bodies covering price adjustments, plan swaps, bundle operations, and tier replacements.



## OpenAPI

````yaml /api-reference/v2/specs/2026-04-01.json post /subscriptions/{id}/changes
openapi: 3.1.0
info:
  title: Alguna Public API
  version: '2026-04-01'
servers:
  - url: https://api.alguna.io
security:
  - bearerAuth: []
tags:
  - name: Billing Events and Metrics
  - name: Credit Notes
  - name: Credits
  - name: Customer Portal Sessions
  - name: Customers
  - name: Insights
  - name: Invoices
  - name: Payments
  - name: Plans
  - name: Product Bundles
  - name: Products
  - name: Refunds
  - name: Revenue Schedules
  - name: Subscription Changes
  - name: Subscription Versions
  - name: Subscriptions
  - name: Wallet Grants
  - name: Wallets
paths:
  /subscriptions/{id}/changes:
    post:
      tags:
        - Subscription Changes
      summary: Apply changes to a subscription
      description: >-
        Applies a delta (`add`, `remove`, `update`) on top of a source version.
        The API computes the new version, creates it, and publishes it unless
        `draft: true` is set. The `effective` field controls when the change
        takes effect (keyword or specific date). This is the high-level mutation
        endpoint. See the [Updating a
        Subscription](/docs/api-reference/v2/examples/updating-a-subscription)
        examples for concrete bodies covering price adjustments, plan swaps,
        bundle operations, and tier replacements.
      operationId: create-subscription-change
      parameters:
        - in: header
          name: Alguna-Version
          required: true
          schema:
            enum:
              - '2026-04-01'
            type: string
        - in: header
          name: Idempotency-Key
          schema:
            description: >-
              A unique string used to ensure the request is processed exactly
              once. If you retry a request with the same idempotency key within
              24 hours, the original response is returned without re-executing
              the operation.
            example: ik_a1b2c3d4e5f6
            maxLength: 255
            type: string
        - in: path
          name: id
          required: true
          schema:
            description: Unique identifier for the subscription
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateChangeRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangeResponse'
          description: Success
          headers:
            Idempotency-Key:
              description: Echo of the idempotency key provided in the request
              schema:
                type: string
            Idempotent-Replayed:
              description: >-
                Whether this response was replayed from a previous request
                (true) or freshly executed (false)
              schema:
                type: boolean
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            Conflict — a request with this idempotency key is currently being
            processed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
components:
  schemas:
    CreateChangeRequest:
      properties:
        add:
          description: Products or bundles to add
          items:
            $ref: '#/components/schemas/ChangeAddItem'
          type: array
        description:
          description: Human-readable audit note
          example: Q3 upgrade
          nullable: true
          type: string
        draft:
          description: Create as draft (true) or auto-publish (false, default)
          example: false
          nullable: true
          type: boolean
        effective:
          description: >-
            When the change takes effect. One of: 'immediate' (now),
            'next_term_renewal' (contract end), 'next_billing_period' (start of
            the next invoicing cycle), an ISO 8601 date (YYYY-MM-DD), or an
            RFC3339 timestamp (e.g. 2027-01-01T14:30:00Z).
          example: next_billing_period
          nullable: true
          type: string
        plan_id:
          description: Swap to a new plan (provides base item set)
          example: pln_abc123
          nullable: true
          type: string
        remove:
          description: Products or bundles to remove
          items:
            $ref: '#/components/schemas/ChangeRemoveItem'
          type: array
        source_version_id:
          description: 'Version to compute deltas against (default: current active)'
          example: subv_abc123
          nullable: true
          type: string
        update:
          description: Products or bundles to modify
          items:
            $ref: '#/components/schemas/ChangeUpdateItem'
          type: array
      type: object
    ChangeResponse:
      properties:
        changes_applied:
          allOf:
            - $ref: '#/components/schemas/ChangesAppliedResponse'
          description: Summary of changes applied
        effective_at:
          description: When the change takes effect
          example: '2027-01-01T00:00:00Z'
          format: date-time
          nullable: true
          type: string
        end_date:
          description: >-
            When this version ends, if superseded by a later version. Callers
            should verify this matches expectations when inserting between
            existing versions.
          example: '2027-06-01T00:00:00Z'
          format: date-time
          nullable: true
          type: string
        is_new_version:
          description: Whether a new version was created (false = draft replaced)
          example: true
          type: boolean
        source_version_id:
          description: Version the delta was computed against
          example: subv_abc123
          type: string
        version_id:
          description: Created or replaced version ID
          example: subv_abc123
          type: string
        version_status:
          description: Version status
          enum:
            - draft
            - published
          example: published
          type: string
      required:
        - changes_applied
        - is_new_version
        - source_version_id
        - version_id
        - version_status
      type: object
    ErrorResponse:
      properties:
        detail:
          type: string
        status:
          format: int64
          type: integer
      required:
        - status
        - detail
      type: object
    ChangeAddItem:
      properties:
        bundle_id:
          description: Bundle ID (for bundle items)
          example: bun_abc123
          nullable: true
          type: string
        items:
          description: Bundle child items with prices
          items:
            $ref: '#/components/schemas/ChangeAddItemChild'
          type: array
        new_price:
          allOf:
            - $ref: '#/components/schemas/PriceInput'
          description: Price definition for the new product
          nullable: true
        product_id:
          description: Product ID (for standalone items)
          example: prod_abc123
          nullable: true
          type: string
      type: object
    ChangeRemoveItem:
      properties:
        bundle_id:
          description: Bundle ID to remove (cascade removes all children)
          example: bun_abc123
          nullable: true
          type: string
        product_id:
          description: Product ID to remove
          example: prod_abc123
          nullable: true
          type: string
      type: object
    ChangeUpdateItem:
      properties:
        add_items:
          description: New items to add to the bundle
          items:
            $ref: '#/components/schemas/ChangeAddItemChild'
          type: array
        adjust:
          allOf:
            - $ref: '#/components/schemas/PriceAdjustInput'
          description: Partial price adjustment (merge semantics)
          nullable: true
        bundle_id:
          description: Bundle ID (for bundle items)
          example: bun_abc123
          nullable: true
          type: string
        items:
          description: Bundle child items to adjust or replace
          items:
            $ref: '#/components/schemas/ChangeUpdateItemChild'
          type: array
        new_price:
          allOf:
            - $ref: '#/components/schemas/PriceInput'
          description: Full price replacement
          nullable: true
        product_id:
          description: Product ID (for standalone items)
          example: prod_abc123
          nullable: true
          type: string
        remove_items:
          description: Items to remove from the bundle
          items:
            $ref: '#/components/schemas/ChangeRemoveItemChild'
          type: array
      type: object
    ChangesAppliedResponse:
      properties:
        added:
          description: Products or bundles added
          items:
            $ref: '#/components/schemas/ChangeItemRef'
          type: array
        removed:
          description: Products or bundles removed
          items:
            $ref: '#/components/schemas/ChangeItemRef'
          type: array
        updated:
          description: Products or bundles updated
          items:
            $ref: '#/components/schemas/ChangeItemRef'
          type: array
      required:
        - added
        - removed
        - updated
      type: object
    ChangeAddItemChild:
      properties:
        new_price:
          allOf:
            - $ref: '#/components/schemas/PriceInput'
          description: Price definition
        product_id:
          description: Product ID
          example: prod_abc123
          type: string
      required:
        - new_price
        - product_id
      type: object
    PriceInput:
      properties:
        billing_direction:
          description: Billing direction
          enum:
            - advance
            - arrears
          example: arrears
          type: string
        billing_frequency:
          description: Billing frequency (required for fixed fee type)
          enum:
            - recurring
            - one-off
          example: recurring
          nullable: true
          type: string
        billing_interval:
          description: Legacy named billing interval
          enum:
            - monthly
            - quarterly
            - semi_annual
            - yearly
          example: monthly
          type: string
        billing_interval_count:
          description: Positive count of BillingIntervalUnits per period
          example: 3
          format: int64
          nullable: true
          type: integer
        billing_interval_unit:
          description: Unit of the billing cadence (currently only 'month' accepted)
          enum:
            - day
            - week
            - month
            - year
          example: month
          nullable: true
          type: string
        charge_on_contract_start:
          description: Whether to charge on contract start
          example: false
          nullable: true
          type: boolean
        discount:
          allOf:
            - $ref: '#/components/schemas/DiscountInput'
          description: Price-level discount
          nullable: true
        display_order:
          description: Display order
          example: 1
          format: int64
          nullable: true
          type: integer
        expression_pricing_model:
          allOf:
            - $ref: '#/components/schemas/ExpressionPricingModelInput'
          description: Expression pricing model (required when type=expression)
          nullable: true
        fee_type:
          description: Fee type
          enum:
            - fixed
            - metered
          example: fixed
          type: string
        fixed_pricing_model:
          allOf:
            - $ref: '#/components/schemas/FixedPricingModelInput'
          description: Fixed pricing model (required when type=fixed)
          nullable: true
        graduated_percentage_pricing_model:
          allOf:
            - $ref: '#/components/schemas/GraduatedPercentagePricingModelInput'
          description: >-
            Graduated percentage pricing model (required when
            type=graduated_percentage)
          nullable: true
        graduated_tiered_pricing_model:
          allOf:
            - $ref: '#/components/schemas/GraduatedTieredPricingModelInput'
          description: Graduated tiered pricing model (required when type=graduated_tiered)
          nullable: true
        maximum_spend:
          allOf:
            - $ref: '#/components/schemas/SpendingThresholdInput'
          description: Maximum spend per period
          nullable: true
        metric_ids:
          description: Metric IDs (required for metered fee type)
          items:
            type: string
          type: array
        minimum_spend:
          allOf:
            - $ref: '#/components/schemas/SpendingThresholdInput'
          description: Minimum spend per period
          nullable: true
        prepaid_fixed_tiered_pricing_model:
          allOf:
            - $ref: '#/components/schemas/PrepaidFixedTieredPricingModelInput'
          description: >-
            Prepaid fixed tiered pricing model (required when
            type=prepaid_fixed_tiered)
          nullable: true
        prepaid_tiered_pricing_model:
          allOf:
            - $ref: '#/components/schemas/PrepaidTieredPricingModelInput'
          description: Prepaid tiered pricing model (required when type=prepaid_tiered)
          nullable: true
        recurring_instalment_interval_count:
          description: >-
            Positive count of RecurringInstalmentIntervalUnits per instalment;
            must divide cleanly into the billing interval
          example: 1
          format: int64
          nullable: true
          type: integer
        recurring_instalment_interval_unit:
          description: >-
            Optional sub-cadence unit splitting the advance charge into
            instalments within each billing cycle (currently only 'month'
            accepted)
          enum:
            - day
            - week
            - month
            - year
          example: month
          nullable: true
          type: string
        tiered_percentage_pricing_model:
          allOf:
            - $ref: '#/components/schemas/TieredPercentagePricingModelInput'
          description: >-
            Tiered percentage pricing model (required when
            type=tiered_percentage)
          nullable: true
        tiered_pricing_model:
          allOf:
            - $ref: '#/components/schemas/TieredPricingModelInput'
          description: Tiered pricing model (required when type=tiered)
          nullable: true
        trial_period_days:
          description: Trial period in days (minimum 1)
          example: 30
          format: int64
          nullable: true
          type: integer
        type:
          description: Pricing type
          enum:
            - unit
            - fixed
            - tiered
            - graduated_tiered
            - tiered_percentage
            - graduated_percentage
            - volume_percentage
            - prepaid_tiered
            - prepaid_fixed_tiered
            - expression
          example: fixed
          type: string
        unit_pricing_model:
          allOf:
            - $ref: '#/components/schemas/UnitPricingModelInput'
          description: Unit pricing model (required when type=unit)
          nullable: true
        volume_percentage_pricing_model:
          allOf:
            - $ref: '#/components/schemas/VolumePercentagePricingModelInput'
          description: >-
            Volume percentage pricing model (required when
            type=volume_percentage)
          nullable: true
      required:
        - billing_direction
        - fee_type
        - type
      type: object
    PriceAdjustInput:
      properties:
        billing_direction:
          description: Billing direction
          enum:
            - advance
            - arrears
          example: arrears
          nullable: true
          type: string
        billing_frequency:
          description: Billing frequency
          enum:
            - recurring
            - one-off
          example: recurring
          nullable: true
          type: string
        billing_interval:
          description: Billing interval
          enum:
            - monthly
            - quarterly
            - semi_annual
            - yearly
          example: monthly
          nullable: true
          type: string
        charge_on_contract_start:
          description: Whether to charge on contract start
          example: false
          nullable: true
          type: boolean
        discount:
          allOf:
            - $ref: '#/components/schemas/DiscountInput'
          description: Price-level discount (replaces entirely)
          nullable: true
        display_order:
          description: Display order
          example: 1
          format: int64
          nullable: true
          type: integer
        expression_pricing_model:
          allOf:
            - $ref: '#/components/schemas/ExpressionPricingModelAdjust'
          description: Expression pricing model adjustment (charges replaced entirely)
          nullable: true
        fee_type:
          description: Fee type
          enum:
            - fixed
            - metered
          example: fixed
          nullable: true
          type: string
        fixed_pricing_model:
          allOf:
            - $ref: '#/components/schemas/FixedPricingModelAdjust'
          description: Fixed pricing model adjustment
          nullable: true
        graduated_percentage_pricing_model:
          allOf:
            - $ref: '#/components/schemas/GraduatedPercentagePricingModelAdjust'
          description: Graduated percentage pricing model adjustment
          nullable: true
        graduated_tiered_pricing_model:
          allOf:
            - $ref: '#/components/schemas/GraduatedTieredPricingModelAdjust'
          description: Graduated tiered pricing model adjustment
          nullable: true
        maximum_spend:
          allOf:
            - $ref: '#/components/schemas/SpendingThresholdInput'
          description: Maximum spend per period
          nullable: true
        metric_ids:
          description: Metric IDs (replaces entirely)
          items:
            type: string
          type: array
        minimum_spend:
          allOf:
            - $ref: '#/components/schemas/SpendingThresholdInput'
          description: Minimum spend per period
          nullable: true
        prepaid_fixed_tiered_pricing_model:
          allOf:
            - $ref: '#/components/schemas/PrepaidFixedTieredPricingModelAdjust'
          description: Prepaid fixed tiered pricing model adjustment
          nullable: true
        prepaid_tiered_pricing_model:
          allOf:
            - $ref: '#/components/schemas/PrepaidTieredPricingModelAdjust'
          description: Prepaid tiered pricing model adjustment
          nullable: true
        tiered_percentage_pricing_model:
          allOf:
            - $ref: '#/components/schemas/TieredPercentagePricingModelAdjust'
          description: Tiered percentage pricing model adjustment
          nullable: true
        tiered_pricing_model:
          allOf:
            - $ref: '#/components/schemas/TieredPricingModelAdjust'
          description: Tiered pricing model adjustment (tiers replaced entirely)
          nullable: true
        trial_period_days:
          description: Trial period in days
          example: 30
          format: int64
          nullable: true
          type: integer
        unit_pricing_model:
          allOf:
            - $ref: '#/components/schemas/UnitPricingModelAdjust'
          description: Unit pricing model adjustment
          nullable: true
        volume_percentage_pricing_model:
          allOf:
            - $ref: '#/components/schemas/VolumePercentagePricingModelAdjust'
          description: Volume percentage pricing model adjustment
          nullable: true
      type: object
    ChangeUpdateItemChild:
      properties:
        adjust:
          allOf:
            - $ref: '#/components/schemas/PriceAdjustInput'
          description: Partial price adjustment
          nullable: true
        new_price:
          allOf:
            - $ref: '#/components/schemas/PriceInput'
          description: Full price replacement
          nullable: true
        product_id:
          description: Product ID
          example: prod_abc123
          type: string
      required:
        - product_id
      type: object
    ChangeRemoveItemChild:
      properties:
        product_id:
          description: Product ID to remove
          example: prod_abc123
          type: string
      required:
        - product_id
      type: object
    ChangeItemRef:
      properties:
        bundle_id:
          description: Bundle ID
          example: bun_abc123
          nullable: true
          type: string
        product_id:
          description: Product ID
          example: prod_abc123
          nullable: true
          type: string
      type: object
    DiscountInput:
      properties:
        amount:
          description: Discount amount
          example: '10'
          type: string
        duration_type:
          description: Duration type
          enum:
            - fixed
            - monthly_rolling
          example: fixed
          type: string
        duration_unit:
          description: Duration unit
          example: months
          nullable: true
          type: string
        duration_value:
          description: Duration value
          example: 6
          format: int64
          nullable: true
          type: integer
        type:
          description: Discount type (percentage only for subscription-level)
          example: percentage
          type: string
      required:
        - amount
        - duration_type
        - type
      type: object
    ExpressionPricingModelInput:
      properties:
        charges:
          description: Expression-based charges
          items:
            $ref: '#/components/schemas/ExpressionChargeInput'
          type: array
        metric_bindings:
          description: Alias-to-metric bindings referenced in expressions
          items:
            $ref: '#/components/schemas/MetricBinding'
          type: array
      required:
        - charges
      type: object
    FixedPricingModelInput:
      properties:
        price_per_unit:
          description: Price per unit
          example: '500.00'
          type: string
        units:
          description: Number of units
          example: 1
          format: int64
          type: integer
      required:
        - price_per_unit
        - units
      type: object
    GraduatedPercentagePricingModelInput:
      properties:
        tiers:
          description: Percentage-based pricing tiers
          items:
            $ref: '#/components/schemas/PercentageTierInput'
          type: array
      required:
        - tiers
      type: object
    GraduatedTieredPricingModelInput:
      properties:
        tiers:
          description: Pricing tiers
          items:
            $ref: '#/components/schemas/PricingTierInput'
          type: array
        units:
          description: Fixed quantity of units (for fixed fee type only)
          example: 10
          format: int64
          nullable: true
          type: integer
      required:
        - tiers
      type: object
    SpendingThresholdInput:
      properties:
        amount:
          description: Amount
          example: '500.00'
          type: string
        period:
          description: Billing period
          enum:
            - monthly
            - quarterly
            - semi_annual
            - yearly
          example: monthly
          type: string
      required:
        - amount
        - period
      type: object
    PrepaidFixedTieredPricingModelInput:
      properties:
        overages_charge_interval:
          description: Overage charge interval
          enum:
            - monthly
            - quarterly
            - semi_annual
            - yearly
          example: monthly
          type: string
        prepaid_units:
          description: Number of prepaid units
          example: 50000
          format: int64
          type: integer
        tiers:
          description: Overage pricing tiers
          items:
            $ref: '#/components/schemas/PricingTierInput'
          type: array
      required:
        - overages_charge_interval
        - prepaid_units
        - tiers
      type: object
    PrepaidTieredPricingModelInput:
      properties:
        prepaid_units:
          description: Number of prepaid units
          example: 50000
          format: int64
          type: integer
        tiers:
          description: Overage pricing tiers
          items:
            $ref: '#/components/schemas/PricingTierInput'
          type: array
      required:
        - prepaid_units
        - tiers
      type: object
    TieredPercentagePricingModelInput:
      properties:
        tiers:
          description: Percentage-based pricing tiers
          items:
            $ref: '#/components/schemas/PercentageTierInput'
          type: array
      required:
        - tiers
      type: object
    TieredPricingModelInput:
      properties:
        tiers:
          description: Pricing tiers
          items:
            $ref: '#/components/schemas/PricingTierInput'
          type: array
        units:
          description: Fixed quantity of units (for fixed fee type only)
          example: 10
          format: int64
          nullable: true
          type: integer
      required:
        - tiers
      type: object
    UnitPricingModelInput:
      properties:
        price_per_unit:
          description: Price per unit
          example: '0.05'
          type: string
      required:
        - price_per_unit
      type: object
    VolumePercentagePricingModelInput:
      properties:
        fixed_fee:
          description: Optional fixed fee
          example: '5.00'
          nullable: true
          type: string
        percentage:
          description: Percentage rate
          example: '2.0'
          type: string
        price_per_unit:
          description: Base price per unit
          example: '0.05'
          type: string
      required:
        - percentage
        - price_per_unit
      type: object
    ExpressionPricingModelAdjust:
      properties:
        charges:
          description: Expression-based charges (replaces entirely if provided)
          items:
            $ref: '#/components/schemas/ExpressionChargeInput'
          type: array
        metric_bindings:
          description: >-
            Alias-to-metric bindings referenced in expressions (replaces
            entirely if provided)
          items:
            $ref: '#/components/schemas/MetricBinding'
          type: array
      type: object
    FixedPricingModelAdjust:
      properties:
        price_per_unit:
          description: Price per unit
          example: '500.00'
          nullable: true
          type: string
        units:
          description: Number of units
          example: 1
          format: int64
          nullable: true
          type: integer
      type: object
    GraduatedPercentagePricingModelAdjust:
      properties:
        tiers:
          description: Percentage tiers (replaces entirely if provided)
          items:
            $ref: '#/components/schemas/PercentageTierInput'
          type: array
      type: object
    GraduatedTieredPricingModelAdjust:
      properties:
        tiers:
          description: Pricing tiers (replaces entirely if provided)
          items:
            $ref: '#/components/schemas/PricingTierInput'
          type: array
        units:
          description: Fixed quantity of units
          example: 10
          format: int64
          nullable: true
          type: integer
      type: object
    PrepaidFixedTieredPricingModelAdjust:
      properties:
        overages_charge_interval:
          description: Overage charge interval
          enum:
            - monthly
            - quarterly
            - semi_annual
            - yearly
          example: monthly
          nullable: true
          type: string
        prepaid_units:
          description: Number of prepaid units
          example: 50000
          format: int64
          nullable: true
          type: integer
        tiers:
          description: Overage pricing tiers (replaces entirely if provided)
          items:
            $ref: '#/components/schemas/PricingTierInput'
          type: array
      type: object
    PrepaidTieredPricingModelAdjust:
      properties:
        prepaid_units:
          description: Number of prepaid units
          example: 50000
          format: int64
          nullable: true
          type: integer
        tiers:
          description: Overage pricing tiers (replaces entirely if provided)
          items:
            $ref: '#/components/schemas/PricingTierInput'
          type: array
      type: object
    TieredPercentagePricingModelAdjust:
      properties:
        tiers:
          description: Percentage tiers (replaces entirely if provided)
          items:
            $ref: '#/components/schemas/PercentageTierInput'
          type: array
      type: object
    TieredPricingModelAdjust:
      properties:
        tiers:
          description: Pricing tiers (replaces entirely if provided)
          items:
            $ref: '#/components/schemas/PricingTierInput'
          type: array
        units:
          description: Fixed quantity of units
          example: 10
          format: int64
          nullable: true
          type: integer
      type: object
    UnitPricingModelAdjust:
      properties:
        price_per_unit:
          description: Price per unit
          example: '0.05'
          nullable: true
          type: string
      type: object
    VolumePercentagePricingModelAdjust:
      properties:
        fixed_fee:
          description: Optional fixed fee
          example: '5.00'
          nullable: true
          type: string
        percentage:
          description: Percentage rate
          example: '2.0'
          nullable: true
          type: string
        price_per_unit:
          description: Base price per unit
          example: '0.05'
          nullable: true
          type: string
      type: object
    ExpressionChargeInput:
      properties:
        billing_direction:
          description: Billing direction
          enum:
            - advance
            - arrears
          example: arrears
          type: string
        description:
          description: Charge description
          example: API usage charge
          type: string
        quantity_expression:
          description: Expression for quantity
          example: usage.api_calls
          type: string
        unit_price_expression:
          description: Expression for unit price
          example: '0.01'
          type: string
      required:
        - billing_direction
        - description
        - quantity_expression
        - unit_price_expression
      type: object
    MetricBinding:
      properties:
        alias:
          description: Alias referenced in charge expressions
          example: api_calls
          type: string
        metric_id:
          description: Metric ID bound to the alias
          type: string
      required:
        - alias
        - metric_id
      type: object
    PercentageTierInput:
      properties:
        fixed_fee:
          description: Fixed fee
          example: '10.00'
          nullable: true
          type: string
        max_units:
          description: Upper bound (null = unlimited)
          example: 10000
          format: int64
          nullable: true
          type: integer
        min_units:
          description: Lower bound of the tier (inclusive)
          example: 0
          format: int64
          type: integer
        percentage:
          description: Percentage rate
          example: '2.5'
          nullable: true
          type: string
      required:
        - min_units
      type: object
    PricingTierInput:
      properties:
        fixed_fee:
          description: Fixed fee for this tier
          example: '10.00'
          nullable: true
          type: string
        max_units:
          description: Upper bound (null = unlimited)
          example: 10000
          format: int64
          nullable: true
          type: integer
        min_units:
          description: Lower bound of the tier (inclusive)
          example: 0
          format: int64
          type: integer
        price_per_unit:
          description: Price per unit
          example: '0.02'
          nullable: true
          type: string
      required:
        - min_units
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http

````