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

# Update a subscription item.

> Updates the subscription item. Provided values in payload will be updated.

<sup>Required permissions: `subscription:write`</sup>



## OpenAPI

````yaml patch /subscription-items/{id}
openapi: 3.1.0
info:
  title: Fynn API
  description: ''
  termsOfService: https://www.fynn.eu/tos
  contact:
    name: Fynn UG (haftungsbeschränkt)
    url: https://www.fynn.eu
    email: hi@fynn.eu
  license:
    name: Proprietary
    url: https://www.fynn.eu/license
  version: 0.0.0
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - JWT: []
tags: []
paths:
  /subscription-items/{id}:
    parameters: []
    patch:
      tags:
        - SubscriptionItem
      summary: Update a subscription item.
      description: >-
        Updates the subscription item. Provided values in payload will be
        updated.


        <sup>Required permissions: `subscription:write`</sup>
      operationId: updateSubscriptionItem
      parameters:
        - name: id
          in: path
          description: SubscriptionItem identifier
          required: true
          deprecated: false
          schema:
            type: string
          style: simple
          explode: false
      requestBody:
        description: The updated SubscriptionItem resource
        content:
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SubscriptionItem.UpdateSubscriptionItem-SubscriptionItemUpdate
          application/vnd.api+json:
            schema:
              $ref: >-
                #/components/schemas/SubscriptionItem.UpdateSubscriptionItem-SubscriptionItemUpdate
        required: true
      responses:
        '200':
          description: SubscriptionItem resource updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionItem-SubscriptionItemRead'
            text/html:
              schema:
                $ref: '#/components/schemas/SubscriptionItem-SubscriptionItemRead'
          links: {}
        '400':
          description: Invalid input
        '404':
          description: Resource not found
        '422':
          description: Unprocessable entity
      deprecated: false
      security:
        - JWT:
            - subscription:write
components:
  schemas:
    SubscriptionItem.UpdateSubscriptionItem-SubscriptionItemUpdate:
      type: object
      description: ''
      deprecated: false
      required:
        - name
      properties:
        name:
          maxLength: 255
          description: >-
            The name of the item which will be used in the invoice. The name is
            translated based on the customer's locale.
          example: Fitness M
          type: string
        description:
          maxLength: 5000
          description: >-
            The description of the item which will be used in the invoice. The
            description is translated based on the customer's locale.
          example: Everything included
          type:
            - string
            - 'null'
        furtherInformation:
          maxLength: 5000
          description: >-
            Further information defines additional information for the item
            which will be displayed in the invoice.
          example: 'Additional agreements: The contract includes a free drink flatrate.'
          type:
            - string
            - 'null'
        periods:
          description: >-
            The contract period terms of the subscription item. If empty, it is
            always cancelable.
          type: array
          items:
            $ref: >-
              #/components/schemas/ContractPeriodTermInput-SubscriptionItemUpdate
    SubscriptionItem-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          example: 01F9ZQZJZJQZJZJZJZJZJZJZJZ
          type: string
        parent:
          readOnly: true
          description: >-
            The parent item of the item. If this is null, the item is a root
            item.
          anyOf:
            - $ref: '#/components/schemas/SubscriptionItem-SubscriptionItemRead'
            - type: 'null'
        plan:
          readOnly: true
          description: The plan this item is based on.
          anyOf:
            - $ref: '#/components/schemas/Plan-SubscriptionItemRead'
            - type: 'null'
        measurementValues:
          readOnly: true
          description: Usage values during the subscription item period.
          type: array
          items:
            $ref: '#/components/schemas/MeasurementValue-SubscriptionItemRead'
        billing:
          $ref: '#/components/schemas/Billing-SubscriptionItemRead'
          readOnly: true
          description: The billing details of the item.
        name:
          readOnly: true
          description: >-
            The name of the item which will be used in the invoice. The name is
            translated based on the customer's locale.
          example: Fitness M
          type: string
        description:
          readOnly: true
          description: >-
            The description of the item which will be used in the invoice. The
            description is translated based on the customer's locale.
          example: Everything included
          type:
            - string
            - 'null'
        furtherInformation:
          readOnly: true
          description: >-
            Further information defines additional information for the item
            which will be displayed in the invoice.
          example: 'Additional agreements: The contract includes a free drink flatrate.'
          type:
            - string
            - 'null'
        pricePlan:
          readOnly: true
          description: >-
            The price plan of the item, which defines the price and billing
            interval.
          anyOf:
            - $ref: '#/components/schemas/PricePlan-SubscriptionItemRead'
            - type: 'null'
        status:
          readOnly: true
          description: |-
            The status of the item.

            Possible values:
             * `active`: The item is active and will be billed.
             * `canceled`: The item is canceled and will be billed until the end of the contract.
             * `pending`: The item is pending and will be billed after the contract start.
             * `terminated`: The item is terminated and will not be billed.
          example: active
          enum:
            - active
            - canceled
            - pending
            - terminated
        product:
          readOnly: true
          description: The product of the item.
          anyOf:
            - $ref: '#/components/schemas/Product-SubscriptionItemRead'
            - type: 'null'
        appliedDiscounts:
          readOnly: true
          type: array
          items:
            $ref: >-
              #/components/schemas/SubscriptionItemAppliedDiscount-SubscriptionItemRead
        periods:
          type: array
          items:
            $ref: '#/components/schemas/TermPeriod-SubscriptionItemRead'
        activatedAt:
          readOnly: true
          description: The date the subscription item was activated.
          example: '2021-01-01T00:00:00+00:00'
          type:
            - string
            - 'null'
          format: date-time
        type:
          readOnly: true
          description: |-
            The type of the item.

            Possible values:
             * `option`: The item is an product set option.
             * `charge`: The item is a charge.
             * `plan-product`: The item is a plan product.
             * `product`: The item is a product, and not created from a plan.
          example: addon
          enum:
            - addon
            - charge
            - plan-product
            - product
        currentMeasurementValue:
          readOnly: true
          description: The current measurement value of the item.
          anyOf:
            - $ref: '#/components/schemas/MeasurementValue-SubscriptionItemRead'
            - type: 'null'
        inheritedPeriod:
          readOnly: true
          description: Is the period inherited from the subscription?
          example: true
          type: boolean
    ContractPeriodTermInput-SubscriptionItemUpdate:
      type: object
      description: ''
      deprecated: false
      required:
        - contractPeriod
        - cancellationPeriod
      properties:
        contractPeriod:
          $ref: '#/components/schemas/Interval-SubscriptionItemUpdate'
          description: The contract period of the subscription.
          example: 1M
        cancellationPeriod:
          $ref: '#/components/schemas/Interval-SubscriptionItemUpdate'
          description: The cancellation period of the subscription.
          example: 1M
    Plan-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          description: The unique identifier of the plan.
          example: ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b
          type: string
        family:
          description: >-
            Allow to group plans together. This allows to upgrade or downgrade
            between plans in the same family.
          anyOf:
            - $ref: '#/components/schemas/PlanFamily-SubscriptionItemRead'
            - type: 'null'
        code:
          description: >-
            The code of the plan. This is used to identify the plan e.g. in the
            checkout url.
          example: basic-m2023
          type: string
        originProduct:
          readOnly: true
          description: >-
            The origin product this plan belongs to. This is relevant for
            advanced analytics.
          anyOf:
            - $ref: '#/components/schemas/Product-SubscriptionItemRead'
            - type: 'null'
        allowCheckout:
          description: >-
            Allow to checkout this plan. If this is set to false, the plan will
            not be available in the checkout and can only be assigned to a
            subscription by the API or in the admin panel. The plan.code is a
            part of the checkout url.
          default: true
          example: true
          type: boolean
        status:
          readOnly: true
          description: |-
            The status of the plan.

            Possible values:
             * `draft`: The plan is a draft and not available for usage in a subscription.
             * `active`: The plan is active and can be used in a subscription.
             * `archived`: The plan is archived and not longer available for usage in a subscription.
             * `inactive`: The plan is inactive and not available for usage in a subscription.
          default: draft
          example: draft
        createdAt:
          type: string
          format: date-time
        name:
          readOnly: true
          description: The name of this plan
          type: string
        description:
          readOnly: true
          description: The description of this plan
          type:
            - string
            - 'null'
    MeasurementValue-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          example: ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b
          type: string
        measurement:
          $ref: '#/components/schemas/Measurement-SubscriptionItemRead'
          description: The measurement of the item.
        quantity:
          $ref: '#/components/schemas/Quantity-SubscriptionItemRead'
          description: The tracked and measured quantity of the item.
          example: 1
        measuredAt:
          description: The date and time when the measurement was taken.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
    Billing-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      properties:
        lastBilledAt:
          readOnly: true
          type:
            - string
            - 'null'
          format: date-time
        lastBilledTo:
          readOnly: true
          type:
            - string
            - 'null'
          format: date-time
        lastBilledFrom:
          readOnly: true
          type:
            - string
            - 'null'
          format: date-time
        nextBillingAt:
          readOnly: true
          type:
            - string
            - 'null'
          format: date-time
        billingInterval:
          description: |
            The billing interval of the item.
            If the value is null, the item is billed only once (one-time).
            If the value is not null, the item is billed periodically.
            The value is a string in the following format: [number][unit]
            The unit can be one of the following: H, D, W, M, Y
          example: 1M
          anyOf:
            - $ref: '#/components/schemas/BillingInterval-SubscriptionItemRead'
            - type: 'null'
    PricePlan-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          description: The unique identifier of the price plan.
          example: ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b
          type: string
        internalName:
          minLength: 3
          maxLength: 255
          description: The internal name of the price plan.
          example: Exclusive pricing for partners.
          type:
            - string
            - 'null'
        status:
          readOnly: true
          description: |-
            The status of the price plan.

            Possible values:
             * `active`: The price is active and can be used.
             * `archived`: The price is archived and cannot be used anymore. It will be not shown in any lists until explicitly requested.
          default: active
          example: active
        type:
          description: |-
            The type of the charge. This defines how the price is calculated.

            Possible values:
             * `flat_fee`: A flat fee is charged, e.g. 10€ per month independent of the number of units.
             * `volume`: A volume based price is charged, e.g. 10€ for the first 10 units and 9€ for all units when the number of units is above 10. Useful for volume discounts.
             * `percentage`: A percentage of the total price is charged, e.g. 10% of the total price multiplied by the number of units. Useful for provisions.
             * `per_unit`: A price per unit is charged, e.g. 10€ per unit per billing interval. Useful for per seat based pricing.
             * `tiered`: A tiered price is charged. E.g. 10€ per unit for the first 10 units, 9€ per unit for the next 10 units and 8€ per unit for all units above 20.
             * `stair_step`: A stair step price is charged. E.g. 10€ per unit for the first 10 units, 9€ per unit for all units above 10.
          example: flat_fee
        applyTrial:
          description: >-
            If this is set to true, the price plan can be applied on a trial. If
            the product is in trial, and this is false, the price will be
            charged on subscription start, otherwise after trial.
          default: true
          example: true
          type: boolean
        payInAdvance:
          description: >-
            If this is set to true, the price will be charged in advance. If
            this is false, the price will be charged at the end of the billing
            interval.
          default: true
          example: true
          type:
            - boolean
            - 'null'
        proRata:
          description: >-
            If this is set to true, the price will be charged prorated when a
            partial billing interval is billed. This applies to measurements of
            type "recurring" or non-one-time billing intervals. For other
            measurements this parameter will be ignored.
          type: boolean
        freeUnits:
          description: >-
            The amount of free units. If null, no free units are available. Free
            units will be applied before passed to the price calculation and are
            available prorated.

            If the customer does not uses the free units during a billing
            period, they are not carried over to the next billing period.

            If the customer cancels the subscription before ending the billing
            period, the free units are only available prorated for the remaining
            billing period.



            **Example**: You offer 2400 free units for 12 months and your price
            has a billing interval for 1 month. The customer cancels after 6
            months. Only 1200 free units are available.


            **A price plan for a recurring product cannot have free units. Use a
            metered product instead.**


            **A price plan related to a product of type charge cannot have free
            units.**
          anyOf:
            - $ref: '#/components/schemas/Quantity-SubscriptionItemRead'
            - type: 'null'
        billingInterval:
          description: >-
            The billing interval of the price plan. If null, this is a one-time
            charge.

            Billing intervals of null cannot be prorated.
          example: 1M
          anyOf:
            - $ref: '#/components/schemas/BillingInterval-SubscriptionItemRead'
            - type: 'null'
        showPricePerInterval:
          description: >-
            Display the billed price per interval in customerfront or invoices.
            If null, the price will be shown per billing interval.

            Currently only available for billing intervals of months, years.
            Currently only allowed to show price per month (1M)
          example: 1M
          anyOf:
            - $ref: '#/components/schemas/Interval-SubscriptionItemRead'
            - type: 'null'
        price:
          description: The price in the defined billing interval.
          type: object
          oneOf:
            - $ref: '#/components/schemas/FlatFeePrice'
              title: Flat fee
            - $ref: '#/components/schemas/PercentagePrice'
              title: Percentage
            - $ref: '#/components/schemas/PerUnitPrice'
              title: Per unit
            - $ref: '#/components/schemas/TieredPrice'
              title: Tiered
        custom:
          readOnly: true
          description: >-
            If this price plan is a custom price plan. A price plan is custom if
            it is defined specific for a plan addon, plan charge, customer or
            sales channel.
          example: true
          type: boolean
        charge:
          $ref: '#/components/schemas/PlanCharge-SubscriptionItemRead'
          description: The charge related to this price plan.
          example: ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b
        productSetOption:
          $ref: '#/components/schemas/PlanProductSetOption-SubscriptionItemRead'
          description: The product set option related to this price plan.
          example: ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b
        inUse:
          readOnly: true
          description: If this price plan is in use.
          example: true
          type: boolean
      required:
        - type
        - price
    Product-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          description: The unique identifier of the product.
          example: ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b
          type: string
        name:
          description: >-
            The name of the product based on the current tenant language. This
            will be displayed on customer communication.
          example: Basic
          type: string
        description:
          description: The description of the product based on the current tenant language.
          example: For small teams.
          type:
            - string
            - 'null'
        internalName:
          description: >-
            Internal name of the product, to differentiate between products with
            the same name. This will shown in web-app lists, selections and
            reports.
          example: Basic (Weekly)
          type:
            - string
            - 'null'
        type:
          description: |
            The type of the product.
             - `product`: recurring billed product
             - `charge`: one-time billing
             - `plan`: plan specific product, which cannot be used as a normal product. Will be filtered out in any product lists.
          type: string
          enum:
            - product
            - charge
            - plan
        measurement:
          $ref: '#/components/schemas/Measurement-SubscriptionItemRead'
          description: >-
            The measurement that is used for the price plan. This could define
            the quantity or a metered usage.
        invoiceVisibility:
          description: |
            Defines when the product should be displayed in the invoice.
             - `always`: The product is always displayed in the invoice.
             - `only_if_charged`: The product is only displayed in the invoice if it is charged.
          type: string
          enum:
            - always
            - only_if_charged
        costCentre:
          description: The cost centre is used for accounting exports.
          anyOf:
            - $ref: '#/components/schemas/CostCentre-SubscriptionItemRead'
            - type: 'null'
        taxGroup:
          $ref: '#/components/schemas/TaxGroup-SubscriptionItemRead'
          description: The tax group that is used for the product.
        customFields:
          additionalProperties:
            type: string
          type:
            - object
            - 'null'
          example:
            field1: value1
            field2: value2
          description: >-
            Custom fields for the entity. The keys are the field names and the
            values are the field values. They need to be configured under
            \"/custom-fields\" in the API documentation. The input is validated
            against the configuration. For more details see [Custom Fields
            Guide](/guide/tenant/custom-fields)
      required:
        - type
        - measurement
        - taxGroup
    SubscriptionItemAppliedDiscount-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          type: string
        coupon:
          readOnly: true
          anyOf:
            - $ref: '#/components/schemas/Coupon-SubscriptionItemRead'
            - type: 'null'
        status:
          readOnly: true
          description: |-
            The status of this applied discount.

            Possible values:
             * `active`: The discount is active and will be applied to the subscription item.
             * `completed`: The discount is not active anymore, but it was applied to the subscription item.
             * `removed`: The discount was removed from the subscription item.
          example: active
        discount:
          $ref: '#/components/schemas/Discount-SubscriptionItemRead'
          readOnly: true
          description: The discount that is applied to the subscription item.
        appliedIntervals:
          readOnly: true
          description: >-
            The number of intervals this discount was applied to the
            subscription item.
          example: 1
          type:
            - integer
            - 'null'
    TermPeriod-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          type: string
        contractPeriodCount:
          readOnly: true
          type: integer
        contractPeriod:
          $ref: '#/components/schemas/Interval-SubscriptionItemRead'
          readOnly: true
        cancellationPeriod:
          $ref: '#/components/schemas/Interval-SubscriptionItemRead'
          readOnly: true
        createdAt:
          readOnly: true
          type: string
          format: date-time
        updatedAt:
          readOnly: true
          type: string
          format: date-time
    Interval-SubscriptionItemUpdate:
      type: object
      description: ''
      deprecated: false
      properties:
        interval:
          description: The interval as string, e.g. 1, 2, 3
          type: string
        unit:
          description: |-


            Possible values:
             * `S`: Second
             * `I`: Minute
             * `H`: Hour
             * `D`: Day
             * `W`: Week
             * `M`: Month
             * `Y`: Year
    PlanFamily-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          example: ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b
          type: string
    Measurement-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          description: A unique identifier for the measurement.
          example: ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b
          type: string
        unit:
          description: The unit of the measurement.
          anyOf:
            - $ref: '#/components/schemas/Unit-SubscriptionItemRead'
            - type: 'null'
        code:
          minLength: 1
          maxLength: 255
          description: A unique code which can be used to identify the measurement.
          example: users
          type: string
        description:
          maxLength: 255
          description: >-
            A description of the measurement, which is shown in the summary of
            the usage data in the invoice.
          example: The number of users.
          type:
            - string
            - 'null'
        aggregationType:
          description: >-
            The aggregation type of the measurement. Describes how the quantity
            is calculated. This cannot be changed after creation, otherwise it
            would change the whole calculation for existing subscriptions.


            Possible values:
             * `count`: The number of sent measurements in the billing interval. Metered usage, which resets to 0 after each billing interval.
             * `count_unique`: The number of unique sent measurements in the billing interval, identified by the id given on event creation.
             * `max`: The maximum value of all sent measurements in the billing interval. Metered usage, which resets to 0 after each billing interval.
             * `sum`: The sum of all sent measurements in the billing interval.
             * `last_value`: The last sent measurement.
             * `average`: The average of all sent measurements in the billing interval.
          default: last_value
          example: sum
        fairBilling:
          description: >-
            If set to false, the measurement will be billed for the whole
            billing interval, even if the quantity changes, or the item is
            cancelled / terminated during the billing interval.
          default: true
          example: true
          type: boolean
        type:
          description: >-
            The type of the measurement. This cannot be changed after creation,
            otherwise it would change the whole calculation for existing
            subscriptions.


            Possible values:
             * `instant_metered`: The measurement value is reset to 0 after each push. The measurement gets billed immediately and an invoice is created. The aggregation type must be "last_value".
             * `metered`: The measurement value is reset to 0 after each billing interval.
             * `recurring`: The measurement value is not reset to 0 after each billing interval and the last value is used for all following billing intervals. The aggregation type must be "last_value".
          default: recurring
          example: recurring
      required:
        - unit
        - code
    Quantity-SubscriptionItemRead:
      type:
        - number
        - 'null'
      description: A numeric quantity value.
      example: 1
    BillingInterval-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
    Interval-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
    FlatFeePrice:
      type: object
      description: ''
      deprecated: false
      required:
        - amount
      properties:
        amount:
          description: The amount of the flat fee per unit
          type: number
        createdAt:
          readOnly: true
          description: The date and time when the resource was created.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        updatedAt:
          readOnly: true
          description: The date and time when the resource was last updated.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        tenantId:
          readOnly: true
          type: string
      title: Flat fee
    PercentagePrice:
      type: object
      description: ''
      deprecated: false
      required:
        - percentage
        - fixedAmount
        - freeUnitsPerEvent
        - freeUnitsPerBillingInterval
      properties:
        percentage:
          description: The percentage of the total amount that is charged.
          type: number
        fixedAmount:
          description: >-
            The fixed amount that is charged per unit, metered in the billing
            period. E.g. on pushing 1000 units, the fixed amount is charged 1000
            times * percentage
          type: number
        freeUnitsPerEvent:
          description: The number of units that are not subject to the fixed fee.
          type: integer
        freeUnitsPerBillingInterval:
          description: The amount that is not subject to the charge rate.
          type: number
        createdAt:
          readOnly: true
          description: The date and time when the resource was created.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        updatedAt:
          readOnly: true
          description: The date and time when the resource was last updated.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        tenantId:
          readOnly: true
          type: string
      title: Percentage
    PerUnitPrice:
      type: object
      description: ''
      deprecated: false
      required:
        - amount
      properties:
        amount:
          description: The amount of money per unit
          example: 0.99
          type: number
        createdAt:
          readOnly: true
          description: The date and time when the resource was created.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        updatedAt:
          readOnly: true
          description: The date and time when the resource was last updated.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        tenantId:
          readOnly: true
          type: string
      title: Per unit
    TieredPrice:
      type: object
      description: ''
      deprecated: false
      required:
        - items
      properties:
        items:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/TierItem'
        createdAt:
          readOnly: true
          description: The date and time when the resource was created.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        updatedAt:
          readOnly: true
          description: The date and time when the resource was last updated.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        tenantId:
          readOnly: true
          type: string
      title: Tiered
    PlanCharge-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          description: The unique identifier of the plan product.
          type: string
        product:
          $ref: '#/components/schemas/Product-SubscriptionItemRead'
          readOnly: true
          description: The product this addon belongs to.
        onEvent:
          description: >-
            The event on which the charge should be applied. Defaults to
            ON_SUBSCRIPTION_START.


            Possible values:
             * `on_subscription_start`: The charge is applied when the subscription starts.
             * `on_subscription_end`: The charge is applied when the subscription ends.
             * `on_subscription_trial_start`: The charge is applied when the subscription trial starts.
             * `on_subscription_trial_end`: The charge is applied when the subscription trial ends.
             * `on_checkout_payment`: The charge is applied when the checkout payment is made.
          default: on_subscription_start
          example: on_subscription_start
        onceOnEvent:
          description: >-
            Whether the charge should only be applied once on the event.
            Defaults to false.
          type: boolean
    PlanProductSetOption-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          description: The unique identifier of the product set option.
          example: ad8f1c2c-3b1c-4b0a-8b0a-0b0b0b0b0b0b
          type: string
        product:
          $ref: '#/components/schemas/Product-SubscriptionItemRead'
          description: The product this option belongs to.
    CostCentre-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
    TaxGroup-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
    Coupon-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          description: The id of this coupon.
          type: string
        code:
          description: >-
            The code that can be used to apply this coupon or to use it with the
            api.
          example: 10OFF
          type: string
        name:
          description: >-
            The name of this coupon, which will be displayed to the user in the
            checkout process, customer front, etc.
          example: 10% off
          type: string
        type:
          description: |-
            The type of this coupon.

            Possible values:
             * `percentage`: A percentage will be taken off the total plan amount.
             * `fixed_amount`: A fixed amount will be taken off the total plan amount. It will never go below 0.
          example: percentage
        percentage:
          minimum: 0
          maximum: 100
          description: >-
            The percentage this coupon should apply. **Required for type
            `percentage`.**
          example: 10
          type:
            - integer
            - 'null'
        fixedAmount:
          $ref: '#/components/schemas/MoneyEmbeddedDefaultNull-SubscriptionItemRead'
          description: >-
            The fixed amount this coupon should apply. **Required for type
            `fixed_amount`.**
        frequency:
          description: |-
            The frequency at which a coupon should be applied.

            Possible values:
             * `once`: The coupon will be applied once for the first billing period.
             * `limited`: The coupon will be applied for a limited number of billing periods.
             * `lifetime`: The coupon will be applied forever.
          example: limited
        frequencyInterval:
          description: >-
            The number of billing periods the coupon will be applied for.
            **Required for frequency `limited`.**
          example: 3
          type:
            - integer
            - 'null'
        maxRedemptionsPerCustomer:
          description: >-
            The number of times this coupon can be redeemed by a customer. If
            null, there is no limit.
          default: 'null'
          example: 'null'
          type:
            - integer
            - 'null'
        maxRedemptions:
          description: >-
            The number of times this coupon can be redeemed in total. If null,
            there is no limit.
          default: 'null'
          example: 'null'
          type:
            - integer
            - 'null'
        expiresAt:
          description: >-
            The date and time this coupon will expire. If null, there is no
            expiration date.
          default: 'null'
          example: 'null'
          type:
            - string
            - 'null'
          format: date-time
        limitedToPlans:
          description: The plans this coupon should be applied to.
          type: array
          items:
            $ref: '#/components/schemas/Plan-SubscriptionItemRead'
        excludedFromPlans:
          description: The plans this coupon should not be applied to.
          type: array
          items:
            $ref: '#/components/schemas/Plan-SubscriptionItemRead'
        limitedToProducts:
          description: The products this coupon should be applied to.
          type: array
          items:
            $ref: '#/components/schemas/Product-SubscriptionItemRead'
        excludedFromProducts:
          description: The products this coupon should not be applied to.
          type: array
          items:
            $ref: '#/components/schemas/Product-SubscriptionItemRead'
        isEnabled:
          description: Whether this coupon is enabled or not.
          default: true
          example: true
          type: boolean
        reedemptions:
          readOnly: true
          description: >-
            Has this coupon been redeemed by a customer? If yes, it cannot be
            edited or deleted anymore.
          type: boolean
      required:
        - code
        - name
        - type
        - frequency
    Discount-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      required:
        - name
        - type
        - frequency
      properties:
        name:
          description: >-
            The name of this coupon, which will be displayed to the user in the
            checkout process, customer front, etc.
          example: 10% off
          type: string
        type:
          description: |-
            The type of this coupon.

            Possible values:
             * `percentage`: A percentage will be taken off the total plan amount.
             * `fixed_amount`: A fixed amount will be taken off the total plan amount. It will never go below 0.
          example: percentage
        percentage:
          minimum: 0
          maximum: 100
          description: >-
            The percentage this coupon should apply. **Required for type
            `percentage`.**
          example: 10
          type:
            - integer
            - 'null'
        fixedAmount:
          $ref: '#/components/schemas/MoneyEmbeddedDefaultNull-SubscriptionItemRead'
          description: >-
            The fixed amount this coupon should apply. **Required for type
            `fixed_amount`.**
        frequency:
          description: |-
            The frequency at which a coupon should be applied.

            Possible values:
             * `once`: The coupon will be applied once for the first billing period.
             * `limited`: The coupon will be applied for a limited number of billing periods.
             * `lifetime`: The coupon will be applied forever.
          example: limited
        frequencyInterval:
          description: >-
            The number of billing periods the coupon will be applied for.
            **Required for frequency `limited`.**
          example: 3
          type:
            - integer
            - 'null'
    Unit-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          $ref: '#/components/schemas/UnitId-SubscriptionItemRead'
          readOnly: true
        name:
          example: Stück
          type: string
    TierItem:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          type: string
        from:
          description: The lower bound of the tier
          type: number
        amount:
          description: The amount of the tier per unit
          type: number
        flatAmount:
          description: >-
            The flat amount of the tier, billed once in addition to the amount
            per unit in a billing period
          type: number
        createdAt:
          readOnly: true
          description: The date and time when the resource was created.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        updatedAt:
          readOnly: true
          description: The date and time when the resource was last updated.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        tenantId:
          readOnly: true
          type: string
      required:
        - from
        - amount
        - flatAmount
    MoneyEmbeddedDefaultNull-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
    UnitId-SubscriptionItemRead:
      type: object
      description: ''
      deprecated: false
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````