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

# Setup a PricingModel



## OpenAPI

````yaml https://app.flowglad.com/api/openapi post /api/v1/pricing-models/setup
openapi: 3.1.0
info:
  title: Flowglad API
  version: 0.0.1
servers:
  - url: https://app.flowglad.com
security: []
externalDocs:
  url: https://docs.flowglad.com
paths:
  /api/v1/pricing-models/setup:
    post:
      tags:
        - Pricing Models
      summary: Setup a PricingModel
      operationId: pricingModels-setup
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                isDefault:
                  description: >-
                    Whether the pricingModel to be created will be the default
                    pricingModel for all customers moving forward.
                  default: false
                  type: boolean
                name:
                  description: The name of the pricing model
                  type: string
                  minLength: 1
                  maxLength: 255
                features:
                  type: array
                  items:
                    description: >-
                      A feature that can be granted to a customer. Will be
                      associated with products.
                    oneOf:
                      - description: >-
                          A feature that can be granted in a true / false
                          boolean state. When granted to a customer, it will
                          return true.
                        type: object
                        properties:
                          type:
                            type: string
                            const: toggle
                          slug:
                            type: string
                            minLength: 1
                            maxLength: 255
                          name:
                            type: string
                          description:
                            type: string
                          active:
                            type: boolean
                        required:
                          - type
                          - slug
                          - name
                          - description
                      - description: A credit grant to give for a usage meter.
                        type: object
                        properties:
                          type:
                            type: string
                            const: usage_credit_grant
                          slug:
                            type: string
                            minLength: 1
                            maxLength: 255
                          name:
                            type: string
                          description:
                            type: string
                          amount:
                            description: A positive integer
                            type: integer
                            exclusiveMinimum: 0
                            maximum: 9007199254740991
                          renewalFrequency:
                            type: string
                            enum:
                              - once
                              - every_billing_period
                          active:
                            type: boolean
                          usageMeterSlug:
                            description: >-
                              The slug of the usage meter to grant credit for.
                              Must be a valid slug for a usage meter.
                            type: string
                        required:
                          - type
                          - slug
                          - name
                          - description
                          - amount
                          - renewalFrequency
                          - usageMeterSlug
                      - description: >-
                          A resource grant feature that allocates a specific
                          amount of a resource.
                        type: object
                        properties:
                          type:
                            type: string
                            const: resource
                          slug:
                            type: string
                            minLength: 1
                            maxLength: 255
                          name:
                            type: string
                          description:
                            type: string
                          amount:
                            description: A positive integer
                            type: integer
                            exclusiveMinimum: 0
                            maximum: 9007199254740991
                          active:
                            type: boolean
                          resourceSlug:
                            description: >-
                              The slug of the resource to grant. Must be a valid
                              slug for a resource in this pricing model.
                            type: string
                        required:
                          - type
                          - slug
                          - name
                          - description
                          - amount
                          - resourceSlug
                    type: object
                products:
                  type: array
                  items:
                    type: object
                    properties:
                      product:
                        description: >-
                          The product to add to the pricingModel. Must be a
                          subset of the products in the pricingModel.
                        type: object
                        properties:
                          name:
                            description: The name of the product
                            type: string
                            minLength: 1
                            maxLength: 255
                          description:
                            anyOf:
                              - type: string
                              - type: 'null'
                          imageURL:
                            anyOf:
                              - type: string
                              - type: 'null'
                          active:
                            type: boolean
                          singularQuantityLabel:
                            anyOf:
                              - type: string
                              - type: 'null'
                          pluralQuantityLabel:
                            anyOf:
                              - type: string
                              - type: 'null'
                          default:
                            type: boolean
                          slug:
                            description: The slug of the product
                            type: string
                            minLength: 1
                            maxLength: 255
                        required:
                          - name
                          - active
                          - slug
                      price:
                        description: >-
                          The price for the product. Must have active=true and
                          isDefault=true.
                        oneOf:
                          - type: object
                            properties:
                              intervalUnit:
                                type: string
                                enum:
                                  - day
                                  - week
                                  - month
                                  - year
                              name:
                                type: string
                                minLength: 1
                                maxLength: 255
                              intervalCount:
                                description: A positive integer
                                type: integer
                                exclusiveMinimum: 0
                                maximum: 9007199254740991
                              type:
                                type: string
                                const: subscription
                              trialPeriodDays:
                                description: >-
                                  The trial period in days. If the trial period
                                  is 0 or null, there will be no trial period.
                                anyOf:
                                  - anyOf:
                                      - description: A positive integer
                                        type: integer
                                        exclusiveMinimum: 0
                                        maximum: 9007199254740991
                                      - type: number
                                        const: 0
                                  - type: 'null'
                              isDefault:
                                description: >-
                                  Whether or not this price is the default
                                  price. For product prices, this indicates the
                                  default price for that product. For usage
                                  prices, this indicates the default price for
                                  that usage meter.
                                type: boolean
                              unitPrice:
                                description: >-
                                  The price per unit. This should be in the
                                  smallest unit of the currency. For example, if
                                  the currency is USD, GBP, CAD, EUR or SGD, the
                                  price should be in cents.
                                anyOf:
                                  - description: A positive integer
                                    type: integer
                                    exclusiveMinimum: 0
                                    maximum: 9007199254740991
                                  - type: number
                                    const: 0
                              usageEventsPerUnit:
                                description: Omitted.
                                type: 'null'
                              active:
                                type: boolean
                              slug:
                                type: string
                                minLength: 1
                                maxLength: 255
                              usageMeterId:
                                description: Omitted.
                                type: 'null'
                              currency:
                                $ref: '#/components/schemas/CurrencyCode'
                            required:
                              - intervalUnit
                              - intervalCount
                              - type
                              - isDefault
                              - unitPrice
                          - type: object
                            properties:
                              intervalUnit:
                                description: Omitted.
                                type: 'null'
                              name:
                                type: string
                                minLength: 1
                                maxLength: 255
                              intervalCount:
                                description: Omitted.
                                type: 'null'
                              type:
                                type: string
                                const: single_payment
                              trialPeriodDays:
                                description: Omitted.
                                type: 'null'
                              isDefault:
                                description: >-
                                  Whether or not this price is the default
                                  price. For product prices, this indicates the
                                  default price for that product. For usage
                                  prices, this indicates the default price for
                                  that usage meter.
                                type: boolean
                              unitPrice:
                                description: >-
                                  The price per unit. This should be in the
                                  smallest unit of the currency. For example, if
                                  the currency is USD, GBP, CAD, EUR or SGD, the
                                  price should be in cents.
                                anyOf:
                                  - description: A positive integer
                                    type: integer
                                    exclusiveMinimum: 0
                                    maximum: 9007199254740991
                                  - type: number
                                    const: 0
                              usageEventsPerUnit:
                                description: Omitted.
                                type: 'null'
                              active:
                                type: boolean
                              slug:
                                type: string
                                minLength: 1
                                maxLength: 255
                              usageMeterId:
                                description: Omitted.
                                type: 'null'
                              currency:
                                $ref: '#/components/schemas/CurrencyCode'
                            required:
                              - type
                              - isDefault
                              - unitPrice
                        type: object
                      features:
                        description: >-
                          The slugs of the features that will granted when they
                          purchase the product. Must be a subset of the slugs of
                          the features in the pricingModel.
                        type: array
                        items:
                          type: string
                    required:
                      - product
                      - price
                      - features
                usageMeters:
                  type: array
                  items:
                    type: object
                    properties:
                      usageMeter:
                        $ref: '#/components/schemas/UsageMeterClientInsertSchema'
                        description: >-
                          The usage meter configuration. Each dimension along
                          which usage will be tracked needs its own meter.
                      prices:
                        description: >-
                          The prices for this usage meter. Each price defines
                          how usage on this meter is billed.
                        type: array
                        items:
                          type: object
                          properties:
                            intervalUnit:
                              type: string
                              enum:
                                - day
                                - week
                                - month
                                - year
                            name:
                              type: string
                              minLength: 1
                              maxLength: 255
                            intervalCount:
                              description: A positive integer
                              type: integer
                              exclusiveMinimum: 0
                              maximum: 9007199254740991
                            type:
                              type: string
                              const: usage
                            trialPeriodDays:
                              description: Omitted.
                              type: 'null'
                            isDefault:
                              description: >-
                                Whether or not this price is the default price.
                                For product prices, this indicates the default
                                price for that product. For usage prices, this
                                indicates the default price for that usage
                                meter.
                              type: boolean
                            unitPrice:
                              description: >-
                                The price per unit. This should be in the
                                smallest unit of the currency. For example, if
                                the currency is USD, GBP, CAD, EUR or SGD, the
                                price should be in cents.
                              anyOf:
                                - description: A positive integer
                                  type: integer
                                  exclusiveMinimum: 0
                                  maximum: 9007199254740991
                                - type: number
                                  const: 0
                            usageEventsPerUnit:
                              description: >-
                                The number of usage events per unit. Used to
                                determine how to map usage events to quantities
                                when raising invoices for usage.
                              type: integer
                              exclusiveMinimum: 0
                              maximum: 9007199254740991
                            active:
                              type: boolean
                            slug:
                              type: string
                              minLength: 1
                              maxLength: 255
                            currency:
                              $ref: '#/components/schemas/CurrencyCode'
                          required:
                            - intervalUnit
                            - intervalCount
                            - type
                            - isDefault
                            - unitPrice
                            - usageEventsPerUnit
                    required:
                      - usageMeter
                resources:
                  type: array
                  items:
                    description: >-
                      A resource that can be claimed by subscriptions via
                      resource features.
                    type: object
                    properties:
                      slug:
                        description: The slug of the resource
                        type: string
                        minLength: 1
                        maxLength: 255
                      name:
                        description: The name of the resource
                        type: string
                        minLength: 1
                        maxLength: 255
                      active:
                        type: boolean
                    required:
                      - slug
                      - name
              required:
                - name
                - features
                - products
                - usageMeters
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  pricingModel:
                    $ref: '#/components/schemas/PricingModelDetailsRecord'
                required:
                  - pricingModel
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CurrencyCode:
      description: Currency code
      type: string
      enum:
        - USD
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLP
        - CNY
        - COP
        - CRC
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - ISK
        - JMD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KRW
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SEK
        - SGD
        - SHP
        - SLE
        - SOS
        - SRD
        - STD
        - SZL
        - THB
        - TJS
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - UYU
        - UZS
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMW
    UsageMeterClientInsertSchema:
      type: object
      properties:
        name:
          type: string
        slug:
          type: string
        aggregationType:
          description: >-
            The type of aggregation to perform on the usage meter. Defaults to
            "sum", which aggregates all the usage event amounts for the billing
            period. "count_distinct_properties" counts the number of distinct
            properties in the billing period for a given meter.
          type: string
          enum:
            - sum
            - count_distinct_properties
      required:
        - name
        - slug
    PricingModelDetailsRecord:
      type: object
      properties:
        id:
          type: string
        createdAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        updatedAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        livemode:
          type: boolean
        organizationId:
          type: string
        isDefault:
          type: boolean
        name:
          type: string
        products:
          type: array
          items:
            $ref: '#/components/schemas/ProductWithPricesRecord'
        usageMeters:
          type: array
          items:
            $ref: '#/components/schemas/UsageMeterWithPricesRecord'
        defaultProduct:
          $ref: '#/components/schemas/ProductWithPricesRecord'
          description: >-
            The default product for the pricing model. If no product is
            explicitly set as default, will return undefined.
      required:
        - id
        - createdAt
        - updatedAt
        - livemode
        - organizationId
        - isDefault
        - name
        - products
        - usageMeters
      additionalProperties: false
    error.BAD_REQUEST:
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
      type: object
      properties:
        message:
          description: The error message
          example: Invalid input data
          type: string
        code:
          description: The error code
          example: BAD_REQUEST
          type: string
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
    error.UNAUTHORIZED:
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
      type: object
      properties:
        message:
          description: The error message
          example: Authorization not provided
          type: string
        code:
          description: The error code
          example: UNAUTHORIZED
          type: string
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
    error.FORBIDDEN:
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
      type: object
      properties:
        message:
          description: The error message
          example: Insufficient access
          type: string
        code:
          description: The error code
          example: FORBIDDEN
          type: string
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
    error.INTERNAL_SERVER_ERROR:
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
      type: object
      properties:
        message:
          description: The error message
          example: Internal server error
          type: string
        code:
          description: The error code
          example: INTERNAL_SERVER_ERROR
          type: string
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
    ProductWithPricesRecord:
      type: object
      properties:
        id:
          type: string
        createdAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        updatedAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        livemode:
          type: boolean
        name:
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
        imageURL:
          anyOf:
            - type: string
            - type: 'null'
        organizationId:
          type: string
        active:
          type: boolean
        singularQuantityLabel:
          anyOf:
            - type: string
            - type: 'null'
        pluralQuantityLabel:
          anyOf:
            - type: string
            - type: 'null'
        pricingModelId:
          type: string
        default:
          type: boolean
        slug:
          description: Unique identifier for the product within its pricing model
          type: string
          minLength: 1
          maxLength: 255
        prices:
          type: array
          items:
            $ref: '#/components/schemas/PriceRecord'
        defaultPrice:
          $ref: '#/components/schemas/PriceRecord'
          description: >-
            The default price for the product. If no price is explicitly set as
            default, will return the first price created for the product..
        features:
          type: array
          items:
            $ref: '#/components/schemas/FeatureRecord'
      required:
        - id
        - createdAt
        - updatedAt
        - livemode
        - name
        - description
        - imageURL
        - organizationId
        - active
        - singularQuantityLabel
        - pluralQuantityLabel
        - pricingModelId
        - default
        - slug
        - prices
        - defaultPrice
        - features
      additionalProperties: false
    UsageMeterWithPricesRecord:
      type: object
      properties:
        id:
          type: string
        createdAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        updatedAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        livemode:
          type: boolean
        organizationId:
          type: string
        name:
          description: The name of the usage meter
          type: string
          minLength: 1
          maxLength: 255
        pricingModelId:
          type: string
        slug:
          description: The slug of the usage meter
          type: string
          minLength: 1
          maxLength: 255
        aggregationType:
          description: >-
            The type of aggregation to perform on the usage meter. Defaults to
            "sum", which aggregates all the usage event amounts for the billing
            period. "count_distinct_properties" counts the number of distinct
            properties in the billing period for a given meter.
          type: string
          enum:
            - sum
            - count_distinct_properties
        prices:
          type: array
          items:
            $ref: '#/components/schemas/UsagePriceClientSelectSchema'
        defaultPrice:
          $ref: '#/components/schemas/UsagePriceClientSelectSchema'
          description: >-
            The default price for the usage meter. If no price is explicitly set
            as default, will return the first price.
      required:
        - id
        - createdAt
        - updatedAt
        - livemode
        - organizationId
        - name
        - pricingModelId
        - slug
        - aggregationType
        - prices
      additionalProperties: false
    PriceRecord:
      anyOf:
        - $ref: '#/components/schemas/SubscriptionPriceClientSelectSchema'
        - $ref: '#/components/schemas/SinglePaymentPriceClientSelectSchema'
        - $ref: '#/components/schemas/UsagePriceClientSelectSchema'
    FeatureRecord:
      oneOf:
        - $ref: '#/components/schemas/ToggleFeatureClientSelectSchema'
        - $ref: '#/components/schemas/UsageCreditGrantFeatureClientSelectSchema'
        - $ref: '#/components/schemas/ResourceFeatureClientSelectSchema'
      type: object
      discriminator:
        propertyName: type
        mapping:
          toggle:
            $ref: '#/components/schemas/ToggleFeatureClientSelectSchema'
          usage_credit_grant:
            $ref: '#/components/schemas/UsageCreditGrantFeatureClientSelectSchema'
          resource:
            $ref: '#/components/schemas/ResourceFeatureClientSelectSchema'
    UsagePriceClientSelectSchema:
      type: object
      properties:
        id:
          type: string
        createdAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        updatedAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        livemode:
          type: boolean
        intervalUnit:
          type: string
          enum:
            - day
            - week
            - month
            - year
        name:
          anyOf:
            - type: string
            - type: 'null'
        intervalCount:
          description: A positive integer
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        type:
          type: string
          const: usage
        trialPeriodDays:
          description: Omitted.
          type: 'null'
        isDefault:
          description: >-
            Whether or not this price is the default price. For product prices,
            this indicates the default price for that product. For usage prices,
            this indicates the default price for that usage meter.
          type: boolean
        unitPrice:
          description: >-
            The price per unit. This should be in the smallest unit of the
            currency. For example, if the currency is USD, GBP, CAD, EUR or SGD,
            the price should be in cents.
          anyOf:
            - description: A positive integer
              type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            - type: number
              const: 0
        usageEventsPerUnit:
          description: >-
            The number of usage events per unit. Used to determine how to map
            usage events to quantities when raising invoices for usage.
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        productId:
          type: 'null'
        active:
          type: boolean
        currency:
          $ref: '#/components/schemas/CurrencyCode'
        slug:
          anyOf:
            - type: string
            - type: 'null'
        usageMeterId:
          description: >-
            The usage meter that uses this price. All usage events on that meter
            must be associated with a price that is also associated with that
            usage meter.
          type: string
        pricingModelId:
          type: string
      required:
        - id
        - createdAt
        - updatedAt
        - livemode
        - intervalUnit
        - name
        - intervalCount
        - type
        - trialPeriodDays
        - isDefault
        - unitPrice
        - usageEventsPerUnit
        - productId
        - active
        - currency
        - slug
        - usageMeterId
        - pricingModelId
      additionalProperties: false
    SubscriptionPriceClientSelectSchema:
      type: object
      properties:
        id:
          type: string
        createdAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        updatedAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        livemode:
          type: boolean
        intervalUnit:
          type: string
          enum:
            - day
            - week
            - month
            - year
        name:
          anyOf:
            - type: string
            - type: 'null'
        intervalCount:
          description: A positive integer
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        type:
          type: string
          const: subscription
        trialPeriodDays:
          description: >-
            The trial period in days. If the trial period is 0 or null, there
            will be no trial period.
          anyOf:
            - anyOf:
                - description: A positive integer
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 9007199254740991
                - type: number
                  const: 0
            - type: 'null'
        isDefault:
          description: >-
            Whether or not this price is the default price. For product prices,
            this indicates the default price for that product. For usage prices,
            this indicates the default price for that usage meter.
          type: boolean
        unitPrice:
          description: >-
            The price per unit. This should be in the smallest unit of the
            currency. For example, if the currency is USD, GBP, CAD, EUR or SGD,
            the price should be in cents.
          anyOf:
            - description: A positive integer
              type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            - type: number
              const: 0
        usageEventsPerUnit:
          description: Omitted.
          type: 'null'
        productId:
          description: The product this price belongs to. Required for subscription prices.
          type: string
        active:
          type: boolean
        currency:
          $ref: '#/components/schemas/CurrencyCode'
        slug:
          anyOf:
            - type: string
            - type: 'null'
        usageMeterId:
          description: Omitted.
          type: 'null'
        pricingModelId:
          type: string
      required:
        - id
        - createdAt
        - updatedAt
        - livemode
        - intervalUnit
        - name
        - intervalCount
        - type
        - isDefault
        - unitPrice
        - usageEventsPerUnit
        - productId
        - active
        - currency
        - slug
        - usageMeterId
        - pricingModelId
      additionalProperties: false
    SinglePaymentPriceClientSelectSchema:
      type: object
      properties:
        id:
          type: string
        createdAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        updatedAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        livemode:
          type: boolean
        intervalUnit:
          description: Omitted.
          type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
        intervalCount:
          description: Omitted.
          type: 'null'
        type:
          type: string
          const: single_payment
        trialPeriodDays:
          description: Omitted.
          type: 'null'
        isDefault:
          description: >-
            Whether or not this price is the default price. For product prices,
            this indicates the default price for that product. For usage prices,
            this indicates the default price for that usage meter.
          type: boolean
        unitPrice:
          description: >-
            The price per unit. This should be in the smallest unit of the
            currency. For example, if the currency is USD, GBP, CAD, EUR or SGD,
            the price should be in cents.
          anyOf:
            - description: A positive integer
              type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            - type: number
              const: 0
        usageEventsPerUnit:
          description: Omitted.
          type: 'null'
        productId:
          description: >-
            The product this price belongs to. Required for single payment
            prices.
          type: string
        active:
          type: boolean
        currency:
          $ref: '#/components/schemas/CurrencyCode'
        slug:
          anyOf:
            - type: string
            - type: 'null'
        usageMeterId:
          description: Omitted.
          type: 'null'
        pricingModelId:
          type: string
      required:
        - id
        - createdAt
        - updatedAt
        - livemode
        - name
        - type
        - isDefault
        - unitPrice
        - productId
        - active
        - currency
        - slug
        - pricingModelId
      additionalProperties: false
    ToggleFeatureClientSelectSchema:
      type: object
      properties:
        id:
          type: string
        createdAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        updatedAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        livemode:
          type: boolean
        organizationId:
          type: string
        type:
          type: string
          const: toggle
        slug:
          type: string
          minLength: 1
          maxLength: 255
        name:
          type: string
        description:
          type: string
        amount:
          type: 'null'
          const: null
        usageMeterId:
          type: 'null'
          const: null
        renewalFrequency:
          type: 'null'
          const: null
        pricingModelId:
          type: string
        resourceId:
          type: 'null'
          const: null
        active:
          type: boolean
      required:
        - id
        - createdAt
        - updatedAt
        - livemode
        - organizationId
        - type
        - slug
        - name
        - description
        - pricingModelId
        - active
      additionalProperties: false
    UsageCreditGrantFeatureClientSelectSchema:
      type: object
      properties:
        id:
          type: string
        createdAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        updatedAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        livemode:
          type: boolean
        organizationId:
          type: string
        type:
          type: string
          const: usage_credit_grant
        slug:
          type: string
          minLength: 1
          maxLength: 255
        name:
          type: string
        description:
          type: string
        amount:
          description: A positive integer
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        usageMeterId:
          type: string
        renewalFrequency:
          type: string
          enum:
            - once
            - every_billing_period
        pricingModelId:
          type: string
        resourceId:
          type: 'null'
          const: null
        active:
          type: boolean
      required:
        - id
        - createdAt
        - updatedAt
        - livemode
        - organizationId
        - type
        - slug
        - name
        - description
        - amount
        - usageMeterId
        - renewalFrequency
        - pricingModelId
        - active
      additionalProperties: false
    ResourceFeatureClientSelectSchema:
      type: object
      properties:
        id:
          type: string
        createdAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        updatedAt:
          description: Epoch milliseconds.
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        livemode:
          type: boolean
        organizationId:
          type: string
        type:
          type: string
          const: resource
        slug:
          type: string
          minLength: 1
          maxLength: 255
        name:
          type: string
        description:
          type: string
        amount:
          description: A positive integer
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        usageMeterId:
          type: 'null'
          const: null
        renewalFrequency:
          type: 'null'
          const: null
        pricingModelId:
          type: string
        resourceId:
          type: string
        active:
          type: boolean
      required:
        - id
        - createdAt
        - updatedAt
        - livemode
        - organizationId
        - type
        - slug
        - name
        - description
        - amount
        - pricingModelId
        - resourceId
        - active
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````