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

# Preview new subscription timeline

> Preview the billing timeline of a subscription before creating it: from the payload `POST /v2/subscriptions` takes, its future lifecycle events — activation, renewals and phase changes — in chronological order, each with the invoice document(s) it would issue, plus why the projection stopped. Nothing is created and the customer is not updated. Pass `customer` to preview it for another customer profile (country, type, tax ID). Amounts are best-effort estimates (metered usage is assumed to be 0), taxed at one rate resolved for the customer. A `cancel_at` with a charge or refund `cancellation_strategy` ends the timeline without its closing charge or credit note.



## OpenAPI

````yaml post /v1/subscriptions/preview-timeline
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/subscriptions/preview-timeline:
    post:
      tags:
        - Subscriptions
      summary: Preview new subscription timeline
      description: >-
        Preview the billing timeline of a subscription before creating it: from
        the payload `POST /v2/subscriptions` takes, its future lifecycle events
        — activation, renewals and phase changes — in chronological order, each
        with the invoice document(s) it would issue, plus why the projection
        stopped. Nothing is created and the customer is not updated. Pass
        `customer` to preview it for another customer profile (country, type,
        tax ID). Amounts are best-effort estimates (metered usage is assumed to
        be 0), taxed at one rate resolved for the customer. A `cancel_at` with a
        charge or refund `cancellation_strategy` ends the timeline without its
        closing charge or credit note.
      operationId: previewNewSubscriptionTimeline
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreviewNewSubscriptionTimeline'
      responses:
        '200':
          description: Projected timeline of the subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionPreviewTimeline'
        '400':
          description: Invalid subscription payload or customer.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - bearer: []
components:
  schemas:
    PreviewNewSubscriptionTimeline:
      type: object
      properties:
        subscription:
          $ref: '#/components/schemas/CreateSubscription'
        customer:
          $ref: '#/components/schemas/PreviewNewSubscriptionTimelineCustomer'
        max_events:
          type: integer
          exclusiveMinimum: 0
          maximum: 36
          default: 12
          description: >-
            Maximum number of events to project (1–36, default 12); combined
            with `until`, whichever limit is reached first stops the projection.
        until:
          type: string
          format: date-time
          description: >-
            Only project events strictly before this instant; combined with
            `max_events`, whichever limit is reached first stops the projection.
          example: '2024-12-20T16:04:11Z'
        starts_at:
          type: string
          format: date-time
          description: >-
            Not `subscription.starts_at`: the instant to assume the subscription
            starts when it would wait for an activation event (a manual
            activation, checkout, quote signature, or a manually-started
            contract). Ignored when the subscription has a start date.
          example: '2024-12-20T16:04:11Z'
      required:
        - subscription
    SubscriptionPreviewTimeline:
      type: object
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionPreviewTimelineEvent'
          description: >-
            The subscription's projected future lifecycle events, in
            chronological order (by `date`).
        stopped_because:
          $ref: '#/components/schemas/SubscriptionPreviewTimelineStop'
      required:
        - events
        - stopped_because
    CreateSubscription:
      allOf:
        - type: object
          properties:
            customer_id:
              type: string
              description: ID of the customer the subscription belongs to.
              example: cus_QalW2vTAdkR6IY
          required:
            - customer_id
        - anyOf:
            - allOf:
                - type: object
                  properties:
                    activation_strategy:
                      type: string
                      enum:
                        - start_date
                        - manually
                        - checkout
                      description: >

                        Strategy used to activate the subscription.


                        - `start_date`: The subscription will become active on
                        the specified start date. If the start date is in the
                        past, it will be activated immediately.

                        - `manually`: The subscription requires activation
                        through a manual action.

                        - `checkout`: The subscription will be activated once
                        the checkout is completed, but only if the start date is
                        in the past. Otherwise, activation will occur later on
                        the specified start date.

                        - `quote`: The subscription will be activated depending
                        on the configuration and the signature of the related
                        quote.
                      example: start_date
                    products:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            description: Product ID.
                            example: itm_FJKlqUb8COXw55
                          catalog_version_id:
                            type:
                              - string
                              - 'null'
                            description: >-
                              ID of a published catalog version to price this
                              product from, instead of the live products
                              catalog. Ignored when `price` or `prices` is set.
                              The product must be priced in that version.
                            example: pcv_9x8v7u6t5s4r
                          price_configuration_id:
                            type:
                              - string
                              - 'null'
                            description: >-
                              ID of the product's price configuration to price
                              this product from, instead of the one the catalog
                              rules select. It must be a live base configuration
                              of the product (not archived or replaced by a
                              later catalog publish, and not specific to a
                              customer, price book, customer segment or plan),
                              in the subscription's currency. Requires
                              `payment_interval`, which it must match. The
                              configuration's country and commitment
                              restrictions are not checked. With a pinned
                              catalog version, the product is priced from that
                              version's copy of the configuration, and a
                              configuration the version doesn't price returns a
                              400. Cannot be combined with `price`, `prices` or
                              `plan_id`.
                            example: prc_8f3kXODIM1sBwB
                          name:
                            type: string
                            description: >-
                              Product name. This will appear on the final
                              invoices.
                            example: Product name
                          description:
                            type: string
                            description: >-
                              Product description. This will appear on the final
                              invoices.
                            example: A description of the product.
                          description_display_interval_dates:
                            type: boolean
                            default: false
                            description: >-
                              Indicates if the dates of the interval should be
                              automatically added in the product description on
                              the invoices.
                          payment_interval:
                            anyOf:
                              - type: object
                                properties:
                                  period:
                                    type: string
                                    enum:
                                      - once
                                required:
                                  - period
                                title: Once
                                example:
                                  period: once
                              - type: object
                                properties:
                                  period:
                                    type: string
                                    enum:
                                      - days
                                      - weeks
                                      - months
                                      - years
                                  count:
                                    type: integer
                                    minimum: 1
                                    default: 1
                                required:
                                  - period
                                title: Period
                                example:
                                  period: months
                                  count: 1
                            description: >-
                              Interval on which the product is billed. This
                              interval can be different between products and can
                              differ from the subscription commitment interval.
                          payment_schedule:
                            type: string
                            enum:
                              - start
                              - end
                            description: >-
                              Indicates if the product should be billed at the
                              start or the end of the payment interval.
                            example: start
                          price:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - fee
                              amount:
                                type: number
                                description: >-
                                  Monetary amount. Expressed in currency's
                                  smallest unit.
                            required:
                              - type
                              - amount
                            description: >-
                              Similar to `prices`, allow to apply a single fee
                              price more easily.
                            example:
                              type: fee
                              amount: 200
                          prices:
                            type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - fee
                                    amount:
                                      type: number
                                      description: >-
                                        Monetary amount. Expressed in currency's
                                        smallest unit.
                                  required:
                                    - type
                                    - amount
                                  title: Fee price
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - volume
                                    amount:
                                      type: number
                                      description: >-
                                        Monetary amount of the price for the
                                        number of units defined by `unit_count`.
                                        Expressed in currency's smallest unit.
                                    unit_count:
                                      type: number
                                      description: >-
                                        Number of units considered for the
                                        amount.
                                    from:
                                      type: number
                                      description: From limit.
                                    to:
                                      type:
                                        - number
                                        - 'null'
                                      description: To limit.
                                    on_tier_incomplete:
                                      type:
                                        - string
                                        - 'null'
                                      enum:
                                        - pro_rata
                                        - pay_in_full
                                        - do_not_charge
                                        - flat_per_tier
                                      default: pro_rata
                                      description: >-

                                        Logic used to compute the amount when
                                        usage on the tier is incomplete.


                                        - `pro_rata`: The amount is computed
                                        using the pro rata of the tier's
                                        consumption.

                                        - `pay_in_full`: The amount corresponds
                                        to the full payment of the tier.

                                        - `do_not_charge`: The tier is not
                                        charged and ignored.

                                        - `flat_per_tier`: The tier's `amount`
                                        is a flat fee, billed once as soon as
                                        usage reaches the tier, whatever the
                                        number of units in it. `unitCount` is
                                        ignored. No usage bills nothing.
                                          
                                    metering_filter:
                                      allOf:
                                        - $ref: '#/components/schemas/MeteringFilter'
                                        - type: object
                                          description: >-
                                            Metering filter that scopes which
                                            billable events are eligible for this
                                            price tier. Only present when the price
                                            is filtered.
                                  required:
                                    - type
                                    - amount
                                    - unit_count
                                    - from
                                    - to
                                  title: Volume price
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - packaged
                                    amount:
                                      type: number
                                      description: >-
                                        Monetary amount of the price for the
                                        number of units defined by `unit_count`.
                                        Expressed in currency's smallest unit.
                                    unit_count:
                                      type: number
                                      description: >-
                                        Number of units considered for the
                                        amount.
                                    from:
                                      type: number
                                      description: From limit.
                                    to:
                                      type:
                                        - number
                                        - 'null'
                                      description: To limit.
                                    on_bucket_incomplete:
                                      type:
                                        - string
                                        - 'null'
                                      enum:
                                        - pro_rata
                                        - pay_in_full
                                        - do_not_charge
                                        - flat_per_tier
                                      default: pro_rata
                                      description: >-

                                        Logic used to compute the amount when
                                        usage reaches an incomplete bucket (the
                                        bucket size corresponds to the
                                        `unitCount`).

                                          - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.
                                          - `pay_in_full`: The amount corresponds to the full payment of the bucket.
                                          - `do_not_charge`: The bucket is not charged and ignored.
                                          - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.
                                            
                                    metering_filter:
                                      allOf:
                                        - $ref: '#/components/schemas/MeteringFilter'
                                        - type: object
                                          description: >-
                                            Metering filter that scopes which
                                            billable events are eligible for this
                                            price tier. Only present when the price
                                            is filtered.
                                  required:
                                    - type
                                    - amount
                                    - unit_count
                                    - from
                                    - to
                                  title: Packaged price
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - bulk
                                    amount:
                                      type: number
                                      description: >-
                                        Monetary amount of the price for the
                                        number of units defined by `unit_count`.
                                        Expressed in currency's smallest unit.
                                    unit_count:
                                      type: number
                                      description: >-
                                        Number of units considered for the
                                        amount.
                                    to:
                                      type:
                                        - number
                                        - 'null'
                                      description: To limit.
                                    on_tier_incomplete:
                                      type:
                                        - string
                                        - 'null'
                                      enum:
                                        - pro_rata
                                        - pay_in_full
                                        - do_not_charge
                                        - flat_per_tier
                                      default: pro_rata
                                      description: >-

                                        Logic used to compute the amount when
                                        usage on the tier is incomplete.


                                        - `pro_rata`: The amount is computed
                                        using the pro rata of the tier's
                                        consumption.

                                        - `pay_in_full`: The amount corresponds
                                        to the full payment of the tier.

                                        - `do_not_charge`: The tier is not
                                        charged and ignored.

                                        - `flat_per_tier`: The tier's `amount`
                                        is a flat fee, billed once as soon as
                                        usage reaches the tier, whatever the
                                        number of units in it. `unitCount` is
                                        ignored. No usage bills nothing.
                                          
                                    metering_filter:
                                      allOf:
                                        - $ref: '#/components/schemas/MeteringFilter'
                                        - type: object
                                          description: >-
                                            Metering filter that scopes which
                                            billable events are eligible for this
                                            price tier. Only present when the price
                                            is filtered.
                                  required:
                                    - type
                                    - amount
                                    - unit_count
                                    - to
                                  title: Bulk price
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - bps
                                    from:
                                      type: number
                                      description: From limit.
                                    to:
                                      type:
                                        - number
                                        - 'null'
                                      description: To limit.
                                    percentage:
                                      type: number
                                      description: >-
                                        Percentage applied on each unit to
                                        compute the usage.
                                    per_unit_cap:
                                      type:
                                        - number
                                        - 'null'
                                      description: >-
                                        Maximum amount for one unit. Expressed
                                        in currency's smallest unit.
                                    per_unit_floor:
                                      type:
                                        - number
                                        - 'null'
                                      description: >-
                                        Minimum amount for one unit. Expressed
                                        in currency's smallest unit.
                                    per_unit_fee:
                                      type:
                                        - number
                                        - 'null'
                                      description: >-
                                        Fee amount applied per unit. Expressed
                                        in currency's smallest unit.
                                    metering_filter:
                                      allOf:
                                        - $ref: '#/components/schemas/MeteringFilter'
                                        - type: object
                                          description: >-
                                            Metering filter that scopes which
                                            billable events are eligible for this
                                            price tier. Only present when the price
                                            is filtered.
                                  required:
                                    - type
                                    - from
                                    - to
                                    - percentage
                                    - per_unit_cap
                                    - per_unit_floor
                                    - per_unit_fee
                                  title: BPS price
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - bundle
                                    amount:
                                      type: number
                                      description: >-
                                        Monetary amount of the price for the
                                        number of units defined by `unit_count`.
                                        Expressed in currency's smallest unit.
                                    unit_count:
                                      type: number
                                      description: >-
                                        Number of units considered for the
                                        amount.
                                  required:
                                    - type
                                    - amount
                                    - unit_count
                                  title: Bundle price
                                  description: >-
                                    For seat products only, if you are looking
                                    for credits, use a fee price
                            description: >-
                              Prices of the product. If not specified, the
                              matching prices (depending on the currency,
                              interval, etc) of the product defined in the
                              products catalog/plan are used.
                            example:
                              - type: volume
                                from: 0
                                to: 20
                                amount: 200
                                unit_count: 1
                                on_tier_incomplete: null
                              - type: volume
                                from: 20
                                to: null
                                amount: 150
                                unit_count: 1
                                on_tier_incomplete: null
                          count:
                            type: number
                            minimum: 1
                            description: >-
                              Number of product units. Only applies to products
                              of type `flat_fee`, `seat` or `credit`.
                            example: 2
                          unit_name:
                            type: string
                            description: >-
                              Product name. This will appear on the final
                              invoices. Only applies to products of type `seat`
                              or `usage`.
                            example: user
                          min_committed_count:
                            type: number
                            minimum: 1
                            description: >-
                              Minimum of units committed. If usage is less than
                              this number, then this value will be used. Only
                              applies to products of type `usage`.
                          min_amount:
                            type:
                              - number
                              - 'null'
                            description: >-
                              Minimum amount billed. If the final computed
                              amount from the usage for this product is less
                              than this amount, then this value will be used.
                              Only applies to products of type `usage`.
                          max_amount:
                            type:
                              - number
                              - 'null'
                            description: >-
                              Maximum amount billed. If the final computed
                              amount from the usage for this product is greater
                              than this amount, then this value will be used.
                              Only applies to products of type `usage`.
                          charging_method:
                            type:
                              - string
                              - 'null'
                            enum:
                              - prorata
                              - pay_in_full
                              - do_not_charge
                            description: >-
                              Charging method for seat count updates within the
                              current billing period. Only applies to connected
                              seat products.


                              - `prorata`: Price calculated proportionally to
                              time elapsed in the billing period.

                              - `pay_in_full`: Price calculated for the entire
                              billing period.

                              - `do_not_charge`: No charge for the update.
                          seat_invoicing_schedule:
                            type:
                              - string
                              - 'null'
                            enum:
                              - immediately
                              - next_invoice
                              - custom
                            description: >

                              Policy defining when seat count changes are
                              invoiced. Only applies to connected seat products.


                              - `immediately`: Seat changes are invoiced
                              immediately.

                              - `next_invoice`: Seat changes are invoiced at the
                              next invoice.

                              - `custom`: Seat changes are invoiced on a custom
                              schedule.
                          metering_interval_type:
                            type: string
                            enum:
                              - subscription_commitment
                              - payment_interval
                              - full_database
                              - phase_duration
                              - custom
                            description: >-

                              Indicates on which type of interval the usage
                              should be aggregated.


                              - `subscription_commitment`: For the usage
                              contained within the subscription commitment
                              period.

                              - `payment_interval`: For the usage contained
                              within the payment interval of the product.

                              - `full_database`: For all the usage we ingested
                              for this product, no matter the period.

                              - `phase_duration`: For the usage contained within
                              the subscription phase.

                              - `custom`: For the usage contained within a
                              custom interval that starts with the phase and
                              renews independently of the billing interval.
                              Requires `metering_interval` to be set.
                                 Only applies to products of type `usage`.
                          metering_interval:
                            type: object
                            properties:
                              period:
                                type: string
                                enum:
                                  - days
                                  - weeks
                                  - months
                                  - years
                              count:
                                type: integer
                                minimum: 1
                            required:
                              - period
                              - count
                            description: >-
                              Custom interval for usage aggregation. Required
                              when `metering_interval_type` is `custom`. The
                              interval starts at the phase start and renews on
                              its own cycle (e.g. `{ period: 'months', count: 3
                              }` for quarterly metering with monthly billing).
                              Only applies to products of type `usage`.
                          bill_usage_difference:
                            anyOf:
                              - type: boolean
                              - type: string
                                enum:
                                  - 'true'
                                  - 'false'
                            default: false
                            description: >-
                              Only bill the usage difference comparing to the
                              previous period (i.e. actual amount minus last
                              invoice amount). Doesn't apply to
                              `payment_interval` metering interval type. Only
                              applies to products of type `usage`.
                          children_usage_aggregation:
                            type:
                              - string
                              - 'null'
                            enum:
                              - sum
                              - max
                            description: >-

                              Controls whether a parent organization's metered
                              usage is billed on the combined usage of the
                              parent and its direct children, and how per-member
                              values are combined.


                              - `null`: Organization-based usage is disabled.
                              Only the subscription customer's own usage is
                              billed.

                              - `sum`: The usage values of the parent and each
                              direct child are added together (organization
                              total).

                              - `max`: Only the single highest-consuming member
                              (parent or one direct child) is billed.
                               Only applies to products of type `usage`.
                          credits_expiration_in_days:
                            type:
                              - number
                              - 'null'
                            description: >-
                              Validity in days for credits that will be
                              topped-up automatically. Once the period has
                              passed, they'll expire.
                          expire_credits_at_end_of_period:
                            anyOf:
                              - type: boolean
                              - type: string
                                enum:
                                  - 'true'
                                  - 'false'
                            default: false
                            description: >-
                              Automatically set the expiration date to the end
                              of the next period for each topup. Takes priority
                              on `creditsExpirationInDays`
                          credits_balance_auto_creation_enabled:
                            anyOf:
                              - type: boolean
                              - type: string
                                enum:
                                  - 'true'
                                  - 'false'
                            description: >-
                              Whether to create the customer credit balance as
                              soon as the product is added to the subscription.
                              Defaults to the credit product's
                              `credits_balance_auto_creation_enabled` (`true`
                              when unset). Set to `false` to create the balance
                              by hand before activation, e.g. on quote-based
                              renewals where the balance must not start
                              consuming before signature; the first top-up
                              creates it if still missing.
                        required:
                          - id
                      description: Products that make up the subscription.
                    coupons:
                      type: array
                      items:
                        allOf:
                          - anyOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                    description: >-
                                      ID of the catalog coupon to apply to the
                                      subscription.
                                required:
                                  - id
                                title: Existing coupon
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - amount
                                  name:
                                    type: string
                                    description: Coupon name.
                                  discount_amount:
                                    type: number
                                    exclusiveMinimum: 0
                                    description: >-
                                      Coupon discount amount. Expressed in
                                      currency's smallest unit.
                                required:
                                  - type
                                  - discount_amount
                                title: Coupon amount
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - percent
                                  name:
                                    type: string
                                    description: Coupon name.
                                  discount_percent:
                                    type: number
                                    exclusiveMinimum: 0
                                    maximum: 100
                                    description: Coupon discount percentage.
                                required:
                                  - type
                                  - discount_percent
                                title: Coupon percent
                          - type: object
                            properties:
                              repeat:
                                type:
                                  - string
                                  - 'null'
                                enum:
                                  - once
                                  - forever
                                  - custom
                                  - duration
                                description: >

                                  Coupon frequency. Required for inline coupons.
                                  Optional when an existing coupon `id` is
                                  provided: if omitted, defaults to the catalog
                                  coupon's repeat value.


                                  - `once`: Will apply the coupon only to the
                                  first one invoice.

                                  - `forever`: Will apply the coupon to all
                                  invoices.

                                  - `custom`: Will apply to coupon until a
                                  specified expiration date.

                                  - `duration`: Will apply the coupon for a
                                  specific duration (e.g., 3 months).
                              duration_period:
                                type: string
                                enum:
                                  - days
                                  - weeks
                                  - months
                                  - years
                                description: >-
                                  Period of time for which the coupon will be
                                  applied. Only applies to the `duration` coupon
                                  frequency.
                              duration_count:
                                type: number
                                description: >-
                                  Number of periods for which the coupon will be
                                  applied. Only applies to the `duration` coupon
                                  frequency.
                              expires_at:
                                type: string
                                format: date-time
                                description: >-
                                  Coupon expiration date. Only applies to the
                                  `custom` coupon frequency. UTC date time
                                  string in the [ISO
                                  8601](https://en.wikipedia.org/wiki/ISO_8601)
                                  format.
                                example: '2024-12-20T16:04:11Z'
                              apply_at:
                                type: string
                                format: date-time
                                description: >-
                                  Coupon first application date. UTC date time
                                  string in the [ISO
                                  8601](https://en.wikipedia.org/wiki/ISO_8601)
                                  format.
                                example: '2024-12-20T16:04:11Z'
                              product_ids:
                                type:
                                  - array
                                  - 'null'
                                items:
                                  type: string
                                minItems: 1
                                description: >-
                                  Products the coupon is scoped to on this
                                  subscription, read together with
                                  `product_scope`: the only discounted products
                                  when `include`, the products never discounted
                                  when `exclude`, null when `all`. When sent
                                  without `product_scope`, it is an `include`
                                  list, except that a coupon already stored as
                                  `exclude` keeps `exclude` when its phase is
                                  updated; when empty or omitted, the catalog
                                  coupon's scope is copied.
                              product_scope:
                                type:
                                  - string
                                  - 'null'
                                enum:
                                  - all
                                  - include
                                  - exclude
                                description: >-
                                  Which products the coupon discounts on this
                                  subscription. `all`: every product
                                  (`product_ids` must be empty). `include`: only
                                  the products in `product_ids`. `exclude`:
                                  every product except those in `product_ids`
                                  (lines without a product stay discounted).
                                  When sent, it replaces the catalog coupon's
                                  scope together with `product_ids`. When
                                  omitted, it is inferred: `include` if
                                  `product_ids` is non-empty, else the catalog
                                  coupon's scope. On a phase update, a coupon
                                  already stored as `exclude` keeps `exclude`
                                  when `product_ids` is sent without
                                  `product_scope`.
                  required:
                    - activation_strategy
                - type: object
                  properties:
                    name:
                      type: string
                      description: Subscription custom name.
                    purchase_order:
                      type: string
                      description: Reference to the purchase order.
                    invoicing_entity_id:
                      type: string
                      description: >-
                        ID of the invoicing entity attached to the subscription.
                        If not defined, fallback to customer's invoicing entity.
                      example: ive_jerrb484RHn
                    crm_opportunity_id:
                      type: string
                      description: ID of the related opportunity/deal in the connected CRM.
                    commitment_interval:
                      type: object
                      properties:
                        period:
                          type: string
                          enum:
                            - days
                            - weeks
                            - months
                            - years
                        count:
                          type: number
                          minimum: 1
                      required:
                        - period
                        - count
                      description: Deprecated field, please use `contract_terms`.
                      example:
                        period: years
                        count: 1
                      deprecated: true
                    renew_automatically:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      default: true
                      description: Deprecated field, please use `contract_terms`.
                      example: true
                      deprecated: true
                    renew_for:
                      type: object
                      properties:
                        period:
                          type: string
                          enum:
                            - days
                            - weeks
                            - months
                            - years
                        count:
                          type: number
                      required:
                        - period
                        - count
                      description: Deprecated field, please use `contract_terms`.
                      example:
                        period: years
                        count: 1
                      deprecated: true
                    minimum_invoice_fee:
                      type:
                        - number
                        - 'null'
                      description: >-
                        Minimum fee applied to each invoice outside of one time
                        payments.
                      example: 250
                    contract_terms:
                      allOf:
                        - type: object
                          properties:
                            starts_at:
                              type: string
                              format: date-time
                              description: >-
                                Start date of the contract. UTC date time string
                                in the [ISO
                                8601](https://en.wikipedia.org/wiki/ISO_8601)
                                format.
                              example: '2024-12-20T16:04:11Z'
                            ends_at:
                              type: string
                              format: date-time
                              description: >-
                                End date of the contract. UTC date time string
                                in the [ISO
                                8601](https://en.wikipedia.org/wiki/ISO_8601)
                                format.
                              example: '2024-12-20T16:04:11Z'
                            duration:
                              type: object
                              properties:
                                period:
                                  type: string
                                  enum:
                                    - days
                                    - weeks
                                    - months
                                    - years
                                count:
                                  type: integer
                                  minimum: 1
                                  default: 1
                              required:
                                - period
                              description: >-
                                Interval over which the contract initially
                                spans. Only applies to `duration` end strategy.
                              example:
                                count: 6
                                period: months
                            renew_automatically:
                              anyOf:
                                - type: boolean
                                - type: string
                                  enum:
                                    - 'true'
                                    - 'false'
                              description: >

                                Indicates if the contract should be renewed
                                automatically.


                                - `true`: The contract will be renewed
                                automatically.

                                - `false`: The contract will not be renewed
                                automatically.
                              example: true
                            renew_for_duration:
                              type: object
                              properties:
                                period:
                                  type: string
                                  enum:
                                    - days
                                    - weeks
                                    - months
                                    - years
                                count:
                                  type: integer
                                  minimum: 1
                                  default: 1
                              required:
                                - period
                              description: >

                                Interval over which the contract will be
                                renewed. Only applies if `renew_automatically`
                                is true.
                              example:
                                count: 1
                                period: years
                        - type: object
                          properties:
                            activation_strategy:
                              type: string
                              enum:
                                - start_date
                                - immediately
                                - manual
                                - quote_signature
                                - checkout
                              description: >

                                Activation strategy of the contract.


                                - `immediately`: The contract will be activated
                                immediately.

                                - `manual`: The contract will be activated when
                                a user manually activates it.

                                - `start_date`: The contract will be activated
                                on a specified date.

                                - `quote_signature`: The contract will be
                                activated when the subscription quote is signed.

                                - `checkout`: The contract will be activated
                                when the subscription checkout is completed.
                              example: start_date
                            end_strategy:
                              type: string
                              enum:
                                - end_date
                                - duration
                                - manual
                              description: >

                                End strategy of contract.


                                - `manual`: The contract ends when a user
                                manually stops it.

                                - `end_date`: The contract ends on a specified
                                date.

                                - `duration`: The contract ends after a specific
                                relative duration, unless `renew_automatically`
                                is true.
                              example: duration
                          required:
                            - activation_strategy
                            - end_strategy
                      description: Contract terms linked to the subscription.
                    starts_at:
                      type: string
                      format: date-time
                      description: >-
                        Applies only if the activation strategy is `start_date`.
                        UTC date time string in the [ISO
                        8601](https://en.wikipedia.org/wiki/ISO_8601) format.
                      example: '2024-12-20T16:04:11Z'
                    contract_start:
                      type: string
                      format: date-time
                      description: Deprecated field, please use `contract_terms`.
                      example: '2024-01-15T00:00:00Z'
                      deprecated: true
                    contract_end:
                      type: string
                      format: date-time
                      description: Deprecated field, please use `contract_terms`.
                      example: '2025-01-15T00:00:00Z'
                      deprecated: true
                    initial_billing_at:
                      type: string
                      format: date-time
                      description: >-
                        Date when the subscription will start being billed. If
                        not specified, it will correspond to the `starts_at`
                        date. UTC date time string in the [ISO
                        8601](https://en.wikipedia.org/wiki/ISO_8601) format.
                      example: '2024-12-20T16:04:11Z'
                    payment_method_id:
                      type: string
                      description: >-
                        ID of the customer's payment method used to pay the
                        subscription's invoices, instead of the customer's
                        default one. Cannot be combined with `bank_account_id`.
                        Omit to use the customer's payment method.
                      example: pm_abc123
                    bank_account_id:
                      type: string
                      description: >-
                        ID of the bank account displayed on the subscription's
                        invoices, which are then paid by bank transfer, instead
                        of the customer's default payment method. Cannot be
                        combined with `payment_method_id`. Omit to use the
                        customer's payment method.
                      example: bac_abc123
                    shipping_address_id:
                      type: string
                      description: >-
                        ID of the customer's active shipping address the
                        subscription ships to. Omit to use the customer shipping
                        destination: billing address or default shipping
                        address.
                      example: cad_abc123
                    display_shipping_details:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      description: >-
                        Indicates if the shipping details should be displayed on
                        the subscription's invoices.
                    cancel_at:
                      type: string
                      format: date-time
                      description: >-
                        Subscription cancel date. UTC date time string in the
                        [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
                        format.
                      example: '2024-12-20T16:04:11Z'
                    cancellation_strategy:
                      type: string
                      enum:
                        - refund_prorata
                        - refund_custom
                        - charge_prorata
                        - charge_custom
                        - end_of_period
                        - do_nothing
                      description: >

                        Strategy used to cancel the subscription. If not
                        specified `do_nothing` is used.


                        - `charge_prorata`: Will charge the customer the unpaid
                        amount for the prorated period up to the end of the
                        current period.

                        - `charge_custom`: Will charge the customer a custom
                        amount.

                        - `refund_prorata`: Will refund to the customer the
                        overpaid subscription amount using prorated calculations
                        on the cancellation date.

                        - `refund_custom`: Will refund to the customer a custom
                        amount.

                        - `end_of_period`: Will cancel the subscription at the
                        end date of the current billing period.

                        - `do_nothing`: Will only cease the subscription without
                        any additional actions.
                    cancellation_amount:
                      type: number
                      description: >-
                        Custom amount used when cancelling the subscription.
                        Only applies to the `charge_custom` or the
                        `refund_custom` cancellation strategy.
                    cancellation_refund_method:
                      type: string
                      enum:
                        - wallet
                        - original_payment_method
                        - external
                      description: >-
                        Override the refund destination for credit notes
                        generated by `refund_prorata` / `refund_custom`
                        cancellation strategies. When omitted, falls back to the
                        invoicing entity's `creditNoteWalletRefundEnabled`
                        setting.
                    properties:
                      type: object
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                          - type: 'null'
                          - type: array
                            items:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                                - type: 'null'
                                - type: 'null'
                          - type: 'null'
                      description: >-
                        Key/value pairs to store any metadata useful in your
                        context.
                    custom_properties:
                      type: object
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                          - type: string
                            format: date-time
                            description: >-
                              UTC date time string in the [ISO
                              8601](https://en.wikipedia.org/wiki/ISO_8601)
                              format.
                            example: '2024-12-20T16:04:11Z'
                          - type: array
                            items:
                              type: string
                          - type: 'null'
                      description: >-
                        A list of key value with the slug of the custom property
                        as the key and the custom property value as value.
                    tax_only:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      description: Only tax will be charged on this subscription.
                    generate_draft_invoices:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      description: >-
                        Generate draft invoices for the subscription. Each
                        invoice will need to be reviewed and validated manually
                        before being sent
                    generate_document:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      description: Generate non-legal documents instead of invoices.
                    document_name:
                      type:
                        - string
                        - 'null'
                      description: >-
                        If `generate_document` is turned on, allows you to give
                        a name to your document.
                    add_tax_to_document:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      description: >-
                        If `generate_document` is turned on, will add taxes to
                        document.
                    do_not_charge_subscription:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      description: >-
                        Subscription will be invoiced but not charged
                        (invoices/documents will be settled directly).
                    invoice_custom_note:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Default custom note added to invoices generated by the
                        subscription.
                    invoice_schedule:
                      type:
                        - string
                        - 'null'
                      enum:
                        - period_start
                        - period_end
                      description: >

                        Defines when invoices are generated relative to the
                        billing period.


                        - `period_start`: Invoices are generated at the start of
                        the billing period.

                        - `period_end`: Invoices are generated at the end of the
                        billing period.
                - type: object
                  properties:
                    plan_id:
                      type: string
                      description: Deprecated field, please use `template_id`.
                      example: plan_zHmjoDee4ZRmQV
                      deprecated: true
                    template_id:
                      type: string
                      description: ID of the template that the subscription is linked to.
                      example: subt_7gdusOkqr5L0B8
                    template_configuration_id:
                      type: string
                      description: >-
                        ID of the template configuration that the subscription
                        is linked to.
                      example: subtc_7mHWOlPStUogvp
                - type: object
                  properties:
                    trial:
                      type: object
                      properties:
                        end_strategy:
                          type: string
                          enum:
                            - manual
                            - end_date
                            - duration
                          description: Defines how the free trial will end.
                        starts_at:
                          type: string
                          format: date-time
                          description: >-
                            Free trial start date. UTC date time string in the
                            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
                            format.
                          example: '2024-12-20T16:04:11Z'
                        ends_at:
                          type: string
                          format: date-time
                          description: >-
                            Free trial end date. Only applies if the end
                            strategy is `end_date`. UTC date time string in the
                            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
                            format.
                          example: '2024-12-20T16:04:11Z'
                        duration:
                          type: object
                          properties:
                            period:
                              type: string
                              enum:
                                - days
                                - weeks
                                - months
                                - years
                              description: >-
                                Free trial duration period. Only applies if the
                                end strategy is `duration`.
                            count:
                              type: number
                              minimum: 1
                              description: >-
                                Free trial duration count. Only applies if the
                                end strategy is `duration`.
                          required:
                            - period
                            - count
                      required:
                        - end_strategy
                      description: >-
                        Create a free trial phase based on the plan
                        configuration. Only applies if a `plan_id` is provided.
                - type: object
                  properties:
                    payment_method_strategy:
                      type: string
                      enum:
                        - current
                        - external
                        - new
                      description: >

                        Payment method strategy used to bill the subscription.
                        By default, the current payment method of the customer
                        will be used.


                        - `new`: Ask the customer for a new payment method. The
                        customer can fill in their payment method either on the
                        subscription's checkout session or on their portal page.

                        - `current`: Use the current default payment method of
                        the customer.

                        - `external`: Manage the payments of the subscription
                        outside of Hyperline.
                      example: current
                    available_payment_method_types:
                      type: array
                      items:
                        type: string
                        enum:
                          - card
                          - apple_pay
                          - google_pay
                          - direct_debit
                          - direct_debit_ach
                          - direct_debit_bacs
                          - transfer
                      minItems: 1
                      description: >-
                        Set the allowed types of payment methods for the
                        customer. Only applies to the `new` payment method
                        strategy.
                    create_setup_phase:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      description: >-
                        Deprecated field, no longer needed. We recommend not
                        using it going forward.
                      deprecated: true
                    billing_cycle_alignment:
                      type: string
                      enum:
                        - calendar_period
                        - anniversary
                      description: >

                        Alignment of product billing cycles. Only applies when
                        creating a subscription from a plan. If omitted, the
                        billing cycles alignment configured in the account
                        subscription settings applies.


                        - `calendar_period`: The billing cycles of the products
                        will be aligned on the calendar period, after the first
                        period which will be invoiced taking into account the
                        prorata of the first cycle compared to the product
                        periodicity.

                        - `anniversary`: The billing cycles of the products will
                        be aligned on the anniversary of the phase initial
                        billing date.
                    checkout_session:
                      type: object
                      properties:
                        send_to:
                          type: object
                          properties:
                            email:
                              type: string
                              format: email
                              description: >-
                                Email address to which we'll automatically send
                                a message with the checkout link.
                            message:
                              type: string
                              description: >-
                                Custom message to include in the email send. If
                                not provided, we will use a generic one.
                          required:
                            - email
                        redirect_url:
                          type: string
                          format: uri
                          description: >-
                            URL to which Hyperline redirects the user after the
                            completion of the checkout.
                        cancelled_redirect_url:
                          type: string
                          format: uri
                          description: >-
                            URL to which Hyperline redirects the user opening
                            the checkout link once the checkout is cancelled,
                            instead of the expired checkout page. Overrides the
                            account-wide cancelled checkout redirect URL.
                            `checkout_id`, `customer_id`, `invoice_id` and
                            `subscription_id` are appended as query parameters
                            when available.
                      description: Checkout session of the subscription.
              title: Without phases
              description: >

                If a `template_id` or a `template_configuration_id` is
                specified, the subscription will be created from scratch, and
                the template will only be referenced for reporting purposes.


                Use `From template` option to create a subscription from a
                template.
            - allOf:
                - type: object
                  properties:
                    phases:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            description: Name of the subscription phase.
                            example: Initial term
                          type:
                            type: string
                            enum:
                              - setup
                              - trial
                              - standard
                            default: standard
                            description: >

                              Type of subscription phase.


                              - `setup`: The phase represents a non-recurring
                              service setup period, often used before the actual
                              recurring subscription begins.

                              - `trial`: The phase represents a non-recurring
                              trial period, often used to allow users to opt out
                              or experience a free test.

                              - `standard`: The phase represents a standard
                              recurring billing.
                            example: standard
                          status:
                            type: string
                            enum:
                              - finished
                              - pending
                            default: pending
                            description: >

                              Status of subscription phase.


                              - `pending`: The phase is waiting to start (not
                              started yet).

                              - `active`: The phase is currently in progress.

                              - `finished`: The phase has ended and is complete.
                            example: pending
                          order:
                            type: number
                            description: >-
                              Order in which the phase is executed within all
                              subscription phases.
                            example: 0
                          activation_strategy:
                            type: string
                            enum:
                              - immediately
                              - manual
                              - start_date
                              - quote_signature
                              - checkout
                              - contract_start_date
                              - previous_phase_end
                            description: >

                              Activation strategy of subscription phase.


                              - `immediately`: The phase starts as soon as the
                              subscription is activated.

                              - `manual`: The phase starts when a user manually
                              activates it.

                              - `start_date`: The phase starts on a specified
                              date.

                              - `quote_signature`: The phase starts when the
                              subscription quote is signed.

                              - `checkout`: The phase starts when the
                              subscription checkout is completed.

                              - `contract_start_date`: The phase starts on the
                              start date of the related subscription contract.

                              - `previous_phase_end`: The phase starts when the
                              previous phase ends.
                            example: manual
                          end_strategy:
                            type: string
                            enum:
                              - manual
                              - end_date
                              - duration
                              - contract_end_date
                            description: >

                              End strategy of subscription phase.


                              - `manual`: The phase ends when a user manually
                              stops it.

                              - `end_date`: The phase ends on a specified date.

                              - `duration`: The phase ends after a specific
                              relative duration.

                              - `contract_end_date`: The phase ends on the end
                              date of the related subscription contract.
                            example: duration
                          duration:
                            type: object
                            properties:
                              period:
                                type: string
                                enum:
                                  - days
                                  - weeks
                                  - months
                                  - years
                              count:
                                type: integer
                                minimum: 1
                                default: 1
                            required:
                              - period
                            description: >-
                              Interval over which the subscription phase spans.
                              Only applies to `duration` end strategy.
                            example:
                              count: 1
                              period: years
                          billing_date_setting:
                            type: string
                            enum:
                              - phase_start
                              - specific_date
                            description: >

                              Represents when the first billing date occurs.


                              - `phase_start`: Aligns with the start of the
                              phase.

                              - `specific_date`: Occurs on a specified date.
                            example: phase_start
                          initial_billing_at:
                            type: string
                            format: date-time
                            description: >-
                              Date when the subscription phase will start being
                              billed. Only applies to `specific_date` billing
                              date setting. UTC date time string in the [ISO
                              8601](https://en.wikipedia.org/wiki/ISO_8601)
                              format.
                            example: '2024-12-20T16:04:11Z'
                          starts_at:
                            type: string
                            format: date-time
                            description: >-
                              Actual start date of the phase. UTC date time
                              string in the [ISO
                              8601](https://en.wikipedia.org/wiki/ISO_8601)
                              format.
                            example: '2024-12-20T16:04:11Z'
                          ends_at:
                            type: string
                            format: date-time
                            description: >-
                              Actual end date of the phase. UTC date time string
                              in the [ISO
                              8601](https://en.wikipedia.org/wiki/ISO_8601)
                              format.
                            example: '2024-12-20T16:04:11Z'
                          billing_cycle_alignment:
                            type: string
                            enum:
                              - calendar_period
                              - anniversary
                            description: >

                              Alignment of product billing cycles. If omitted at
                              creation, the billing cycles alignment configured
                              in the account subscription settings applies.


                              - `calendar_period`: The billing cycles of the
                              products will be aligned on the calendar period,
                              after the first period which will be invoiced
                              taking into account the prorata of the first cycle
                              compared to the product periodicity.

                              - `anniversary`: The billing cycles of the
                              products will be aligned on the anniversary of the
                              phase initial billing date.
                            example: anniversary
                          do_not_invoice_phase:
                            type: boolean
                            default: false
                            description: >-
                              Indicates if the phase should be invoiced. If set
                              to true, the phase will not generate any invoices.
                            example: false
                          minimum_invoice_fee:
                            type:
                              - number
                              - 'null'
                            minimum: 0
                            description: >-
                              Phase minimum fee in minor currency units, after
                              discounts and before tax. Null disables it and
                              clears the product selection.
                            example: 10000
                          minimum_invoice_fee_products:
                            type:
                              - array
                              - 'null'
                            items:
                              type: string
                            description: >-
                              Catalog product IDs eligible for the phase minimum
                              fee. Null or an empty list includes all billed
                              debit products in the phase.
                            example:
                              - itm_aaaaaaaaaaaaaa
                          transition_calculation_method:
                            type: string
                            enum:
                              - prorata
                              - pay_in_full
                              - none
                            default: prorata
                            description: >

                              Calculation method used when transitioning from
                              one phase to the next one.


                              - `prorata`: The prorated amount between the two
                              phases relative to the end date (the transition
                              date) must be paid.

                              - `pay_in_full`: The full amount for the phase
                              billing period must be paid.

                              - `none`: No amount will need to be paid, phase
                              will simply transition from one to the next.
                            example: prorata
                          transition_invoicing_schedule:
                            type: string
                            enum:
                              - immediately
                            default: immediately
                            description: >

                              Represents when the transition amount will be
                              invoiced.


                              - `immediately`: An invoice will be generated
                              immediately with the corresponding amount.
                            example: immediately
                          products:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  description: Product ID.
                                  example: itm_FJKlqUb8COXw55
                                catalog_version_id:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    ID of a published catalog version to price
                                    this product from, instead of the live
                                    products catalog. Ignored when `price` or
                                    `prices` is set. The product must be priced
                                    in that version.
                                  example: pcv_9x8v7u6t5s4r
                                price_configuration_id:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    ID of the product's price configuration to
                                    price this product from, instead of the one
                                    the catalog rules select. It must be a live
                                    base configuration of the product (not
                                    archived or replaced by a later catalog
                                    publish, and not specific to a customer,
                                    price book, customer segment or plan), in
                                    the subscription's currency. Requires
                                    `payment_interval`, which it must match. The
                                    configuration's country and commitment
                                    restrictions are not checked. With a pinned
                                    catalog version, the product is priced from
                                    that version's copy of the configuration,
                                    and a configuration the version doesn't
                                    price returns a 400. Cannot be combined with
                                    `price`, `prices` or `plan_id`.
                                  example: prc_8f3kXODIM1sBwB
                                name:
                                  type: string
                                  description: >-
                                    Product name. This will appear on the final
                                    invoices.
                                  example: Product name
                                description:
                                  type: string
                                  description: >-
                                    Product description. This will appear on the
                                    final invoices.
                                  example: A description of the product.
                                description_display_interval_dates:
                                  type: boolean
                                  default: false
                                  description: >-
                                    Indicates if the dates of the interval
                                    should be automatically added in the product
                                    description on the invoices.
                                payment_interval:
                                  anyOf:
                                    - type: object
                                      properties:
                                        period:
                                          type: string
                                          enum:
                                            - once
                                      required:
                                        - period
                                      title: Once
                                      example:
                                        period: once
                                    - type: object
                                      properties:
                                        period:
                                          type: string
                                          enum:
                                            - days
                                            - weeks
                                            - months
                                            - years
                                        count:
                                          type: integer
                                          minimum: 1
                                          default: 1
                                      required:
                                        - period
                                      title: Period
                                      example:
                                        period: months
                                        count: 1
                                  description: >-
                                    Interval on which the product is billed.
                                    This interval can be different between
                                    products and can differ from the
                                    subscription commitment interval.
                                payment_schedule:
                                  type: string
                                  enum:
                                    - start
                                    - end
                                  description: >-
                                    Indicates if the product should be billed at
                                    the start or the end of the payment
                                    interval.
                                  example: start
                                price:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - fee
                                    amount:
                                      type: number
                                      description: >-
                                        Monetary amount. Expressed in currency's
                                        smallest unit.
                                  required:
                                    - type
                                    - amount
                                  description: >-
                                    Similar to `prices`, allow to apply a single
                                    fee price more easily.
                                  example:
                                    type: fee
                                    amount: 200
                                prices:
                                  type: array
                                  items:
                                    oneOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - fee
                                          amount:
                                            type: number
                                            description: >-
                                              Monetary amount. Expressed in currency's
                                              smallest unit.
                                        required:
                                          - type
                                          - amount
                                        title: Fee price
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - volume
                                          amount:
                                            type: number
                                            description: >-
                                              Monetary amount of the price for the
                                              number of units defined by `unit_count`.
                                              Expressed in currency's smallest unit.
                                          unit_count:
                                            type: number
                                            description: >-
                                              Number of units considered for the
                                              amount.
                                          from:
                                            type: number
                                            description: From limit.
                                          to:
                                            type:
                                              - number
                                              - 'null'
                                            description: To limit.
                                          on_tier_incomplete:
                                            type:
                                              - string
                                              - 'null'
                                            enum:
                                              - pro_rata
                                              - pay_in_full
                                              - do_not_charge
                                              - flat_per_tier
                                            default: pro_rata
                                            description: >-

                                              Logic used to compute the amount when
                                              usage on the tier is incomplete.


                                              - `pro_rata`: The amount is computed
                                              using the pro rata of the tier's
                                              consumption.

                                              - `pay_in_full`: The amount corresponds
                                              to the full payment of the tier.

                                              - `do_not_charge`: The tier is not
                                              charged and ignored.

                                              - `flat_per_tier`: The tier's `amount`
                                              is a flat fee, billed once as soon as
                                              usage reaches the tier, whatever the
                                              number of units in it. `unitCount` is
                                              ignored. No usage bills nothing.
                                                
                                          metering_filter:
                                            allOf:
                                              - $ref: '#/components/schemas/MeteringFilter'
                                              - type: object
                                                description: >-
                                                  Metering filter that scopes which
                                                  billable events are eligible for this
                                                  price tier. Only present when the price
                                                  is filtered.
                                        required:
                                          - type
                                          - amount
                                          - unit_count
                                          - from
                                          - to
                                        title: Volume price
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - packaged
                                          amount:
                                            type: number
                                            description: >-
                                              Monetary amount of the price for the
                                              number of units defined by `unit_count`.
                                              Expressed in currency's smallest unit.
                                          unit_count:
                                            type: number
                                            description: >-
                                              Number of units considered for the
                                              amount.
                                          from:
                                            type: number
                                            description: From limit.
                                          to:
                                            type:
                                              - number
                                              - 'null'
                                            description: To limit.
                                          on_bucket_incomplete:
                                            type:
                                              - string
                                              - 'null'
                                            enum:
                                              - pro_rata
                                              - pay_in_full
                                              - do_not_charge
                                              - flat_per_tier
                                            default: pro_rata
                                            description: >-

                                              Logic used to compute the amount when
                                              usage reaches an incomplete bucket (the
                                              bucket size corresponds to the
                                              `unitCount`).

                                                - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.
                                                - `pay_in_full`: The amount corresponds to the full payment of the bucket.
                                                - `do_not_charge`: The bucket is not charged and ignored.
                                                - `flat_per_tier`: The tier's `amount` is a flat fee, billed once as soon as usage reaches the tier, whatever the number of units in it. `unitCount` is ignored. No usage bills nothing.
                                                  
                                          metering_filter:
                                            allOf:
                                              - $ref: '#/components/schemas/MeteringFilter'
                                              - type: object
                                                description: >-
                                                  Metering filter that scopes which
                                                  billable events are eligible for this
                                                  price tier. Only present when the price
                                                  is filtered.
                                        required:
                                          - type
                                          - amount
                                          - unit_count
                                          - from
                                          - to
                                        title: Packaged price
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - bulk
                                          amount:
                                            type: number
                                            description: >-
                                              Monetary amount of the price for the
                                              number of units defined by `unit_count`.
                                              Expressed in currency's smallest unit.
                                          unit_count:
                                            type: number
                                            description: >-
                                              Number of units considered for the
                                              amount.
                                          to:
                                            type:
                                              - number
                                              - 'null'
                                            description: To limit.
                                          on_tier_incomplete:
                                            type:
                                              - string
                                              - 'null'
                                            enum:
                                              - pro_rata
                                              - pay_in_full
                                              - do_not_charge
                                              - flat_per_tier
                                            default: pro_rata
                                            description: >-

                                              Logic used to compute the amount when
                                              usage on the tier is incomplete.


                                              - `pro_rata`: The amount is computed
                                              using the pro rata of the tier's
                                              consumption.

                                              - `pay_in_full`: The amount corresponds
                                              to the full payment of the tier.

                                              - `do_not_charge`: The tier is not
                                              charged and ignored.

                                              - `flat_per_tier`: The tier's `amount`
                                              is a flat fee, billed once as soon as
                                              usage reaches the tier, whatever the
                                              number of units in it. `unitCount` is
                                              ignored. No usage bills nothing.
                                                
                                          metering_filter:
                                            allOf:
                                              - $ref: '#/components/schemas/MeteringFilter'
                                              - type: object
                                                description: >-
                                                  Metering filter that scopes which
                                                  billable events are eligible for this
                                                  price tier. Only present when the price
                                                  is filtered.
                                        required:
                                          - type
                                          - amount
                                          - unit_count
                                          - to
                                        title: Bulk price
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - bps
                                          from:
                                            type: number
                                            description: From limit.
                                          to:
                                            type:
                                              - number
                                              - 'null'
                                            description: To limit.
                                          percentage:
                                            type: number
                                            description: >-
                                              Percentage applied on each unit to
                                              compute the usage.
                                          per_unit_cap:
                                            type:
                                              - number
                                              - 'null'
                                            description: >-
                                              Maximum amount for one unit. Expressed
                                              in currency's smallest unit.
                                          per_unit_floor:
                                            type:
                                              - number
                                              - 'null'
                                            description: >-
                                              Minimum amount for one unit. Expressed
                                              in currency's smallest unit.
                                          per_unit_fee:
                                            type:
                                              - number
                                              - 'null'
                                            description: >-
                                              Fee amount applied per unit. Expressed
                                              in currency's smallest unit.
                                          metering_filter:
                                            allOf:
                                              - $ref: '#/components/schemas/MeteringFilter'
                                              - type: object
                                                description: >-
                                                  Metering filter that scopes which
                                                  billable events are eligible for this
                                                  price tier. Only present when the price
                                                  is filtered.
                                        required:
                                          - type
                                          - from
                                          - to
                                          - percentage
                                          - per_unit_cap
                                          - per_unit_floor
                                          - per_unit_fee
                                        title: BPS price
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - bundle
                                          amount:
                                            type: number
                                            description: >-
                                              Monetary amount of the price for the
                                              number of units defined by `unit_count`.
                                              Expressed in currency's smallest unit.
                                          unit_count:
                                            type: number
                                            description: >-
                                              Number of units considered for the
                                              amount.
                                        required:
                                          - type
                                          - amount
                                          - unit_count
                                        title: Bundle price
                                        description: >-
                                          For seat products only, if you are
                                          looking for credits, use a fee price
                                  description: >-
                                    Prices of the product. If not specified, the
                                    matching prices (depending on the currency,
                                    interval, etc) of the product defined in the
                                    products catalog/plan are used.
                                  example:
                                    - type: volume
                                      from: 0
                                      to: 20
                                      amount: 200
                                      unit_count: 1
                                      on_tier_incomplete: null
                                    - type: volume
                                      from: 20
                                      to: null
                                      amount: 150
                                      unit_count: 1
                                      on_tier_incomplete: null
                                count:
                                  type: number
                                  minimum: 1
                                  description: >-
                                    Number of product units. Only applies to
                                    products of type `flat_fee`, `seat` or
                                    `credit`.
                                  example: 2
                                unit_name:
                                  type: string
                                  description: >-
                                    Product name. This will appear on the final
                                    invoices. Only applies to products of type
                                    `seat` or `usage`.
                                  example: user
                                min_committed_count:
                                  type: number
                                  minimum: 1
                                  description: >-
                                    Minimum of units committed. If usage is less
                                    than this number, then this value will be
                                    used. Only applies to products of type
                                    `usage`.
                                min_amount:
                                  type:
                                    - number
                                    - 'null'
                                  description: >-
                                    Minimum amount billed. If the final computed
                                    amount from the usage for this product is
                                    less than this amount, then this value will
                                    be used. Only applies to products of type
                                    `usage`.
                                max_amount:
                                  type:
                                    - number
                                    - 'null'
                                  description: >-
                                    Maximum amount billed. If the final computed
                                    amount from the usage for this product is
                                    greater than this amount, then this value
                                    will be used. Only applies to products of
                                    type `usage`.
                                charging_method:
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - prorata
                                    - pay_in_full
                                    - do_not_charge
                                  description: >-
                                    Charging method for seat count updates
                                    within the current billing period. Only
                                    applies to connected seat products.


                                    - `prorata`: Price calculated proportionally
                                    to time elapsed in the billing period.

                                    - `pay_in_full`: Price calculated for the
                                    entire billing period.

                                    - `do_not_charge`: No charge for the update.
                                seat_invoicing_schedule:
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - immediately
                                    - next_invoice
                                    - custom
                                  description: >

                                    Policy defining when seat count changes are
                                    invoiced. Only applies to connected seat
                                    products.


                                    - `immediately`: Seat changes are invoiced
                                    immediately.

                                    - `next_invoice`: Seat changes are invoiced
                                    at the next invoice.

                                    - `custom`: Seat changes are invoiced on a
                                    custom schedule.
                                metering_interval_type:
                                  type: string
                                  enum:
                                    - subscription_commitment
                                    - payment_interval
                                    - full_database
                                    - phase_duration
                                    - custom
                                  description: >-

                                    Indicates on which type of interval the
                                    usage should be aggregated.


                                    - `subscription_commitment`: For the usage
                                    contained within the subscription commitment
                                    period.

                                    - `payment_interval`: For the usage
                                    contained within the payment interval of the
                                    product.

                                    - `full_database`: For all the usage we
                                    ingested for this product, no matter the
                                    period.

                                    - `phase_duration`: For the usage contained
                                    within the subscription phase.

                                    - `custom`: For the usage contained within a
                                    custom interval that starts with the phase
                                    and renews independently of the billing
                                    interval. Requires `metering_interval` to be
                                    set.
                                       Only applies to products of type `usage`.
                                metering_interval:
                                  type: object
                                  properties:
                                    period:
                                      type: string
                                      enum:
                                        - days
                                        - weeks
                                        - months
                                        - years
                                    count:
                                      type: integer
                                      minimum: 1
                                  required:
                                    - period
                                    - count
                                  description: >-
                                    Custom interval for usage aggregation.
                                    Required when `metering_interval_type` is
                                    `custom`. The interval starts at the phase
                                    start and renews on its own cycle (e.g. `{
                                    period: 'months', count: 3 }` for quarterly
                                    metering with monthly billing). Only applies
                                    to products of type `usage`.
                                bill_usage_difference:
                                  anyOf:
                                    - type: boolean
                                    - type: string
                                      enum:
                                        - 'true'
                                        - 'false'
                                  default: false
                                  description: >-
                                    Only bill the usage difference comparing to
                                    the previous period (i.e. actual amount
                                    minus last invoice amount). Doesn't apply to
                                    `payment_interval` metering interval type.
                                    Only applies to products of type `usage`.
                                children_usage_aggregation:
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - sum
                                    - max
                                  description: >-

                                    Controls whether a parent organization's
                                    metered usage is billed on the combined
                                    usage of the parent and its direct children,
                                    and how per-member values are combined.


                                    - `null`: Organization-based usage is
                                    disabled. Only the subscription customer's
                                    own usage is billed.

                                    - `sum`: The usage values of the parent and
                                    each direct child are added together
                                    (organization total).

                                    - `max`: Only the single highest-consuming
                                    member (parent or one direct child) is
                                    billed.
                                     Only applies to products of type `usage`.
                                credits_expiration_in_days:
                                  type:
                                    - number
                                    - 'null'
                                  description: >-
                                    Validity in days for credits that will be
                                    topped-up automatically. Once the period has
                                    passed, they'll expire.
                                expire_credits_at_end_of_period:
                                  anyOf:
                                    - type: boolean
                                    - type: string
                                      enum:
                                        - 'true'
                                        - 'false'
                                  default: false
                                  description: >-
                                    Automatically set the expiration date to the
                                    end of the next period for each topup. Takes
                                    priority on `creditsExpirationInDays`
                                credits_balance_auto_creation_enabled:
                                  anyOf:
                                    - type: boolean
                                    - type: string
                                      enum:
                                        - 'true'
                                        - 'false'
                                  description: >-
                                    Whether to create the customer credit
                                    balance as soon as the product is added to
                                    the subscription. Defaults to the credit
                                    product's
                                    `credits_balance_auto_creation_enabled`
                                    (`true` when unset). Set to `false` to
                                    create the balance by hand before
                                    activation, e.g. on quote-based renewals
                                    where the balance must not start consuming
                                    before signature; the first top-up creates
                                    it if still missing.
                              required:
                                - id
                            description: Products comprising the subscription phase.
                          coupons:
                            type: array
                            items:
                              allOf:
                                - anyOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: string
                                          description: >-
                                            ID of the catalog coupon to apply to the
                                            subscription.
                                      required:
                                        - id
                                      title: Existing coupon
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - amount
                                        name:
                                          type: string
                                          description: Coupon name.
                                        discount_amount:
                                          type: number
                                          exclusiveMinimum: 0
                                          description: >-
                                            Coupon discount amount. Expressed in
                                            currency's smallest unit.
                                      required:
                                        - type
                                        - discount_amount
                                      title: Coupon amount
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - percent
                                        name:
                                          type: string
                                          description: Coupon name.
                                        discount_percent:
                                          type: number
                                          exclusiveMinimum: 0
                                          maximum: 100
                                          description: Coupon discount percentage.
                                      required:
                                        - type
                                        - discount_percent
                                      title: Coupon percent
                                - type: object
                                  properties:
                                    repeat:
                                      type:
                                        - string
                                        - 'null'
                                      enum:
                                        - once
                                        - forever
                                        - custom
                                        - duration
                                      description: >

                                        Coupon frequency. Required for inline
                                        coupons. Optional when an existing
                                        coupon `id` is provided: if omitted,
                                        defaults to the catalog coupon's repeat
                                        value.


                                        - `once`: Will apply the coupon only to
                                        the first one invoice.

                                        - `forever`: Will apply the coupon to
                                        all invoices.

                                        - `custom`: Will apply to coupon until a
                                        specified expiration date.

                                        - `duration`: Will apply the coupon for
                                        a specific duration (e.g., 3 months).
                                    duration_period:
                                      type: string
                                      enum:
                                        - days
                                        - weeks
                                        - months
                                        - years
                                      description: >-
                                        Period of time for which the coupon will
                                        be applied. Only applies to the
                                        `duration` coupon frequency.
                                    duration_count:
                                      type: number
                                      description: >-
                                        Number of periods for which the coupon
                                        will be applied. Only applies to the
                                        `duration` coupon frequency.
                                    expires_at:
                                      type: string
                                      format: date-time
                                      description: >-
                                        Coupon expiration date. Only applies to
                                        the `custom` coupon frequency. UTC date
                                        time string in the [ISO
                                        8601](https://en.wikipedia.org/wiki/ISO_8601)
                                        format.
                                      example: '2024-12-20T16:04:11Z'
                                    apply_at:
                                      type: string
                                      format: date-time
                                      description: >-
                                        Coupon first application date. UTC date
                                        time string in the [ISO
                                        8601](https://en.wikipedia.org/wiki/ISO_8601)
                                        format.
                                      example: '2024-12-20T16:04:11Z'
                                    product_ids:
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: string
                                      minItems: 1
                                      description: >-
                                        Products the coupon is scoped to on this
                                        subscription, read together with
                                        `product_scope`: the only discounted
                                        products when `include`, the products
                                        never discounted when `exclude`, null
                                        when `all`. When sent without
                                        `product_scope`, it is an `include`
                                        list, except that a coupon already
                                        stored as `exclude` keeps `exclude` when
                                        its phase is updated; when empty or
                                        omitted, the catalog coupon's scope is
                                        copied.
                                    product_scope:
                                      type:
                                        - string
                                        - 'null'
                                      enum:
                                        - all
                                        - include
                                        - exclude
                                      description: >-
                                        Which products the coupon discounts on
                                        this subscription. `all`: every product
                                        (`product_ids` must be empty).
                                        `include`: only the products in
                                        `product_ids`. `exclude`: every product
                                        except those in `product_ids` (lines
                                        without a product stay discounted). When
                                        sent, it replaces the catalog coupon's
                                        scope together with `product_ids`. When
                                        omitted, it is inferred: `include` if
                                        `product_ids` is non-empty, else the
                                        catalog coupon's scope. On a phase
                                        update, a coupon already stored as
                                        `exclude` keeps `exclude` when
                                        `product_ids` is sent without
                                        `product_scope`.
                            description: Coupons comprising the subscription phase.
                        required:
                          - activation_strategy
                          - end_strategy
                          - billing_date_setting
                          - products
                  required:
                    - phases
                - type: object
                  properties:
                    name:
                      type: string
                      description: Subscription custom name.
                    purchase_order:
                      type: string
                      description: Reference to the purchase order.
                    invoicing_entity_id:
                      type: string
                      description: >-
                        ID of the invoicing entity attached to the subscription.
                        If not defined, fallback to customer's invoicing entity.
                      example: ive_jerrb484RHn
                    crm_opportunity_id:
                      type: string
                      description: ID of the related opportunity/deal in the connected CRM.
                    commitment_interval:
                      type: object
                      properties:
                        period:
                          type: string
                          enum:
                            - days
                            - weeks
                            - months
                            - years
                        count:
                          type: number
                          minimum: 1
                      required:
                        - period
                        - count
                      description: Deprecated field, please use `contract_terms`.
                      example:
                        period: years
                        count: 1
                      deprecated: true
                    renew_automatically:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      default: true
                      description: Deprecated field, please use `contract_terms`.
                      example: true
                      deprecated: true
                    renew_for:
                      type: object
                      properties:
                        period:
                          type: string
                          enum:
                            - days
                            - weeks
                            - months
                            - years
                        count:
                          type: number
                      required:
                        - period
                        - count
                      description: Deprecated field, please use `contract_terms`.
                      example:
                        period: years
                        count: 1
                      deprecated: true
                    minimum_invoice_fee:
                      type:
                        - number
                        - 'null'
                      description: >-
                        Minimum fee applied to each invoice outside of one time
                        payments.
                      example: 250
                    contract_terms:
                      allOf:
                        - type: object
                          properties:
                            starts_at:
                              type: string
                              format: date-time
                              description: >-
                                Start date of the contract. UTC date time string
                                in the [ISO
                                8601](https://en.wikipedia.org/wiki/ISO_8601)
                                format.
                              example: '2024-12-20T16:04:11Z'
                            ends_at:
                              type: string
                              format: date-time
                              description: >-
                                End date of the contract. UTC date time string
                                in the [ISO
                                8601](https://en.wikipedia.org/wiki/ISO_8601)
                                format.
                              example: '2024-12-20T16:04:11Z'
                            duration:
                              type: object
                              properties:
                                period:
                                  type: string
                                  enum:
                                    - days
                                    - weeks
                                    - months
                                    - years
                                count:
                                  type: integer
                                  minimum: 1
                                  default: 1
                              required:
                                - period
                              description: >-
                                Interval over which the contract initially
                                spans. Only applies to `duration` end strategy.
                              example:
                                count: 6
                                period: months
                            renew_automatically:
                              anyOf:
                                - type: boolean
                                - type: string
                                  enum:
                                    - 'true'
                                    - 'false'
                              description: >

                                Indicates if the contract should be renewed
                                automatically.


                                - `true`: The contract will be renewed
                                automatically.

                                - `false`: The contract will not be renewed
                                automatically.
                              example: true
                            renew_for_duration:
                              type: object
                              properties:
                                period:
                                  type: string
                                  enum:
                                    - days
                                    - weeks
                                    - months
                                    - years
                                count:
                                  type: integer
                                  minimum: 1
                                  default: 1
                              required:
                                - period
                              description: >

                                Interval over which the contract will be
                                renewed. Only applies if `renew_automatically`
                                is true.
                              example:
                                count: 1
                                period: years
                        - type: object
                          properties:
                            activation_strategy:
                              type: string
                              enum:
                                - start_date
                                - immediately
                                - manual
                                - quote_signature
                                - checkout
                              description: >

                                Activation strategy of the contract.


                                - `immediately`: The contract will be activated
                                immediately.

                                - `manual`: The contract will be activated when
                                a user manually activates it.

                                - `start_date`: The contract will be activated
                                on a specified date.

                                - `quote_signature`: The contract will be
                                activated when the subscription quote is signed.

                                - `checkout`: The contract will be activated
                                when the subscription checkout is completed.
                              example: start_date
                            end_strategy:
                              type: string
                              enum:
                                - end_date
                                - duration
                                - manual
                              description: >

                                End strategy of contract.


                                - `manual`: The contract ends when a user
                                manually stops it.

                                - `end_date`: The contract ends on a specified
                                date.

                                - `duration`: The contract ends after a specific
                                relative duration, unless `renew_automatically`
                                is true.
                              example: duration
                          required:
                            - activation_strategy
                            - end_strategy
                      description: Contract terms linked to the subscription.
                    starts_at:
                      type: string
                      format: date-time
                      description: >-
                        Applies only if the activation strategy is `start_date`.
                        UTC date time string in the [ISO
                        8601](https://en.wikipedia.org/wiki/ISO_8601) format.
                      example: '2024-12-20T16:04:11Z'
                    contract_start:
                      type: string
                      format: date-time
                      description: Deprecated field, please use `contract_terms`.
                      example: '2024-01-15T00:00:00Z'
                      deprecated: true
                    contract_end:
                      type: string
                      format: date-time
                      description: Deprecated field, please use `contract_terms`.
                      example: '2025-01-15T00:00:00Z'
                      deprecated: true
                    initial_billing_at:
                      type: string
                      format: date-time
                      description: >-
                        Date when the subscription will start being billed. If
                        not specified, it will correspond to the `starts_at`
                        date. UTC date time string in the [ISO
                        8601](https://en.wikipedia.org/wiki/ISO_8601) format.
                      example: '2024-12-20T16:04:11Z'
                    payment_method_id:
                      type: string
                      description: >-
                        ID of the customer's payment method used to pay the
                        subscription's invoices, instead of the customer's
                        default one. Cannot be combined with `bank_account_id`.
                        Omit to use the customer's payment method.
                      example: pm_abc123
                    bank_account_id:
                      type: string
                      description: >-
                        ID of the bank account displayed on the subscription's
                        invoices, which are then paid by bank transfer, instead
                        of the customer's default payment method. Cannot be
                        combined with `payment_method_id`. Omit to use the
                        customer's payment method.
                      example: bac_abc123
                    shipping_address_id:
                      type: string
                      description: >-
                        ID of the customer's active shipping address the
                        subscription ships to. Omit to use the customer shipping
                        destination: billing address or default shipping
                        address.
                      example: cad_abc123
                    display_shipping_details:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      description: >-
                        Indicates if the shipping details should be displayed on
                        the subscription's invoices.
                    cancel_at:
                      type: string
                      format: date-time
                      description: >-
                        Subscription cancel date. UTC date time string in the
                        [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
                        format.
                      example: '2024-12-20T16:04:11Z'
                    cancellation_strategy:
                      type: string
                      enum:
                        - refund_prorata
                        - refund_custom
                        - charge_prorata
                        - charge_custom
                        - end_of_period
                        - do_nothing
                      description: >

                        Strategy used to cancel the subscription. If not
                        specified `do_nothing` is used.


                        - `charge_prorata`: Will charge the customer the unpaid
                        amount for the prorated period up to the end of the
                        current period.

                        - `charge_custom`: Will charge the customer a custom
                        amount.

                        - `refund_prorata`: Will refund to the customer the
                        overpaid subscription amount using prorated calculations
                        on the cancellation date.

                        - `refund_custom`: Will refund to the customer a custom
                        amount.

                        - `end_of_period`: Will cancel the subscription at the
                        end date of the current billing period.

                        - `do_nothing`: Will only cease the subscription without
                        any additional actions.
                    cancellation_amount:
                      type: number
                      description: >-
                        Custom amount used when cancelling the subscription.
                        Only applies to the `charge_custom` or the
                        `refund_custom` cancellation strategy.
                    cancellation_refund_method:
                      type: string
                      enum:
                        - wallet
                        - original_payment_method
                        - external
                      description: >-
                        Override the refund destination for credit notes
                        generated by `refund_prorata` / `refund_custom`
                        cancellation strategies. When omitted, falls back to the
                        invoicing entity's `creditNoteWalletRefundEnabled`
                        setting.
                    properties:
                      type: object
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                          - type: 'null'
                          - type: array
                            items:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                                - type: 'null'
                                - type: 'null'
                          - type: 'null'
                      description: >-
                        Key/value pairs to store any metadata useful in your
                        context.
                    custom_properties:
                      type: object
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                          - type: string
                            format: date-time
                            description: >-
                              UTC date time string in the [ISO
                              8601](https://en.wikipedia.org/wiki/ISO_8601)
                              format.
                            example: '2024-12-20T16:04:11Z'
                          - type: array
                            items:
                              type: string
                          - type: 'null'
                      description: >-
                        A list of key value with the slug of the custom property
                        as the key and the custom property value as value.
                    tax_only:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      description: Only tax will be charged on this subscription.
                    generate_draft_invoices:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      description: >-
                        Generate draft invoices for the subscription. Each
                        invoice will need to be reviewed and validated manually
                        before being sent
                    generate_document:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      description: Generate non-legal documents instead of invoices.
                    document_name:
                      type:
                        - string
                        - 'null'
                      description: >-
                        If `generate_document` is turned on, allows you to give
                        a name to your document.
                    add_tax_to_document:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      description: >-
                        If `generate_document` is turned on, will add taxes to
                        document.
                    do_not_charge_subscription:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      description: >-
                        Subscription will be invoiced but not charged
                        (invoices/documents will be settled directly).
                    invoice_custom_note:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Default custom note added to invoices generated by the
                        subscription.
                    invoice_schedule:
                      type:
                        - string
                        - 'null'
                      enum:
                        - period_start
                        - period_end
                      description: >

                        Defines when invoices are generated relative to the
                        billing period.


                        - `period_start`: Invoices are generated at the start of
                        the billing period.

                        - `period_end`: Invoices are generated at the end of the
                        billing period.
                - type: object
                  properties:
                    plan_id:
                      type: string
                      description: Deprecated field, please use `template_id`.
                      example: plan_zHmjoDee4ZRmQV
                      deprecated: true
                    template_id:
                      type: string
                      description: ID of the template that the subscription is linked to.
                      example: subt_7gdusOkqr5L0B8
                    template_configuration_id:
                      type: string
                      description: >-
                        ID of the template configuration that the subscription
                        is linked to.
                      example: subtc_7mHWOlPStUogvp
                - type: object
                  properties:
                    trial:
                      type: object
                      properties:
                        end_strategy:
                          type: string
                          enum:
                            - manual
                            - end_date
                            - duration
                          description: Defines how the free trial will end.
                        starts_at:
                          type: string
                          format: date-time
                          description: >-
                            Free trial start date. UTC date time string in the
                            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
                            format.
                          example: '2024-12-20T16:04:11Z'
                        ends_at:
                          type: string
                          format: date-time
                          description: >-
                            Free trial end date. Only applies if the end
                            strategy is `end_date`. UTC date time string in the
                            [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
                            format.
                          example: '2024-12-20T16:04:11Z'
                        duration:
                          type: object
                          properties:
                            period:
                              type: string
                              enum:
                                - days
                                - weeks
                                - months
                                - years
                              description: >-
                                Free trial duration period. Only applies if the
                                end strategy is `duration`.
                            count:
                              type: number
                              minimum: 1
                              description: >-
                                Free trial duration count. Only applies if the
                                end strategy is `duration`.
                          required:
                            - period
                            - count
                      required:
                        - end_strategy
                      description: >-
                        Create a free trial phase based on the plan
                        configuration. Only applies if a `plan_id` is provided.
                - type: object
                  properties:
                    payment_method_strategy:
                      type: string
                      enum:
                        - current
                        - external
                        - new
                      description: >

                        Payment method strategy used to bill the subscription.
                        By default, the current payment method of the customer
                        will be used.


                        - `new`: Ask the customer for a new payment method. The
                        customer can fill in their payment method either on the
                        subscription's checkout session or on their portal page.

                        - `current`: Use the current default payment method of
                        the customer.

                        - `external`: Manage the payments of the subscription
                        outside of Hyperline.
                      example: current
                    available_payment_method_types:
                      type: array
                      items:
                        type: string
                        enum:
                          - card
                          - apple_pay
                          - google_pay
                          - direct_debit
                          - direct_debit_ach
                          - direct_debit_bacs
                          - transfer
                      minItems: 1
                      description: >-
                        Set the allowed types of payment methods for the
                        customer. Only applies to the `new` payment method
                        strategy.
                    create_setup_phase:
                      anyOf:
                        - type: boolean
                        - type: string
                          enum:
                            - 'true'
                            - 'false'
                      description: >-
                        Deprecated field, no longer needed. We recommend not
                        using it going forward.
                      deprecated: true
                    billing_cycle_alignment:
                      type: string
                      enum:
                        - calendar_period
                        - anniversary
                      description: >

                        Alignment of product billing cycles. Only applies when
                        creating a subscription from a plan. If omitted, the
                        billing cycles alignment configured in the account
                        subscription settings applies.


                        - `calendar_period`: The billing cycles of the products
                        will be aligned on the calendar period, after the first
                        period which will be invoiced taking into account the
                        prorata of the first cycle compared to the product
                        periodicity.

                        - `anniversary`: The billing cycles of the products will
                        be aligned on the anniversary of the phase initial
                        billing date.
                    checkout_session:
                      type: object
                      properties:
                        send_to:
                          type: object
                          properties:
                            email:
                              type: string
                              format: email
                              description: >-
                                Email address to which we'll automatically send
                                a message with the checkout link.
                            message:
                              type: string
                              description: >-
                                Custom message to include in the email send. If
                                not provided, we will use a generic one.
                          required:
                            - email
                        redirect_url:
                          type: string
                          format: uri
                          description: >-
                            URL to which Hyperline redirects the user after the
                            completion of the checkout.
                        cancelled_redirect_url:
                          type: string
                          format: uri
                          description: >-
                            URL to which Hyperline redirects the user opening
                            the checkout link once the checkout is cancelled,
                            instead of the expired checkout page. Overrides the
                            account-wide cancelled checkout redirect URL.
                            `checkout_id`, `customer_id`, `invoice_id` and
                            `subscription_id` are appended as query parameters
                            when available.
                      description: Checkout session of the subscription.
              title: With phases
              description: >

                If a `template_id` or a `template_configuration_id` is
                specified, the subscription will be created from scratch, and
                the template will only be referenced for reporting purposes.


                Use `From template` option to create a subscription from a
                template.
            - type: object
              properties:
                template_id:
                  type: string
                  description: ID of the template that the subscription is linked to.
                  example: subt_7gdusOkqr5L0B8
                template_configuration_id:
                  type: string
                  description: >-
                    ID of the template configuration that the subscription is
                    linked to.
                  example: subtc_7mHWOlPStUogvp
                checkout_session:
                  type: object
                  properties:
                    send_to:
                      type: object
                      properties:
                        email:
                          type: string
                          format: email
                          description: >-
                            Email address to which we'll automatically send a
                            message with the checkout link.
                        message:
                          type: string
                          description: >-
                            Custom message to include in the email send. If not
                            provided, we will use a generic one.
                      required:
                        - email
                    redirect_url:
                      type: string
                      format: uri
                      description: >-
                        URL to which Hyperline redirects the user after the
                        completion of the checkout.
                    cancelled_redirect_url:
                      type: string
                      format: uri
                      description: >-
                        URL to which Hyperline redirects the user opening the
                        checkout link once the checkout is cancelled, instead of
                        the expired checkout page. Overrides the account-wide
                        cancelled checkout redirect URL. `checkout_id`,
                        `customer_id`, `invoice_id` and `subscription_id` are
                        appended as query parameters when available.
                  description: Checkout session of the subscription.
              required:
                - template_id
              additionalProperties: {}
              title: From template
              description: >

                If a `template_id` is specified without a
                `template_configuration_id`, the template configuration will be
                automatically retrieved from the customer details.


                If a product of the template configuration has no price yet, the
                request returns a 400 error until the product is priced on the
                template. Until then, create the subscription with explicit
                products instead (`Without phases` or `With phases` option),
                keeping `template_id` for reporting.


                If you want to customize subscription content, use `Without
                phases` or `With phases` option.
      description: >-
        The subscription to preview, as it would be sent to `POST
        /v2/subscriptions`. Nothing is created.
    PreviewNewSubscriptionTimelineCustomer:
      type: object
      properties:
        country:
          type:
            - string
            - 'null'
          enum:
            - AD
            - AE
            - AF
            - AG
            - AI
            - AL
            - AM
            - AO
            - AQ
            - AR
            - AS
            - AT
            - AU
            - AW
            - AX
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BF
            - BV
            - BW
            - BY
            - BZ
            - CA
            - CC
            - CD
            - CF
            - CG
            - CH
            - CI
            - CK
            - CL
            - CM
            - CN
            - CO
            - CR
            - CU
            - CV
            - CW
            - CX
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - EH
            - ER
            - ES
            - ES-CE
            - ES-ML
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FO
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GS
            - GT
            - GU
            - GW
            - GY
            - HK
            - HM
            - HN
            - HR
            - HT
            - HU
            - IC
            - ID
            - IE
            - IL
            - IM
            - IN
            - IO
            - IQ
            - IR
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KP
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NF
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PS
            - PT
            - PT-20
            - PT-30
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RU
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SJ
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SY
            - SZ
            - TC
            - TD
            - TF
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - UM
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - XK
            - YE
            - YT
            - ZA
            - ZM
            - ZW
          description: >-
            Country the customer would be billed in. Replaces the customer's
            billing and shipping addresses for tax: pass `zip` (and `state`
            where relevant) to locate it precisely, e.g. the Canary Islands or a
            French overseas department.
          example: DE
        zip:
          type:
            - string
            - 'null'
          maxLength: 20
          description: >-
            Zip code of the billing address. With `country`, completes it;
            without, replaces the zip of the customer's billing address.
          example: '10115'
        state:
          type:
            - string
            - 'null'
          description: >-
            State or province of the address, stored as its code (the second
            part of the ISO 3166-2 code, e.g. `CA` for `US-CA`) for:

            - United States: state, see [ISO
            3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)

            - Canada: province or territory, see [ISO
            3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)

            - Italy: province, see [ISO
            3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)

            - Brazil: state, see [ISO
            3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)


            A code or a name is accepted (e.g. `ON` or `Ontario`); a value that
            matches neither for these countries is rejected. For any other
            country, the state is ignored.
          example: CA
        type:
          type: string
          enum:
            - corporate
            - person
          description: Whether the customer would be a company or a person.
          example: corporate
        tax_id:
          type:
            - string
            - 'null'
          maxLength: 64
          description: >-
            Tax ID (VAT number) the customer would have; `null` previews it
            without one. A tax ID other than the customer's is checked with the
            tax registry, and counts as unverified when it cannot answer within
            2 seconds.
          example: DE811907980
      description: >-
        Fields of the customer (`subscription.customer_id`) to change for this
        preview only. Omitted fields keep the customer's values. The customer is
        not updated.
    SubscriptionPreviewTimelineEvent:
      type: object
      properties:
        type:
          type: string
          enum:
            - activation
            - renewal
            - within_phase_transition
            - subscription_transition
            - subscription_end
          description: >

            Type of the lifecycle event.


            - `activation`: The subscription is activated and its first billable
            period begins.

            - `renewal`: A billing period renews and issues its renewal invoice.

            - `within_phase_transition`: A change is applied within the current
            phase (e.g. a prorated mid-phase transition charge).

            - `subscription_transition`: A scheduled transition to another
            subscription is applied.

            - `subscription_end`: The subscription reaches its scheduled end. No
            document is projected for this event, though a real cancellation may
            still issue a final invoice or credit note depending on the
            cancellation method.
        date:
          type: string
          format: date-time
          description: The date the event fires at.
          example: '2024-12-20T16:04:11Z'
        invoices:
          type: array
          items:
            $ref: '#/components/schemas/SimulateInvoiceDetails'
          description: >-
            The invoice document(s) this event would issue: empty for an event
            that neither charges nor renews, one for a renewal or a prorata
            transition charge, two when a transition charge splits into a credit
            note and an invoice. These are best-effort projections, never
            persisted.
      required:
        - type
        - date
        - invoices
    SubscriptionPreviewTimelineStop:
      type: object
      properties:
        kind:
          type: string
          enum:
            - bounded
            - exhausted
            - truncated
          description: >

            How to read the event list.


            - `bounded`: The request's own `max_events`/`until` limit cut the
            projection — raise the limit for more.

            - `exhausted`: The subscription's billable lifecycle ends here;
            nothing further will be invoiced.

            - `truncated`: The engine would do more but the projection declined
            — the list is incomplete.
      required:
        - kind
      description: >-
        Why the projection stopped — required reading, since the walk truncates
        rather than failing, so a short list of events is otherwise ambiguous.
    MeteringFilter:
      type:
        - object
        - 'null'
      properties:
        name:
          type: string
          description: Name of the metering filter.
          example: VISA credit cards
        configuration:
          $ref: '#/components/schemas/MeteringFilterConfiguration'
      required:
        - name
        - configuration
      description: Metering filter to scope eligible billable events.
    SimulateInvoiceDetails:
      allOf:
        - allOf:
            - $ref: '#/components/schemas/InvoiceDeprecated'
            - type: object
              properties:
                public_url:
                  type:
                    - string
                    - 'null'
                  format: uri
                  description: >-
                    Public URL of the invoice page where the customer can pay
                    the invoice.
        - type: object
          properties:
            integrations:
              type: array
              items:
                type: object
                properties:
                  entity_id:
                    type: string
                    description: ID of the entity in the provider.
                  provider_name:
                    type: string
                    enum:
                      - adyen
                      - stripe
                      - mollie
                      - gocardless
                      - airwallex
                      - paypal
                      - salesforce
                      - hubspot
                      - attio
                      - xero
                      - pennylane
                      - zoho-books
                      - exact-online
                      - quickbooks
                      - netsuite
                      - rillet
                      - campfire
                      - dualentry
                      - datev
                      - anrok
                      - sphere
                      - chargebee
                      - slack
                      - plain
                      - zendesk
                      - pylon
                      - intercom
                      - front
                      - helpscout
                      - claap
                      - grain
                      - gong
                      - jiminny
                      - modjo
                      - posthog
                    description: Provider name.
                  provider_account_id:
                    type: string
                    description: ID of the connected provider account.
                  created_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      Creation date of the entity in the provider, when it was
                      imported from there. Exposed on products, coupons and
                      subscriptions; `null` when the provider does not report
                      one.
                    example: '2024-12-20T16:04:11Z'
                  activated_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: >-
                      Activation date of the entity in the provider, when it was
                      imported from there. Exposed on subscriptions; `null` when
                      the provider does not report one.
                    example: '2024-12-20T16:04:11Z'
                required:
                  - entity_id
                  - provider_name
                  - provider_account_id
                description: Reference to the entity in an external provider.
                example:
                  entity_id: '123456789'
                  provider_name: stripe
                  provider_account_id: acc_1234567890
          required:
            - integrations
    MeteringFilterConfiguration:
      type: object
      properties:
        conditional:
          type: string
          enum:
            - and
            - or
          description: >-
            Logical operator used to combine multiple filter fields. `and`
            requires all fields to match, `or` requires at least one.
        fields:
          type: array
          items:
            allOf:
              - type: object
                properties:
                  property:
                    type: string
                    description: Name of the event property to filter on.
                required:
                  - property
              - oneOf:
                  - type: object
                    properties:
                      operator:
                        type: string
                        enum:
                          - is_null
                          - is_not_null
                        description: Comparison operator to apply on the property value.
                    required:
                      - operator
                    title: Null check
                  - type: object
                    properties:
                      operator:
                        type: string
                        enum:
                          - in
                          - not_in
                        description: Comparison operator to apply on the property value.
                      value:
                        type: string
                    required:
                      - operator
                      - value
                    title: List match
                  - type: object
                    properties:
                      operator:
                        type: string
                        enum:
                          - gte
                          - gt
                          - lt
                          - lte
                        description: Comparison operator to apply on the property value.
                      value:
                        type: number
                    required:
                      - operator
                      - value
                    title: Numeric comparison
                  - type: object
                    properties:
                      operator:
                        type: string
                        enum:
                          - equals
                          - not_equal
                        description: Comparison operator to apply on the property value.
                      value:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                    required:
                      - operator
                      - value
                    title: Equality check
      required:
        - conditional
        - fields
      description: Configuration of the rules used to filter eligible events.
      example:
        conditional: and
        fields:
          - property: card_type
            operator: equals
            value: visa
          - property: kind
            operator: equals
            value: credit_card
    InvoiceDeprecated:
      type: object
      properties:
        id:
          type: string
          description: Invoice ID.
          example: inv_1eTaiytfA0i2Va
        number:
          type: string
          description: >-
            Invoice number. Generated by Hyperline using the sequential
            numbering and format defined in your settings.
          example: INV-35
        type:
          type: string
          enum:
            - invoice
            - credit_note
            - document
            - child_invoice_ref
            - child_creditnote_ref
          description: >-
            Type of the invoice.


            - `invoice`: Legal invoice to be paid by your customer.

            - `credit_note`: Legal credit note cancelling an invoice and
            refunding your customer.

            - `document`: Custom document with no legal value. Can be generated
            from a subscription to meet specific needs.
              
          example: invoice
        document_name:
          type:
            - string
            - 'null'
          description: >-
            If the invoice is of type `document` you can give it a custom name
            (displayed on the final PDF).
          example: null
        status:
          type: string
          enum:
            - draft
            - pending_approval
            - changes_requested
            - open
            - to_pay
            - grace_period
            - partially_paid
            - paid
            - voided
            - closed
            - error
            - missing_info
            - archived
            - charged_on_parent
            - pending_parent_concat
            - pending_consolidation
            - consolidated
            - uncollectible
          description: >
            Current invoice status.


            - `draft`: Invoice is in draft mode (not finalized yet).

            - `open`: Invoice for the current billing period, which will be
            issued at the end of the period (used for invoices with usage-based
            data).

            - `grace_period`: Invoice is in a review period after being issued
            for the billing period and before becoming due for payment.

            - `to_pay`: Invoice is awaiting payment.

            - `partially_paid`: Invoice is partially paid.

            - `paid`: Invoice is fully paid.

            - `voided`: Invoice has been voided and is no longer valid.

            - `closed`: Invoice was not issued and has been discarded.

            - `error`: Invoice failed to be paid.

            - `archived`: A previous version of an invoice.

            - `charged_on_parent`: Invoice is charged on the parent customer.

            - `pending_parent_concat`: Invoice is pending invoices concatenation
            on the parent customer to be grouped.

            - `uncollectible`: Invoice is uncollectible (bad debt). Only
            metadata (properties, custom_note, custom_properties) can be updated
            in this status.
          example: paid
        reference:
          type:
            - string
            - 'null'
          description: >-
            Unique identifier to ease reconciliation with payment. Useful for
            bank transfer.
          example: V0KAHOU6J3
        purchase_order:
          type:
            - string
            - 'null'
          description: Reference to the purchase order linked to the invoice.
          example: PO-12345
        currency:
          type: string
          enum:
            - EUR
            - AED
            - AFN
            - XCD
            - ALL
            - AMD
            - AOA
            - ARS
            - USD
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - XOF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - NOK
            - BWP
            - BYR
            - BZD
            - CAD
            - CDF
            - XAF
            - CHF
            - NZD
            - CLP
            - CNY
            - COP
            - CRC
            - CUP
            - CVE
            - ANG
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EGP
            - MAD
            - ERN
            - ETB
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LYD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZN
            - NAD
            - XPF
            - NGN
            - NIO
            - NPR
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SSP
            - STD
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - UYU
            - UZS
            - VEF
            - VND
            - VUV
            - WST
            - YER
            - ZAR
            - ZMW
            - ZWL
          description: >-
            Currency code. See [ISO
            4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).
          example: EUR
        source:
          type: string
          enum:
            - hyperline
            - api
            - pennylane
            - chargebee
            - stripe
            - lago
            - sequence
            - other
          description: |
            Source of the invoice.
                - `hyperline`: Invoice created by Hyperline.
                - `api`: Invoice created through the API.
                - `other`: Invoice created by an external source.
          example: hyperline
        origin:
          type: string
          enum:
            - subscription
            - quote
            - wallet
            - customer_credits
            - invoice
            - manual
            - import
          description: >
            What generated the invoice, whatever the channel used to create it
            (see `source`). New values may be added.
                - `subscription`: Generated by a subscription: renewal, update, transition, cancellation, reactivation or reinstatement.
                - `quote`: Generated by a quote.
                - `wallet`: Wallet top-up, free credits granted or expiration of the remaining balance.
                - `customer_credits`: Purchase of customer credits.
                - `invoice`: Built from other invoices: a credit note correcting an invoice, a consolidated invoice or an invoice re-billed to a parent organisation.
                - `manual`: Standalone invoice or credit note created by a user, in the app or through the API.
                - `import`: Imported from an external billing provider.
          example: subscription
        total_amount:
          type: number
          description: >-
            Sum of the amount and taxes amount of all products on the invoice.
            Expressed in currency's smallest unit.
          example: 24000
        amount_due:
          type: number
          description: >-
            Amount still need to be paid for the invoice. Expressed in
            currency's smallest unit.
          example: 0
        amount_paid:
          type: number
          description: >-
            Amount already paid for the invoice. Expressed in currency's
            smallest unit.
          example: 24000
        amount_fixed:
          type: number
          description: >-
            Amount corresponding to the recurring non-variable part of the total
            amount. Expressed in currency's smallest unit.
          example: 20000
        amount_excluding_tax:
          type: number
          description: >-
            Total amount without the taxes amount. Expressed in currency's
            smallest unit.
          example: 20000
        tax_rate:
          type: number
          description: Deprecated field, please use `line_items[].tax_rate`.
          deprecated: true
        tax_amount:
          type: number
          description: Tax amount of the invoice. Expressed in currency's smallest unit.
          example: 4000
        tax_scheme:
          type: string
          enum:
            - exempt
            - standard
            - reverse_charge
            - manual
            - not_eligible
          description: >-
            Tax scheme of the invoice.


            - `standard`: Tax rate is resolved depending on local tax
            regulations.

            - `exempt`: No tax rate applied because the customer country doesn't
            require it.

            - `reverse_charge`: No tax rate applied because the customer is
            eligible to EU reverse charge.

            - `manual`: Tax rate has been manually specified when creating the
            invoice.

            - `not_eligible`: Tax collection is disabled for the invoice.
              
          example: standard
        discount_amount:
          type: number
          description: >-
            Amount corresponding to the discounted part of the total amount.
            Expressed in currency's smallest unit.
          example: 0
        conversion_rate:
          type:
            - number
            - 'null'
          description: >-
            Conversion rate used between the invoice currency and your
            accounting currency.
          example: 1
        converted_amount:
          type:
            - number
            - 'null'
          description: >-
            Amount converted using the conversion rate. Expressed in currency's
            smallest unit.
          example: 24000
        converted_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Date of the conversion of the amount.
          example: '2026-10-13T02:00:00.000Z'
        payment_method_id:
          type:
            - string
            - 'null'
          description: >-
            ID of the default payment method used to pay the invoice.
            Transactions related to the invoice may use different payment
            methods.
          example: pm_1ryTrMj4TTAT1N
        bank_account_id:
          type:
            - string
            - 'null'
          description: >-
            ID of the bank account displayed on the invoice. Transactions
            related to the invoice may use different bank accounts.
          example: bac_KJyPrMA1toAqRG
        custom_note:
          type:
            - string
            - 'null'
          description: Custom note added to the invoice.
          example: Thank you for your purchase!
        additional_info:
          type:
            - string
            - 'null'
          description: >-
            Additional information added to the invoice. If not defined, it will
            be inherited from the invoicing entity's settings.
          example: >-
            This invoice must be paid within the payment delay indicated. After
            this period a late payment penalty of 10% will be applied.
        footer:
          type:
            - string
            - 'null'
          description: >-
            Footer added to the invoice. If not defined, it will be inherited
            from the invoicing entity's settings.
          example: ACME (Acme SAS) is a company registered in France | SIREN N°123456
        customer:
          type: object
          properties:
            id:
              type: string
              description: Customer ID.
              example: cus_Typ0px2W0aiEtl
            name:
              type: string
              description: Customer name.
              example: Acme
            email:
              type:
                - string
                - 'null'
              description: Email to which all communications will be sent.
              example: billing@acme.com
            external_id:
              type:
                - string
                - 'null'
              description: >-
                ID of the customer in your system. This helps matching your
                customer with the one on Hyperline. When external ID uniqueness
                is enforced for your account, two active customers cannot share
                the same external ID.
              example: null
            vat_number:
              type:
                - string
                - 'null'
              description: Deprecated field, please use `tax_id`.
              deprecated: true
            tax_id:
              type:
                - string
                - 'null'
              description: Value of the customer tax ID.
              example: FR123456789
            local_tax_number:
              type:
                - string
                - 'null'
              description: Customer local tax number.
              example: 12/345/67890
            registration_number:
              type:
                - string
                - 'null'
              description: Customer registration number.
              example: '36252187900034'
            address:
              $ref: '#/components/schemas/Address'
          required:
            - id
            - name
            - email
            - external_id
            - vat_number
            - tax_id
            - local_tax_number
            - registration_number
            - address
        seller:
          type: object
          properties:
            id:
              type: string
              description: ID of the invoicing entity issuing the invoice.
              example: ive_47484fjdhy5
            name:
              type: string
              description: Name of the invoicing entity
              example: Name of the invoicing entity
            tax_id:
              type:
                - string
                - 'null'
              description: Tax identifier / VAT number of the invoicing entity
              example: FR5878986578
            registration_number:
              type:
                - string
                - 'null'
              description: >-
                Legal registration number of the invoicing entity, as it stood
                when the invoice was emitted.
              example: '87898657800016'
            address:
              allOf:
                - $ref: '#/components/schemas/Address'
                - description: Seller address.
          required:
            - id
            - name
            - tax_id
            - registration_number
            - address
        subscription_id:
          type:
            - string
            - 'null'
          description: ID of the subscription related to the invoice.
          example: sub_amiaWZ3lzDIWaoT
        period_starts_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Start date of the billing period of the invoice.
          example: '2026-10-13T00:00:00.000Z'
        period_ends_at:
          type:
            - string
            - 'null'
          format: date-time
          description: End date of the billing period of the invoice.
          example: '2026-11-13T00:00:00.000Z'
        emitted_at:
          type: string
          format: date-time
          description: Issue date of the invoice.
          example: '2026-10-13T00:00:00.000Z'
        due_at:
          type: string
          format: date-time
          description: >-
            Due date of the invoice. Computed from the issue date and the
            payment delay configured in your settings.
          example: '2026-11-12T00:00:00.000Z'
        issuing_method:
          type: string
          enum:
            - manual
            - scheduled
          description: >

            How the invoice is issued.


            - `manual`: Issued when finalized, by a user or by the invoicing
            flow.

            - `scheduled`: Draft finalized automatically at the start of its
            issue date (`issued_at`), in the invoice timezone.
          example: manual
        refunded_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Date corresponding to the refund of the invoice, previously paid. A
            credit note exists with an original invoice ID equals to this
            invoice ID.
          example: null
        grace_period_ended_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Date the invoice grace period ended. This happens at the issue date
            + the grace period duration configured in your settings.
          example: null
        settled_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Date the invoice was fully paid.
          example: '2026-10-15T14:01:56.000Z'
        created_at:
          type: string
          format: date-time
          description: >-
            Date the invoice was created in Hyperline, including drafts and
            scheduled invoices issued later. For imported invoices, this is the
            import date. Never changes afterwards.
          example: '2026-10-12T09:30:00.000Z'
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Date of the last update.
          example: '2026-10-15T14:01:56.000Z'
        properties:
          type:
            - object
            - 'null'
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
              - type: 'null'
              - type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                    - type: 'null'
                    - type: 'null'
              - type: 'null'
          description: Key/value pairs to store any metadata useful in your context.
          example: null
        custom_properties:
          type:
            - object
            - 'null'
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
              - type: string
                format: date-time
                description: >-
                  UTC date time string in the [ISO
                  8601](https://en.wikipedia.org/wiki/ISO_8601) format.
                example: '2024-12-20T16:04:11Z'
              - type: array
                items:
                  type: string
              - type: 'null'
          description: >-
            Values for custom properties defined for the `invoice` entity, keyed
            by slug.
          example: null
        additional_display_fields:
          type:
            - array
            - 'null'
          items:
            oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - standard
                    description: Display a standard invoice field.
                  field:
                    type: string
                    enum:
                      - customer_id
                      - subscription_id
                      - quote_id
                    description: Standard invoice field to display.
                required:
                  - type
                  - field
                title: Standard field
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - custom_property
                    description: Display an invoice or customer custom property.
                  slug:
                    type: string
                    description: >-
                      Slug of the invoice or customer custom property to
                      display.
                required:
                  - type
                  - slug
                title: Custom property
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - custom
                    description: Display a custom label and value.
                  label:
                    type: string
                    minLength: 1
                    maxLength: 100
                    description: Label displayed on the invoice.
                  value:
                    type: string
                    maxLength: 500
                    description: Value displayed on the invoice.
                required:
                  - type
                  - label
                  - value
                title: Custom text
          maxItems: 20
          description: >-
            Ordered additional fields displayed on the invoice PDF. Invoice and
            customer custom properties are referenced by slug.
          example: null
        original_invoice_id:
          type:
            - string
            - 'null'
          description: >-
            ID of the reference invoice this entity is linked to. For credit
            notes, this is not necessarily an invoice receiving credit; use
            `allocations` for applications.
          example: null
        original_invoice_number:
          type:
            - string
            - 'null'
          description: >-
            Number of the original invoice this entity is linked to (only used
            for credit note).
          example: null
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineItem'
          description: List of line items composing the invoice.
        allocations:
          type: array
          items:
            type: object
            properties:
              invoice_id:
                type: string
                description: ID of the invoice receiving the credit.
                example: inv_2QdJDDUej969ev
              amount:
                type: number
                description: >-
                  Credit amount applied to the invoice, in the currency's
                  smallest unit.
                example: 780000
            required:
              - invoice_id
              - amount
          description: >-
            Current invoice applications made by this credit note. Only present
            for credit notes.
        coupons:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceCoupon'
          description: List of coupons applied to the invoice.
        transactions:
          type: array
          items:
            anyOf:
              - allOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        description: Transaction ID.
                        example: tra_2QdJDDUej969ev
                      type:
                        type: string
                        enum:
                          - subscription
                          - one_time
                          - refund
                          - chargeback
                        description: >-

                          Transaction type.


                          - `subscription`: The transaction is related to a
                          subscription payment.

                          - `one_time`: The transaction is related to a one-time
                          payment.

                          - `refund`: The transaction is related to a refund
                          payment.

                          - `chargeback`: The transaction records funds
                          withdrawn after a payment dispute.
                            
                        example: subscription
                      amount:
                        type: number
                        description: Transaction amount.
                        example: 31500
                      currency:
                        type: string
                        enum:
                          - EUR
                          - AED
                          - AFN
                          - XCD
                          - ALL
                          - AMD
                          - AOA
                          - ARS
                          - USD
                          - AUD
                          - AWG
                          - AZN
                          - BAM
                          - BBD
                          - BDT
                          - BGN
                          - BHD
                          - BIF
                          - XOF
                          - BMD
                          - BND
                          - BOB
                          - BRL
                          - BSD
                          - BTN
                          - NOK
                          - BWP
                          - BYR
                          - BZD
                          - CAD
                          - CDF
                          - XAF
                          - CHF
                          - NZD
                          - CLP
                          - CNY
                          - COP
                          - CRC
                          - CUP
                          - CVE
                          - ANG
                          - CZK
                          - DJF
                          - DKK
                          - DOP
                          - DZD
                          - EGP
                          - MAD
                          - ERN
                          - ETB
                          - FJD
                          - FKP
                          - GBP
                          - GEL
                          - GHS
                          - GIP
                          - GMD
                          - GNF
                          - GTQ
                          - GYD
                          - HKD
                          - HNL
                          - HRK
                          - HTG
                          - HUF
                          - IDR
                          - ILS
                          - INR
                          - IQD
                          - IRR
                          - ISK
                          - JMD
                          - JOD
                          - JPY
                          - KES
                          - KGS
                          - KHR
                          - KMF
                          - KPW
                          - KRW
                          - KWD
                          - KYD
                          - KZT
                          - LAK
                          - LBP
                          - LKR
                          - LRD
                          - LSL
                          - LYD
                          - MDL
                          - MGA
                          - MKD
                          - MMK
                          - MNT
                          - MOP
                          - MRO
                          - MUR
                          - MVR
                          - MWK
                          - MXN
                          - MYR
                          - MZN
                          - NAD
                          - XPF
                          - NGN
                          - NIO
                          - NPR
                          - OMR
                          - PAB
                          - PEN
                          - PGK
                          - PHP
                          - PKR
                          - PLN
                          - PYG
                          - QAR
                          - RON
                          - RSD
                          - RUB
                          - RWF
                          - SAR
                          - SBD
                          - SCR
                          - SDG
                          - SEK
                          - SGD
                          - SHP
                          - SLL
                          - SOS
                          - SRD
                          - SSP
                          - STD
                          - SYP
                          - SZL
                          - THB
                          - TJS
                          - TMT
                          - TND
                          - TOP
                          - TRY
                          - TTD
                          - TWD
                          - TZS
                          - UAH
                          - UGX
                          - UYU
                          - UZS
                          - VEF
                          - VND
                          - VUV
                          - WST
                          - YER
                          - ZAR
                          - ZMW
                          - ZWL
                        description: Transaction currency.
                        example: EUR
                      customer_id:
                        type: string
                        description: ID of the customer linked to the transaction.
                        example: cus_QalW2vTAdkR6IY
                      provider_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Deprecated field, please use
                          `integrations[].entity_id`.
                        deprecated: true
                      process_at:
                        type: string
                        format: date-time
                        description: >-
                          Date corresponding to the processing of the
                          transaction. If in the future, the transaction is
                          scheduled to be processed.
                        example: '2024-11-12T07:38:39.222Z'
                      settled_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date when the transaction was settled. For provider
                          transactions, this is derived from provider settlement
                          data when available.
                        example: '2024-11-12T07:38:39.222Z'
                      created_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction was recorded in Hyperline,
                          independent of its processing date.
                        example: '2026-11-12T10:00:00.000Z'
                      updated_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction or its invoice allocations were
                          last updated in Hyperline. Use the updated_at filters
                          to sync changes incrementally.
                        example: '2026-11-12T11:00:00.000Z'
                      refunded_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date corresponding to the refund of the transaction.
                        example: null
                      original_transaction_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          ID of the payment transaction refunded or charged
                          back.
                        example: null
                      reversed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date when a chargeback withdrawal was reversed.
                        example: null
                      last_refreshed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date corresponding to the last synchronization of the
                          details with the payment provider.
                        example: null
                      provider_fee:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: >-
                              Monetary amount. Expressed in currency's smallest
                              unit.
                          currency:
                            type: string
                            enum:
                              - EUR
                              - AED
                              - AFN
                              - XCD
                              - ALL
                              - AMD
                              - AOA
                              - ARS
                              - USD
                              - AUD
                              - AWG
                              - AZN
                              - BAM
                              - BBD
                              - BDT
                              - BGN
                              - BHD
                              - BIF
                              - XOF
                              - BMD
                              - BND
                              - BOB
                              - BRL
                              - BSD
                              - BTN
                              - NOK
                              - BWP
                              - BYR
                              - BZD
                              - CAD
                              - CDF
                              - XAF
                              - CHF
                              - NZD
                              - CLP
                              - CNY
                              - COP
                              - CRC
                              - CUP
                              - CVE
                              - ANG
                              - CZK
                              - DJF
                              - DKK
                              - DOP
                              - DZD
                              - EGP
                              - MAD
                              - ERN
                              - ETB
                              - FJD
                              - FKP
                              - GBP
                              - GEL
                              - GHS
                              - GIP
                              - GMD
                              - GNF
                              - GTQ
                              - GYD
                              - HKD
                              - HNL
                              - HRK
                              - HTG
                              - HUF
                              - IDR
                              - ILS
                              - INR
                              - IQD
                              - IRR
                              - ISK
                              - JMD
                              - JOD
                              - JPY
                              - KES
                              - KGS
                              - KHR
                              - KMF
                              - KPW
                              - KRW
                              - KWD
                              - KYD
                              - KZT
                              - LAK
                              - LBP
                              - LKR
                              - LRD
                              - LSL
                              - LYD
                              - MDL
                              - MGA
                              - MKD
                              - MMK
                              - MNT
                              - MOP
                              - MRO
                              - MUR
                              - MVR
                              - MWK
                              - MXN
                              - MYR
                              - MZN
                              - NAD
                              - XPF
                              - NGN
                              - NIO
                              - NPR
                              - OMR
                              - PAB
                              - PEN
                              - PGK
                              - PHP
                              - PKR
                              - PLN
                              - PYG
                              - QAR
                              - RON
                              - RSD
                              - RUB
                              - RWF
                              - SAR
                              - SBD
                              - SCR
                              - SDG
                              - SEK
                              - SGD
                              - SHP
                              - SLL
                              - SOS
                              - SRD
                              - SSP
                              - STD
                              - SYP
                              - SZL
                              - THB
                              - TJS
                              - TMT
                              - TND
                              - TOP
                              - TRY
                              - TTD
                              - TWD
                              - TZS
                              - UAH
                              - UGX
                              - UYU
                              - UZS
                              - VEF
                              - VND
                              - VUV
                              - WST
                              - YER
                              - ZAR
                              - ZMW
                              - ZWL
                            description: >-
                              Currency code. See [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).
                            example: EUR
                          exchange_rate:
                            type:
                              - number
                              - 'null'
                        required:
                          - amount
                          - currency
                          - exchange_rate
                        description: >-
                          Fee applied by the Payment Service Provider. Only
                          supported for Stripe.
                        example: null
                      chargeback:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: Total chargeback loss amount.
                            example: 31500
                          last_chargeback_at:
                            type: string
                            format: date-time
                            description: >-
                              Date corresponding to the last chargeback loss
                              event.
                            example: '2024-10-13T10:00:01.860Z'
                        required:
                          - amount
                          - last_chargeback_at
                        description: >-
                          Deprecated field. Use transactions where `type` is
                          `chargeback`; `original_transaction_id` identifies the
                          affected payment transaction.
                        deprecated: true
                        example: null
                      integrations:
                        type: array
                        items:
                          type: object
                          properties:
                            entity_id:
                              type: string
                              description: ID of the entity in the provider.
                            provider_name:
                              type: string
                              enum:
                                - adyen
                                - stripe
                                - mollie
                                - gocardless
                                - airwallex
                                - paypal
                                - salesforce
                                - hubspot
                                - attio
                                - xero
                                - pennylane
                                - zoho-books
                                - exact-online
                                - quickbooks
                                - netsuite
                                - rillet
                                - campfire
                                - dualentry
                                - datev
                                - anrok
                                - sphere
                                - chargebee
                                - slack
                                - plain
                                - zendesk
                                - pylon
                                - intercom
                                - front
                                - helpscout
                                - claap
                                - grain
                                - gong
                                - jiminny
                                - modjo
                                - posthog
                              description: Provider name.
                            provider_account_id:
                              type: string
                              description: ID of the connected provider account.
                            created_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Creation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                products, coupons and subscriptions; `null` when
                                the provider does not report one.
                              example: '2024-12-20T16:04:11Z'
                            activated_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Activation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                subscriptions; `null` when the provider does not
                                report one.
                              example: '2024-12-20T16:04:11Z'
                          required:
                            - entity_id
                            - provider_name
                            - provider_account_id
                          description: Reference to the entity in an external provider.
                          example:
                            entity_id: '123456789'
                            provider_name: stripe
                            provider_account_id: acc_1234567890
                    required:
                      - id
                      - type
                      - amount
                      - currency
                      - customer_id
                      - provider_id
                      - process_at
                      - settled_at
                      - created_at
                      - updated_at
                      - refunded_at
                      - original_transaction_id
                      - reversed_at
                      - last_refreshed_at
                      - provider_fee
                      - chargeback
                      - integrations
                  - type: object
                    properties:
                      payment_method_type:
                        type: string
                        enum:
                          - card
                          - direct_debit
                          - direct_debit_ach
                          - direct_debit_bacs
                        description: Payment method type used for the transaction.
                      payment_method:
                        $ref: '#/components/schemas/PaymentMethod'
                    required:
                      - payment_method_type
                      - payment_method
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - scheduled
                          - to_process
                          - pending
                          - settled
                          - cancelled
                        description: >-

                          Transaction status.


                          - `scheduled`: The transaction is scheduled to be
                          processed in the future.

                          - `to_process`: The transaction is waiting to be
                          processed by our system.

                          - `pending`: The transaction has been authorized by
                          the related payment processor, but the banking
                          transaction is not yet settled.

                          - `settled`: The transaction has been cleared on the
                          banking side, the money transfer is fully completed.

                          - `cancelled`: The transaction has been cancelled and
                          won't be processed again.
                            
                        example: settled
                    required:
                      - status
                title: Transaction Card/debit
              - allOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        description: Transaction ID.
                        example: tra_2QdJDDUej969ev
                      type:
                        type: string
                        enum:
                          - subscription
                          - one_time
                          - refund
                          - chargeback
                        description: >-

                          Transaction type.


                          - `subscription`: The transaction is related to a
                          subscription payment.

                          - `one_time`: The transaction is related to a one-time
                          payment.

                          - `refund`: The transaction is related to a refund
                          payment.

                          - `chargeback`: The transaction records funds
                          withdrawn after a payment dispute.
                            
                        example: subscription
                      amount:
                        type: number
                        description: Transaction amount.
                        example: 31500
                      currency:
                        type: string
                        enum:
                          - EUR
                          - AED
                          - AFN
                          - XCD
                          - ALL
                          - AMD
                          - AOA
                          - ARS
                          - USD
                          - AUD
                          - AWG
                          - AZN
                          - BAM
                          - BBD
                          - BDT
                          - BGN
                          - BHD
                          - BIF
                          - XOF
                          - BMD
                          - BND
                          - BOB
                          - BRL
                          - BSD
                          - BTN
                          - NOK
                          - BWP
                          - BYR
                          - BZD
                          - CAD
                          - CDF
                          - XAF
                          - CHF
                          - NZD
                          - CLP
                          - CNY
                          - COP
                          - CRC
                          - CUP
                          - CVE
                          - ANG
                          - CZK
                          - DJF
                          - DKK
                          - DOP
                          - DZD
                          - EGP
                          - MAD
                          - ERN
                          - ETB
                          - FJD
                          - FKP
                          - GBP
                          - GEL
                          - GHS
                          - GIP
                          - GMD
                          - GNF
                          - GTQ
                          - GYD
                          - HKD
                          - HNL
                          - HRK
                          - HTG
                          - HUF
                          - IDR
                          - ILS
                          - INR
                          - IQD
                          - IRR
                          - ISK
                          - JMD
                          - JOD
                          - JPY
                          - KES
                          - KGS
                          - KHR
                          - KMF
                          - KPW
                          - KRW
                          - KWD
                          - KYD
                          - KZT
                          - LAK
                          - LBP
                          - LKR
                          - LRD
                          - LSL
                          - LYD
                          - MDL
                          - MGA
                          - MKD
                          - MMK
                          - MNT
                          - MOP
                          - MRO
                          - MUR
                          - MVR
                          - MWK
                          - MXN
                          - MYR
                          - MZN
                          - NAD
                          - XPF
                          - NGN
                          - NIO
                          - NPR
                          - OMR
                          - PAB
                          - PEN
                          - PGK
                          - PHP
                          - PKR
                          - PLN
                          - PYG
                          - QAR
                          - RON
                          - RSD
                          - RUB
                          - RWF
                          - SAR
                          - SBD
                          - SCR
                          - SDG
                          - SEK
                          - SGD
                          - SHP
                          - SLL
                          - SOS
                          - SRD
                          - SSP
                          - STD
                          - SYP
                          - SZL
                          - THB
                          - TJS
                          - TMT
                          - TND
                          - TOP
                          - TRY
                          - TTD
                          - TWD
                          - TZS
                          - UAH
                          - UGX
                          - UYU
                          - UZS
                          - VEF
                          - VND
                          - VUV
                          - WST
                          - YER
                          - ZAR
                          - ZMW
                          - ZWL
                        description: Transaction currency.
                        example: EUR
                      customer_id:
                        type: string
                        description: ID of the customer linked to the transaction.
                        example: cus_QalW2vTAdkR6IY
                      provider_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Deprecated field, please use
                          `integrations[].entity_id`.
                        deprecated: true
                      process_at:
                        type: string
                        format: date-time
                        description: >-
                          Date corresponding to the processing of the
                          transaction. If in the future, the transaction is
                          scheduled to be processed.
                        example: '2024-11-12T07:38:39.222Z'
                      settled_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date when the transaction was settled. For provider
                          transactions, this is derived from provider settlement
                          data when available.
                        example: '2024-11-12T07:38:39.222Z'
                      created_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction was recorded in Hyperline,
                          independent of its processing date.
                        example: '2026-11-12T10:00:00.000Z'
                      updated_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction or its invoice allocations were
                          last updated in Hyperline. Use the updated_at filters
                          to sync changes incrementally.
                        example: '2026-11-12T11:00:00.000Z'
                      refunded_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date corresponding to the refund of the transaction.
                        example: null
                      original_transaction_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          ID of the payment transaction refunded or charged
                          back.
                        example: null
                      reversed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date when a chargeback withdrawal was reversed.
                        example: null
                      last_refreshed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date corresponding to the last synchronization of the
                          details with the payment provider.
                        example: null
                      provider_fee:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: >-
                              Monetary amount. Expressed in currency's smallest
                              unit.
                          currency:
                            type: string
                            enum:
                              - EUR
                              - AED
                              - AFN
                              - XCD
                              - ALL
                              - AMD
                              - AOA
                              - ARS
                              - USD
                              - AUD
                              - AWG
                              - AZN
                              - BAM
                              - BBD
                              - BDT
                              - BGN
                              - BHD
                              - BIF
                              - XOF
                              - BMD
                              - BND
                              - BOB
                              - BRL
                              - BSD
                              - BTN
                              - NOK
                              - BWP
                              - BYR
                              - BZD
                              - CAD
                              - CDF
                              - XAF
                              - CHF
                              - NZD
                              - CLP
                              - CNY
                              - COP
                              - CRC
                              - CUP
                              - CVE
                              - ANG
                              - CZK
                              - DJF
                              - DKK
                              - DOP
                              - DZD
                              - EGP
                              - MAD
                              - ERN
                              - ETB
                              - FJD
                              - FKP
                              - GBP
                              - GEL
                              - GHS
                              - GIP
                              - GMD
                              - GNF
                              - GTQ
                              - GYD
                              - HKD
                              - HNL
                              - HRK
                              - HTG
                              - HUF
                              - IDR
                              - ILS
                              - INR
                              - IQD
                              - IRR
                              - ISK
                              - JMD
                              - JOD
                              - JPY
                              - KES
                              - KGS
                              - KHR
                              - KMF
                              - KPW
                              - KRW
                              - KWD
                              - KYD
                              - KZT
                              - LAK
                              - LBP
                              - LKR
                              - LRD
                              - LSL
                              - LYD
                              - MDL
                              - MGA
                              - MKD
                              - MMK
                              - MNT
                              - MOP
                              - MRO
                              - MUR
                              - MVR
                              - MWK
                              - MXN
                              - MYR
                              - MZN
                              - NAD
                              - XPF
                              - NGN
                              - NIO
                              - NPR
                              - OMR
                              - PAB
                              - PEN
                              - PGK
                              - PHP
                              - PKR
                              - PLN
                              - PYG
                              - QAR
                              - RON
                              - RSD
                              - RUB
                              - RWF
                              - SAR
                              - SBD
                              - SCR
                              - SDG
                              - SEK
                              - SGD
                              - SHP
                              - SLL
                              - SOS
                              - SRD
                              - SSP
                              - STD
                              - SYP
                              - SZL
                              - THB
                              - TJS
                              - TMT
                              - TND
                              - TOP
                              - TRY
                              - TTD
                              - TWD
                              - TZS
                              - UAH
                              - UGX
                              - UYU
                              - UZS
                              - VEF
                              - VND
                              - VUV
                              - WST
                              - YER
                              - ZAR
                              - ZMW
                              - ZWL
                            description: >-
                              Currency code. See [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).
                            example: EUR
                          exchange_rate:
                            type:
                              - number
                              - 'null'
                        required:
                          - amount
                          - currency
                          - exchange_rate
                        description: >-
                          Fee applied by the Payment Service Provider. Only
                          supported for Stripe.
                        example: null
                      chargeback:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: Total chargeback loss amount.
                            example: 31500
                          last_chargeback_at:
                            type: string
                            format: date-time
                            description: >-
                              Date corresponding to the last chargeback loss
                              event.
                            example: '2024-10-13T10:00:01.860Z'
                        required:
                          - amount
                          - last_chargeback_at
                        description: >-
                          Deprecated field. Use transactions where `type` is
                          `chargeback`; `original_transaction_id` identifies the
                          affected payment transaction.
                        deprecated: true
                        example: null
                      integrations:
                        type: array
                        items:
                          type: object
                          properties:
                            entity_id:
                              type: string
                              description: ID of the entity in the provider.
                            provider_name:
                              type: string
                              enum:
                                - adyen
                                - stripe
                                - mollie
                                - gocardless
                                - airwallex
                                - paypal
                                - salesforce
                                - hubspot
                                - attio
                                - xero
                                - pennylane
                                - zoho-books
                                - exact-online
                                - quickbooks
                                - netsuite
                                - rillet
                                - campfire
                                - dualentry
                                - datev
                                - anrok
                                - sphere
                                - chargebee
                                - slack
                                - plain
                                - zendesk
                                - pylon
                                - intercom
                                - front
                                - helpscout
                                - claap
                                - grain
                                - gong
                                - jiminny
                                - modjo
                                - posthog
                              description: Provider name.
                            provider_account_id:
                              type: string
                              description: ID of the connected provider account.
                            created_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Creation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                products, coupons and subscriptions; `null` when
                                the provider does not report one.
                              example: '2024-12-20T16:04:11Z'
                            activated_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Activation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                subscriptions; `null` when the provider does not
                                report one.
                              example: '2024-12-20T16:04:11Z'
                          required:
                            - entity_id
                            - provider_name
                            - provider_account_id
                          description: Reference to the entity in an external provider.
                          example:
                            entity_id: '123456789'
                            provider_name: stripe
                            provider_account_id: acc_1234567890
                    required:
                      - id
                      - type
                      - amount
                      - currency
                      - customer_id
                      - provider_id
                      - process_at
                      - settled_at
                      - created_at
                      - updated_at
                      - refunded_at
                      - original_transaction_id
                      - reversed_at
                      - last_refreshed_at
                      - provider_fee
                      - chargeback
                      - integrations
                  - type: object
                    properties:
                      payment_method_type:
                        type: string
                        enum:
                          - card
                          - direct_debit
                          - direct_debit_ach
                          - direct_debit_bacs
                        description: Payment method type used for the transaction.
                      payment_method:
                        $ref: '#/components/schemas/PaymentMethod'
                    required:
                      - payment_method_type
                      - payment_method
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - failed
                        description: |-

                          Transaction status.

                          - `failed`: The transaction failed.
                            
                        example: failed
                      error_type:
                        type:
                          - string
                          - 'null'
                        enum:
                          - authentication_required
                          - declined
                          - fraud
                          - insufficient_funds
                          - mandate_invalid
                          - payment_method_authorization_error
                          - payment_method_declined
                          - payment_method_expired
                          - payment_method_invalid
                          - payment_method_not_supported
                          - processing_error
                          - provider_error
                          - unknown
                        description: >-

                          Transaction error type.


                          - `authentication_required`: The card was declined as
                          the transaction requires authentication (e.g. 3-D
                          Secure). The customer should go to their portal page
                          and authenticate their card. If the error happened on
                          an already authenticated transaction, the customer
                          needs to contact their card issuer for more
                          information.

                          - `payment_method_authorization_error`: A transaction
                          authorization cannot be created for a variety of
                          reasons such as the card issuer couldn't be reached,
                          or the card requires a PIN.

                          - `payment_method_declined`: The payment method was
                          declined for a variety of reasons such as a card
                          reported as lost or stolen, insufficient funds or
                          reaching the limit available on the method to complete
                          the purchase, a payment method on a known block list,
                          etc.

                          - `payment_method_expired`: The payment method is
                          expired. The customer should go to their portal page
                          and change their payment method.

                          - `payment_method_invalid`: The payment method is
                          invalid in most cases because of incorrect details
                          (card/account number, CVC, expiration date, postal
                          code).

                          - `payment_method_not_supported`: The payment method
                          doesn't support this type of purchase (e.g. currency,
                          online payment).

                          - `declined`: The payment was declined for a variety
                          of reasons such as security violation, banking service
                          not available, transaction not allowed, etc.

                          - `fraud`: The payment provider suspected the
                          transaction was fraudulent and has been blocked. Don't
                          report more detailed information to your customer, and
                          check on your provider account.

                          - `processing_error`: The payment couldn't be
                          processed by the issuer for an unknown reason.

                          - `provider_error`: An error occurred when contacting
                          the payment provider to initiate the transaction.

                          - `unknown`: A generic error happened on the payment
                          provider side.
                            
                        example: null
                      error_message:
                        type:
                          - string
                          - 'null'
                        description: Details of the error.
                        example: null
                    required:
                      - status
                      - error_type
                      - error_message
                title: Transaction Card/debit failed
              - allOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        description: Transaction ID.
                        example: tra_2QdJDDUej969ev
                      type:
                        type: string
                        enum:
                          - subscription
                          - one_time
                          - refund
                          - chargeback
                        description: >-

                          Transaction type.


                          - `subscription`: The transaction is related to a
                          subscription payment.

                          - `one_time`: The transaction is related to a one-time
                          payment.

                          - `refund`: The transaction is related to a refund
                          payment.

                          - `chargeback`: The transaction records funds
                          withdrawn after a payment dispute.
                            
                        example: subscription
                      amount:
                        type: number
                        description: Transaction amount.
                        example: 31500
                      currency:
                        type: string
                        enum:
                          - EUR
                          - AED
                          - AFN
                          - XCD
                          - ALL
                          - AMD
                          - AOA
                          - ARS
                          - USD
                          - AUD
                          - AWG
                          - AZN
                          - BAM
                          - BBD
                          - BDT
                          - BGN
                          - BHD
                          - BIF
                          - XOF
                          - BMD
                          - BND
                          - BOB
                          - BRL
                          - BSD
                          - BTN
                          - NOK
                          - BWP
                          - BYR
                          - BZD
                          - CAD
                          - CDF
                          - XAF
                          - CHF
                          - NZD
                          - CLP
                          - CNY
                          - COP
                          - CRC
                          - CUP
                          - CVE
                          - ANG
                          - CZK
                          - DJF
                          - DKK
                          - DOP
                          - DZD
                          - EGP
                          - MAD
                          - ERN
                          - ETB
                          - FJD
                          - FKP
                          - GBP
                          - GEL
                          - GHS
                          - GIP
                          - GMD
                          - GNF
                          - GTQ
                          - GYD
                          - HKD
                          - HNL
                          - HRK
                          - HTG
                          - HUF
                          - IDR
                          - ILS
                          - INR
                          - IQD
                          - IRR
                          - ISK
                          - JMD
                          - JOD
                          - JPY
                          - KES
                          - KGS
                          - KHR
                          - KMF
                          - KPW
                          - KRW
                          - KWD
                          - KYD
                          - KZT
                          - LAK
                          - LBP
                          - LKR
                          - LRD
                          - LSL
                          - LYD
                          - MDL
                          - MGA
                          - MKD
                          - MMK
                          - MNT
                          - MOP
                          - MRO
                          - MUR
                          - MVR
                          - MWK
                          - MXN
                          - MYR
                          - MZN
                          - NAD
                          - XPF
                          - NGN
                          - NIO
                          - NPR
                          - OMR
                          - PAB
                          - PEN
                          - PGK
                          - PHP
                          - PKR
                          - PLN
                          - PYG
                          - QAR
                          - RON
                          - RSD
                          - RUB
                          - RWF
                          - SAR
                          - SBD
                          - SCR
                          - SDG
                          - SEK
                          - SGD
                          - SHP
                          - SLL
                          - SOS
                          - SRD
                          - SSP
                          - STD
                          - SYP
                          - SZL
                          - THB
                          - TJS
                          - TMT
                          - TND
                          - TOP
                          - TRY
                          - TTD
                          - TWD
                          - TZS
                          - UAH
                          - UGX
                          - UYU
                          - UZS
                          - VEF
                          - VND
                          - VUV
                          - WST
                          - YER
                          - ZAR
                          - ZMW
                          - ZWL
                        description: Transaction currency.
                        example: EUR
                      customer_id:
                        type: string
                        description: ID of the customer linked to the transaction.
                        example: cus_QalW2vTAdkR6IY
                      provider_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Deprecated field, please use
                          `integrations[].entity_id`.
                        deprecated: true
                      process_at:
                        type: string
                        format: date-time
                        description: >-
                          Date corresponding to the processing of the
                          transaction. If in the future, the transaction is
                          scheduled to be processed.
                        example: '2024-11-12T07:38:39.222Z'
                      settled_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date when the transaction was settled. For provider
                          transactions, this is derived from provider settlement
                          data when available.
                        example: '2024-11-12T07:38:39.222Z'
                      created_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction was recorded in Hyperline,
                          independent of its processing date.
                        example: '2026-11-12T10:00:00.000Z'
                      updated_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction or its invoice allocations were
                          last updated in Hyperline. Use the updated_at filters
                          to sync changes incrementally.
                        example: '2026-11-12T11:00:00.000Z'
                      refunded_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date corresponding to the refund of the transaction.
                        example: null
                      original_transaction_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          ID of the payment transaction refunded or charged
                          back.
                        example: null
                      reversed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date when a chargeback withdrawal was reversed.
                        example: null
                      last_refreshed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date corresponding to the last synchronization of the
                          details with the payment provider.
                        example: null
                      provider_fee:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: >-
                              Monetary amount. Expressed in currency's smallest
                              unit.
                          currency:
                            type: string
                            enum:
                              - EUR
                              - AED
                              - AFN
                              - XCD
                              - ALL
                              - AMD
                              - AOA
                              - ARS
                              - USD
                              - AUD
                              - AWG
                              - AZN
                              - BAM
                              - BBD
                              - BDT
                              - BGN
                              - BHD
                              - BIF
                              - XOF
                              - BMD
                              - BND
                              - BOB
                              - BRL
                              - BSD
                              - BTN
                              - NOK
                              - BWP
                              - BYR
                              - BZD
                              - CAD
                              - CDF
                              - XAF
                              - CHF
                              - NZD
                              - CLP
                              - CNY
                              - COP
                              - CRC
                              - CUP
                              - CVE
                              - ANG
                              - CZK
                              - DJF
                              - DKK
                              - DOP
                              - DZD
                              - EGP
                              - MAD
                              - ERN
                              - ETB
                              - FJD
                              - FKP
                              - GBP
                              - GEL
                              - GHS
                              - GIP
                              - GMD
                              - GNF
                              - GTQ
                              - GYD
                              - HKD
                              - HNL
                              - HRK
                              - HTG
                              - HUF
                              - IDR
                              - ILS
                              - INR
                              - IQD
                              - IRR
                              - ISK
                              - JMD
                              - JOD
                              - JPY
                              - KES
                              - KGS
                              - KHR
                              - KMF
                              - KPW
                              - KRW
                              - KWD
                              - KYD
                              - KZT
                              - LAK
                              - LBP
                              - LKR
                              - LRD
                              - LSL
                              - LYD
                              - MDL
                              - MGA
                              - MKD
                              - MMK
                              - MNT
                              - MOP
                              - MRO
                              - MUR
                              - MVR
                              - MWK
                              - MXN
                              - MYR
                              - MZN
                              - NAD
                              - XPF
                              - NGN
                              - NIO
                              - NPR
                              - OMR
                              - PAB
                              - PEN
                              - PGK
                              - PHP
                              - PKR
                              - PLN
                              - PYG
                              - QAR
                              - RON
                              - RSD
                              - RUB
                              - RWF
                              - SAR
                              - SBD
                              - SCR
                              - SDG
                              - SEK
                              - SGD
                              - SHP
                              - SLL
                              - SOS
                              - SRD
                              - SSP
                              - STD
                              - SYP
                              - SZL
                              - THB
                              - TJS
                              - TMT
                              - TND
                              - TOP
                              - TRY
                              - TTD
                              - TWD
                              - TZS
                              - UAH
                              - UGX
                              - UYU
                              - UZS
                              - VEF
                              - VND
                              - VUV
                              - WST
                              - YER
                              - ZAR
                              - ZMW
                              - ZWL
                            description: >-
                              Currency code. See [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).
                            example: EUR
                          exchange_rate:
                            type:
                              - number
                              - 'null'
                        required:
                          - amount
                          - currency
                          - exchange_rate
                        description: >-
                          Fee applied by the Payment Service Provider. Only
                          supported for Stripe.
                        example: null
                      chargeback:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: Total chargeback loss amount.
                            example: 31500
                          last_chargeback_at:
                            type: string
                            format: date-time
                            description: >-
                              Date corresponding to the last chargeback loss
                              event.
                            example: '2024-10-13T10:00:01.860Z'
                        required:
                          - amount
                          - last_chargeback_at
                        description: >-
                          Deprecated field. Use transactions where `type` is
                          `chargeback`; `original_transaction_id` identifies the
                          affected payment transaction.
                        deprecated: true
                        example: null
                      integrations:
                        type: array
                        items:
                          type: object
                          properties:
                            entity_id:
                              type: string
                              description: ID of the entity in the provider.
                            provider_name:
                              type: string
                              enum:
                                - adyen
                                - stripe
                                - mollie
                                - gocardless
                                - airwallex
                                - paypal
                                - salesforce
                                - hubspot
                                - attio
                                - xero
                                - pennylane
                                - zoho-books
                                - exact-online
                                - quickbooks
                                - netsuite
                                - rillet
                                - campfire
                                - dualentry
                                - datev
                                - anrok
                                - sphere
                                - chargebee
                                - slack
                                - plain
                                - zendesk
                                - pylon
                                - intercom
                                - front
                                - helpscout
                                - claap
                                - grain
                                - gong
                                - jiminny
                                - modjo
                                - posthog
                              description: Provider name.
                            provider_account_id:
                              type: string
                              description: ID of the connected provider account.
                            created_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Creation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                products, coupons and subscriptions; `null` when
                                the provider does not report one.
                              example: '2024-12-20T16:04:11Z'
                            activated_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Activation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                subscriptions; `null` when the provider does not
                                report one.
                              example: '2024-12-20T16:04:11Z'
                          required:
                            - entity_id
                            - provider_name
                            - provider_account_id
                          description: Reference to the entity in an external provider.
                          example:
                            entity_id: '123456789'
                            provider_name: stripe
                            provider_account_id: acc_1234567890
                    required:
                      - id
                      - type
                      - amount
                      - currency
                      - customer_id
                      - provider_id
                      - process_at
                      - settled_at
                      - created_at
                      - updated_at
                      - refunded_at
                      - original_transaction_id
                      - reversed_at
                      - last_refreshed_at
                      - provider_fee
                      - chargeback
                      - integrations
                  - type: object
                    properties:
                      payment_method_type:
                        type: string
                        enum:
                          - transfer
                          - transfer_automated
                        description: Payment method type used for the transaction.
                      bank_account:
                        $ref: '#/components/schemas/BankAccount'
                    required:
                      - payment_method_type
                      - bank_account
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - scheduled
                          - to_process
                          - pending
                          - settled
                          - cancelled
                        description: >-

                          Transaction status.


                          - `scheduled`: The transaction is scheduled to be
                          processed in the future.

                          - `to_process`: The transaction is waiting to be
                          processed by our system.

                          - `pending`: The transaction has been authorized by
                          the related payment processor, but the banking
                          transaction is not yet settled.

                          - `settled`: The transaction has been cleared on the
                          banking side, the money transfer is fully completed.

                          - `cancelled`: The transaction has been cancelled and
                          won't be processed again.
                            
                        example: settled
                    required:
                      - status
                title: Transaction Transfer
              - allOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        description: Transaction ID.
                        example: tra_2QdJDDUej969ev
                      type:
                        type: string
                        enum:
                          - subscription
                          - one_time
                          - refund
                          - chargeback
                        description: >-

                          Transaction type.


                          - `subscription`: The transaction is related to a
                          subscription payment.

                          - `one_time`: The transaction is related to a one-time
                          payment.

                          - `refund`: The transaction is related to a refund
                          payment.

                          - `chargeback`: The transaction records funds
                          withdrawn after a payment dispute.
                            
                        example: subscription
                      amount:
                        type: number
                        description: Transaction amount.
                        example: 31500
                      currency:
                        type: string
                        enum:
                          - EUR
                          - AED
                          - AFN
                          - XCD
                          - ALL
                          - AMD
                          - AOA
                          - ARS
                          - USD
                          - AUD
                          - AWG
                          - AZN
                          - BAM
                          - BBD
                          - BDT
                          - BGN
                          - BHD
                          - BIF
                          - XOF
                          - BMD
                          - BND
                          - BOB
                          - BRL
                          - BSD
                          - BTN
                          - NOK
                          - BWP
                          - BYR
                          - BZD
                          - CAD
                          - CDF
                          - XAF
                          - CHF
                          - NZD
                          - CLP
                          - CNY
                          - COP
                          - CRC
                          - CUP
                          - CVE
                          - ANG
                          - CZK
                          - DJF
                          - DKK
                          - DOP
                          - DZD
                          - EGP
                          - MAD
                          - ERN
                          - ETB
                          - FJD
                          - FKP
                          - GBP
                          - GEL
                          - GHS
                          - GIP
                          - GMD
                          - GNF
                          - GTQ
                          - GYD
                          - HKD
                          - HNL
                          - HRK
                          - HTG
                          - HUF
                          - IDR
                          - ILS
                          - INR
                          - IQD
                          - IRR
                          - ISK
                          - JMD
                          - JOD
                          - JPY
                          - KES
                          - KGS
                          - KHR
                          - KMF
                          - KPW
                          - KRW
                          - KWD
                          - KYD
                          - KZT
                          - LAK
                          - LBP
                          - LKR
                          - LRD
                          - LSL
                          - LYD
                          - MDL
                          - MGA
                          - MKD
                          - MMK
                          - MNT
                          - MOP
                          - MRO
                          - MUR
                          - MVR
                          - MWK
                          - MXN
                          - MYR
                          - MZN
                          - NAD
                          - XPF
                          - NGN
                          - NIO
                          - NPR
                          - OMR
                          - PAB
                          - PEN
                          - PGK
                          - PHP
                          - PKR
                          - PLN
                          - PYG
                          - QAR
                          - RON
                          - RSD
                          - RUB
                          - RWF
                          - SAR
                          - SBD
                          - SCR
                          - SDG
                          - SEK
                          - SGD
                          - SHP
                          - SLL
                          - SOS
                          - SRD
                          - SSP
                          - STD
                          - SYP
                          - SZL
                          - THB
                          - TJS
                          - TMT
                          - TND
                          - TOP
                          - TRY
                          - TTD
                          - TWD
                          - TZS
                          - UAH
                          - UGX
                          - UYU
                          - UZS
                          - VEF
                          - VND
                          - VUV
                          - WST
                          - YER
                          - ZAR
                          - ZMW
                          - ZWL
                        description: Transaction currency.
                        example: EUR
                      customer_id:
                        type: string
                        description: ID of the customer linked to the transaction.
                        example: cus_QalW2vTAdkR6IY
                      provider_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Deprecated field, please use
                          `integrations[].entity_id`.
                        deprecated: true
                      process_at:
                        type: string
                        format: date-time
                        description: >-
                          Date corresponding to the processing of the
                          transaction. If in the future, the transaction is
                          scheduled to be processed.
                        example: '2024-11-12T07:38:39.222Z'
                      settled_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date when the transaction was settled. For provider
                          transactions, this is derived from provider settlement
                          data when available.
                        example: '2024-11-12T07:38:39.222Z'
                      created_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction was recorded in Hyperline,
                          independent of its processing date.
                        example: '2026-11-12T10:00:00.000Z'
                      updated_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction or its invoice allocations were
                          last updated in Hyperline. Use the updated_at filters
                          to sync changes incrementally.
                        example: '2026-11-12T11:00:00.000Z'
                      refunded_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date corresponding to the refund of the transaction.
                        example: null
                      original_transaction_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          ID of the payment transaction refunded or charged
                          back.
                        example: null
                      reversed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date when a chargeback withdrawal was reversed.
                        example: null
                      last_refreshed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date corresponding to the last synchronization of the
                          details with the payment provider.
                        example: null
                      provider_fee:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: >-
                              Monetary amount. Expressed in currency's smallest
                              unit.
                          currency:
                            type: string
                            enum:
                              - EUR
                              - AED
                              - AFN
                              - XCD
                              - ALL
                              - AMD
                              - AOA
                              - ARS
                              - USD
                              - AUD
                              - AWG
                              - AZN
                              - BAM
                              - BBD
                              - BDT
                              - BGN
                              - BHD
                              - BIF
                              - XOF
                              - BMD
                              - BND
                              - BOB
                              - BRL
                              - BSD
                              - BTN
                              - NOK
                              - BWP
                              - BYR
                              - BZD
                              - CAD
                              - CDF
                              - XAF
                              - CHF
                              - NZD
                              - CLP
                              - CNY
                              - COP
                              - CRC
                              - CUP
                              - CVE
                              - ANG
                              - CZK
                              - DJF
                              - DKK
                              - DOP
                              - DZD
                              - EGP
                              - MAD
                              - ERN
                              - ETB
                              - FJD
                              - FKP
                              - GBP
                              - GEL
                              - GHS
                              - GIP
                              - GMD
                              - GNF
                              - GTQ
                              - GYD
                              - HKD
                              - HNL
                              - HRK
                              - HTG
                              - HUF
                              - IDR
                              - ILS
                              - INR
                              - IQD
                              - IRR
                              - ISK
                              - JMD
                              - JOD
                              - JPY
                              - KES
                              - KGS
                              - KHR
                              - KMF
                              - KPW
                              - KRW
                              - KWD
                              - KYD
                              - KZT
                              - LAK
                              - LBP
                              - LKR
                              - LRD
                              - LSL
                              - LYD
                              - MDL
                              - MGA
                              - MKD
                              - MMK
                              - MNT
                              - MOP
                              - MRO
                              - MUR
                              - MVR
                              - MWK
                              - MXN
                              - MYR
                              - MZN
                              - NAD
                              - XPF
                              - NGN
                              - NIO
                              - NPR
                              - OMR
                              - PAB
                              - PEN
                              - PGK
                              - PHP
                              - PKR
                              - PLN
                              - PYG
                              - QAR
                              - RON
                              - RSD
                              - RUB
                              - RWF
                              - SAR
                              - SBD
                              - SCR
                              - SDG
                              - SEK
                              - SGD
                              - SHP
                              - SLL
                              - SOS
                              - SRD
                              - SSP
                              - STD
                              - SYP
                              - SZL
                              - THB
                              - TJS
                              - TMT
                              - TND
                              - TOP
                              - TRY
                              - TTD
                              - TWD
                              - TZS
                              - UAH
                              - UGX
                              - UYU
                              - UZS
                              - VEF
                              - VND
                              - VUV
                              - WST
                              - YER
                              - ZAR
                              - ZMW
                              - ZWL
                            description: >-
                              Currency code. See [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).
                            example: EUR
                          exchange_rate:
                            type:
                              - number
                              - 'null'
                        required:
                          - amount
                          - currency
                          - exchange_rate
                        description: >-
                          Fee applied by the Payment Service Provider. Only
                          supported for Stripe.
                        example: null
                      chargeback:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: Total chargeback loss amount.
                            example: 31500
                          last_chargeback_at:
                            type: string
                            format: date-time
                            description: >-
                              Date corresponding to the last chargeback loss
                              event.
                            example: '2024-10-13T10:00:01.860Z'
                        required:
                          - amount
                          - last_chargeback_at
                        description: >-
                          Deprecated field. Use transactions where `type` is
                          `chargeback`; `original_transaction_id` identifies the
                          affected payment transaction.
                        deprecated: true
                        example: null
                      integrations:
                        type: array
                        items:
                          type: object
                          properties:
                            entity_id:
                              type: string
                              description: ID of the entity in the provider.
                            provider_name:
                              type: string
                              enum:
                                - adyen
                                - stripe
                                - mollie
                                - gocardless
                                - airwallex
                                - paypal
                                - salesforce
                                - hubspot
                                - attio
                                - xero
                                - pennylane
                                - zoho-books
                                - exact-online
                                - quickbooks
                                - netsuite
                                - rillet
                                - campfire
                                - dualentry
                                - datev
                                - anrok
                                - sphere
                                - chargebee
                                - slack
                                - plain
                                - zendesk
                                - pylon
                                - intercom
                                - front
                                - helpscout
                                - claap
                                - grain
                                - gong
                                - jiminny
                                - modjo
                                - posthog
                              description: Provider name.
                            provider_account_id:
                              type: string
                              description: ID of the connected provider account.
                            created_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Creation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                products, coupons and subscriptions; `null` when
                                the provider does not report one.
                              example: '2024-12-20T16:04:11Z'
                            activated_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Activation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                subscriptions; `null` when the provider does not
                                report one.
                              example: '2024-12-20T16:04:11Z'
                          required:
                            - entity_id
                            - provider_name
                            - provider_account_id
                          description: Reference to the entity in an external provider.
                          example:
                            entity_id: '123456789'
                            provider_name: stripe
                            provider_account_id: acc_1234567890
                    required:
                      - id
                      - type
                      - amount
                      - currency
                      - customer_id
                      - provider_id
                      - process_at
                      - settled_at
                      - created_at
                      - updated_at
                      - refunded_at
                      - original_transaction_id
                      - reversed_at
                      - last_refreshed_at
                      - provider_fee
                      - chargeback
                      - integrations
                  - type: object
                    properties:
                      payment_method_type:
                        type: string
                        enum:
                          - transfer
                          - transfer_automated
                        description: Payment method type used for the transaction.
                      bank_account:
                        $ref: '#/components/schemas/BankAccount'
                    required:
                      - payment_method_type
                      - bank_account
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - failed
                        description: |-

                          Transaction status.

                          - `failed`: The transaction failed.
                            
                        example: failed
                      error_type:
                        type:
                          - string
                          - 'null'
                        enum:
                          - authentication_required
                          - declined
                          - fraud
                          - insufficient_funds
                          - mandate_invalid
                          - payment_method_authorization_error
                          - payment_method_declined
                          - payment_method_expired
                          - payment_method_invalid
                          - payment_method_not_supported
                          - processing_error
                          - provider_error
                          - unknown
                        description: >-

                          Transaction error type.


                          - `authentication_required`: The card was declined as
                          the transaction requires authentication (e.g. 3-D
                          Secure). The customer should go to their portal page
                          and authenticate their card. If the error happened on
                          an already authenticated transaction, the customer
                          needs to contact their card issuer for more
                          information.

                          - `payment_method_authorization_error`: A transaction
                          authorization cannot be created for a variety of
                          reasons such as the card issuer couldn't be reached,
                          or the card requires a PIN.

                          - `payment_method_declined`: The payment method was
                          declined for a variety of reasons such as a card
                          reported as lost or stolen, insufficient funds or
                          reaching the limit available on the method to complete
                          the purchase, a payment method on a known block list,
                          etc.

                          - `payment_method_expired`: The payment method is
                          expired. The customer should go to their portal page
                          and change their payment method.

                          - `payment_method_invalid`: The payment method is
                          invalid in most cases because of incorrect details
                          (card/account number, CVC, expiration date, postal
                          code).

                          - `payment_method_not_supported`: The payment method
                          doesn't support this type of purchase (e.g. currency,
                          online payment).

                          - `declined`: The payment was declined for a variety
                          of reasons such as security violation, banking service
                          not available, transaction not allowed, etc.

                          - `fraud`: The payment provider suspected the
                          transaction was fraudulent and has been blocked. Don't
                          report more detailed information to your customer, and
                          check on your provider account.

                          - `processing_error`: The payment couldn't be
                          processed by the issuer for an unknown reason.

                          - `provider_error`: An error occurred when contacting
                          the payment provider to initiate the transaction.

                          - `unknown`: A generic error happened on the payment
                          provider side.
                            
                        example: null
                      error_message:
                        type:
                          - string
                          - 'null'
                        description: Details of the error.
                        example: null
                    required:
                      - status
                      - error_type
                      - error_message
                title: Transaction Transfer failed
              - allOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        description: Transaction ID.
                        example: tra_2QdJDDUej969ev
                      type:
                        type: string
                        enum:
                          - subscription
                          - one_time
                          - refund
                          - chargeback
                        description: >-

                          Transaction type.


                          - `subscription`: The transaction is related to a
                          subscription payment.

                          - `one_time`: The transaction is related to a one-time
                          payment.

                          - `refund`: The transaction is related to a refund
                          payment.

                          - `chargeback`: The transaction records funds
                          withdrawn after a payment dispute.
                            
                        example: subscription
                      amount:
                        type: number
                        description: Transaction amount.
                        example: 31500
                      currency:
                        type: string
                        enum:
                          - EUR
                          - AED
                          - AFN
                          - XCD
                          - ALL
                          - AMD
                          - AOA
                          - ARS
                          - USD
                          - AUD
                          - AWG
                          - AZN
                          - BAM
                          - BBD
                          - BDT
                          - BGN
                          - BHD
                          - BIF
                          - XOF
                          - BMD
                          - BND
                          - BOB
                          - BRL
                          - BSD
                          - BTN
                          - NOK
                          - BWP
                          - BYR
                          - BZD
                          - CAD
                          - CDF
                          - XAF
                          - CHF
                          - NZD
                          - CLP
                          - CNY
                          - COP
                          - CRC
                          - CUP
                          - CVE
                          - ANG
                          - CZK
                          - DJF
                          - DKK
                          - DOP
                          - DZD
                          - EGP
                          - MAD
                          - ERN
                          - ETB
                          - FJD
                          - FKP
                          - GBP
                          - GEL
                          - GHS
                          - GIP
                          - GMD
                          - GNF
                          - GTQ
                          - GYD
                          - HKD
                          - HNL
                          - HRK
                          - HTG
                          - HUF
                          - IDR
                          - ILS
                          - INR
                          - IQD
                          - IRR
                          - ISK
                          - JMD
                          - JOD
                          - JPY
                          - KES
                          - KGS
                          - KHR
                          - KMF
                          - KPW
                          - KRW
                          - KWD
                          - KYD
                          - KZT
                          - LAK
                          - LBP
                          - LKR
                          - LRD
                          - LSL
                          - LYD
                          - MDL
                          - MGA
                          - MKD
                          - MMK
                          - MNT
                          - MOP
                          - MRO
                          - MUR
                          - MVR
                          - MWK
                          - MXN
                          - MYR
                          - MZN
                          - NAD
                          - XPF
                          - NGN
                          - NIO
                          - NPR
                          - OMR
                          - PAB
                          - PEN
                          - PGK
                          - PHP
                          - PKR
                          - PLN
                          - PYG
                          - QAR
                          - RON
                          - RSD
                          - RUB
                          - RWF
                          - SAR
                          - SBD
                          - SCR
                          - SDG
                          - SEK
                          - SGD
                          - SHP
                          - SLL
                          - SOS
                          - SRD
                          - SSP
                          - STD
                          - SYP
                          - SZL
                          - THB
                          - TJS
                          - TMT
                          - TND
                          - TOP
                          - TRY
                          - TTD
                          - TWD
                          - TZS
                          - UAH
                          - UGX
                          - UYU
                          - UZS
                          - VEF
                          - VND
                          - VUV
                          - WST
                          - YER
                          - ZAR
                          - ZMW
                          - ZWL
                        description: Transaction currency.
                        example: EUR
                      customer_id:
                        type: string
                        description: ID of the customer linked to the transaction.
                        example: cus_QalW2vTAdkR6IY
                      provider_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Deprecated field, please use
                          `integrations[].entity_id`.
                        deprecated: true
                      process_at:
                        type: string
                        format: date-time
                        description: >-
                          Date corresponding to the processing of the
                          transaction. If in the future, the transaction is
                          scheduled to be processed.
                        example: '2024-11-12T07:38:39.222Z'
                      settled_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date when the transaction was settled. For provider
                          transactions, this is derived from provider settlement
                          data when available.
                        example: '2024-11-12T07:38:39.222Z'
                      created_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction was recorded in Hyperline,
                          independent of its processing date.
                        example: '2026-11-12T10:00:00.000Z'
                      updated_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction or its invoice allocations were
                          last updated in Hyperline. Use the updated_at filters
                          to sync changes incrementally.
                        example: '2026-11-12T11:00:00.000Z'
                      refunded_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date corresponding to the refund of the transaction.
                        example: null
                      original_transaction_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          ID of the payment transaction refunded or charged
                          back.
                        example: null
                      reversed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date when a chargeback withdrawal was reversed.
                        example: null
                      last_refreshed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date corresponding to the last synchronization of the
                          details with the payment provider.
                        example: null
                      provider_fee:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: >-
                              Monetary amount. Expressed in currency's smallest
                              unit.
                          currency:
                            type: string
                            enum:
                              - EUR
                              - AED
                              - AFN
                              - XCD
                              - ALL
                              - AMD
                              - AOA
                              - ARS
                              - USD
                              - AUD
                              - AWG
                              - AZN
                              - BAM
                              - BBD
                              - BDT
                              - BGN
                              - BHD
                              - BIF
                              - XOF
                              - BMD
                              - BND
                              - BOB
                              - BRL
                              - BSD
                              - BTN
                              - NOK
                              - BWP
                              - BYR
                              - BZD
                              - CAD
                              - CDF
                              - XAF
                              - CHF
                              - NZD
                              - CLP
                              - CNY
                              - COP
                              - CRC
                              - CUP
                              - CVE
                              - ANG
                              - CZK
                              - DJF
                              - DKK
                              - DOP
                              - DZD
                              - EGP
                              - MAD
                              - ERN
                              - ETB
                              - FJD
                              - FKP
                              - GBP
                              - GEL
                              - GHS
                              - GIP
                              - GMD
                              - GNF
                              - GTQ
                              - GYD
                              - HKD
                              - HNL
                              - HRK
                              - HTG
                              - HUF
                              - IDR
                              - ILS
                              - INR
                              - IQD
                              - IRR
                              - ISK
                              - JMD
                              - JOD
                              - JPY
                              - KES
                              - KGS
                              - KHR
                              - KMF
                              - KPW
                              - KRW
                              - KWD
                              - KYD
                              - KZT
                              - LAK
                              - LBP
                              - LKR
                              - LRD
                              - LSL
                              - LYD
                              - MDL
                              - MGA
                              - MKD
                              - MMK
                              - MNT
                              - MOP
                              - MRO
                              - MUR
                              - MVR
                              - MWK
                              - MXN
                              - MYR
                              - MZN
                              - NAD
                              - XPF
                              - NGN
                              - NIO
                              - NPR
                              - OMR
                              - PAB
                              - PEN
                              - PGK
                              - PHP
                              - PKR
                              - PLN
                              - PYG
                              - QAR
                              - RON
                              - RSD
                              - RUB
                              - RWF
                              - SAR
                              - SBD
                              - SCR
                              - SDG
                              - SEK
                              - SGD
                              - SHP
                              - SLL
                              - SOS
                              - SRD
                              - SSP
                              - STD
                              - SYP
                              - SZL
                              - THB
                              - TJS
                              - TMT
                              - TND
                              - TOP
                              - TRY
                              - TTD
                              - TWD
                              - TZS
                              - UAH
                              - UGX
                              - UYU
                              - UZS
                              - VEF
                              - VND
                              - VUV
                              - WST
                              - YER
                              - ZAR
                              - ZMW
                              - ZWL
                            description: >-
                              Currency code. See [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).
                            example: EUR
                          exchange_rate:
                            type:
                              - number
                              - 'null'
                        required:
                          - amount
                          - currency
                          - exchange_rate
                        description: >-
                          Fee applied by the Payment Service Provider. Only
                          supported for Stripe.
                        example: null
                      chargeback:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: Total chargeback loss amount.
                            example: 31500
                          last_chargeback_at:
                            type: string
                            format: date-time
                            description: >-
                              Date corresponding to the last chargeback loss
                              event.
                            example: '2024-10-13T10:00:01.860Z'
                        required:
                          - amount
                          - last_chargeback_at
                        description: >-
                          Deprecated field. Use transactions where `type` is
                          `chargeback`; `original_transaction_id` identifies the
                          affected payment transaction.
                        deprecated: true
                        example: null
                      integrations:
                        type: array
                        items:
                          type: object
                          properties:
                            entity_id:
                              type: string
                              description: ID of the entity in the provider.
                            provider_name:
                              type: string
                              enum:
                                - adyen
                                - stripe
                                - mollie
                                - gocardless
                                - airwallex
                                - paypal
                                - salesforce
                                - hubspot
                                - attio
                                - xero
                                - pennylane
                                - zoho-books
                                - exact-online
                                - quickbooks
                                - netsuite
                                - rillet
                                - campfire
                                - dualentry
                                - datev
                                - anrok
                                - sphere
                                - chargebee
                                - slack
                                - plain
                                - zendesk
                                - pylon
                                - intercom
                                - front
                                - helpscout
                                - claap
                                - grain
                                - gong
                                - jiminny
                                - modjo
                                - posthog
                              description: Provider name.
                            provider_account_id:
                              type: string
                              description: ID of the connected provider account.
                            created_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Creation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                products, coupons and subscriptions; `null` when
                                the provider does not report one.
                              example: '2024-12-20T16:04:11Z'
                            activated_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Activation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                subscriptions; `null` when the provider does not
                                report one.
                              example: '2024-12-20T16:04:11Z'
                          required:
                            - entity_id
                            - provider_name
                            - provider_account_id
                          description: Reference to the entity in an external provider.
                          example:
                            entity_id: '123456789'
                            provider_name: stripe
                            provider_account_id: acc_1234567890
                    required:
                      - id
                      - type
                      - amount
                      - currency
                      - customer_id
                      - provider_id
                      - process_at
                      - settled_at
                      - created_at
                      - updated_at
                      - refunded_at
                      - original_transaction_id
                      - reversed_at
                      - last_refreshed_at
                      - provider_fee
                      - chargeback
                      - integrations
                  - type: object
                    properties:
                      payment_method_type:
                        type: string
                        enum:
                          - wallet
                        description: Payment method type used for the transaction.
                      wallet_id:
                        type: string
                        description: ID of the wallet used for a wallet transaction.
                        example: wal_PPpxP5d3uvgiTT
                    required:
                      - payment_method_type
                      - wallet_id
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - scheduled
                          - to_process
                          - pending
                          - settled
                          - cancelled
                        description: >-

                          Transaction status.


                          - `scheduled`: The transaction is scheduled to be
                          processed in the future.

                          - `to_process`: The transaction is waiting to be
                          processed by our system.

                          - `pending`: The transaction has been authorized by
                          the related payment processor, but the banking
                          transaction is not yet settled.

                          - `settled`: The transaction has been cleared on the
                          banking side, the money transfer is fully completed.

                          - `cancelled`: The transaction has been cancelled and
                          won't be processed again.
                            
                        example: settled
                    required:
                      - status
                title: Transaction Wallet
              - allOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        description: Transaction ID.
                        example: tra_2QdJDDUej969ev
                      type:
                        type: string
                        enum:
                          - subscription
                          - one_time
                          - refund
                          - chargeback
                        description: >-

                          Transaction type.


                          - `subscription`: The transaction is related to a
                          subscription payment.

                          - `one_time`: The transaction is related to a one-time
                          payment.

                          - `refund`: The transaction is related to a refund
                          payment.

                          - `chargeback`: The transaction records funds
                          withdrawn after a payment dispute.
                            
                        example: subscription
                      amount:
                        type: number
                        description: Transaction amount.
                        example: 31500
                      currency:
                        type: string
                        enum:
                          - EUR
                          - AED
                          - AFN
                          - XCD
                          - ALL
                          - AMD
                          - AOA
                          - ARS
                          - USD
                          - AUD
                          - AWG
                          - AZN
                          - BAM
                          - BBD
                          - BDT
                          - BGN
                          - BHD
                          - BIF
                          - XOF
                          - BMD
                          - BND
                          - BOB
                          - BRL
                          - BSD
                          - BTN
                          - NOK
                          - BWP
                          - BYR
                          - BZD
                          - CAD
                          - CDF
                          - XAF
                          - CHF
                          - NZD
                          - CLP
                          - CNY
                          - COP
                          - CRC
                          - CUP
                          - CVE
                          - ANG
                          - CZK
                          - DJF
                          - DKK
                          - DOP
                          - DZD
                          - EGP
                          - MAD
                          - ERN
                          - ETB
                          - FJD
                          - FKP
                          - GBP
                          - GEL
                          - GHS
                          - GIP
                          - GMD
                          - GNF
                          - GTQ
                          - GYD
                          - HKD
                          - HNL
                          - HRK
                          - HTG
                          - HUF
                          - IDR
                          - ILS
                          - INR
                          - IQD
                          - IRR
                          - ISK
                          - JMD
                          - JOD
                          - JPY
                          - KES
                          - KGS
                          - KHR
                          - KMF
                          - KPW
                          - KRW
                          - KWD
                          - KYD
                          - KZT
                          - LAK
                          - LBP
                          - LKR
                          - LRD
                          - LSL
                          - LYD
                          - MDL
                          - MGA
                          - MKD
                          - MMK
                          - MNT
                          - MOP
                          - MRO
                          - MUR
                          - MVR
                          - MWK
                          - MXN
                          - MYR
                          - MZN
                          - NAD
                          - XPF
                          - NGN
                          - NIO
                          - NPR
                          - OMR
                          - PAB
                          - PEN
                          - PGK
                          - PHP
                          - PKR
                          - PLN
                          - PYG
                          - QAR
                          - RON
                          - RSD
                          - RUB
                          - RWF
                          - SAR
                          - SBD
                          - SCR
                          - SDG
                          - SEK
                          - SGD
                          - SHP
                          - SLL
                          - SOS
                          - SRD
                          - SSP
                          - STD
                          - SYP
                          - SZL
                          - THB
                          - TJS
                          - TMT
                          - TND
                          - TOP
                          - TRY
                          - TTD
                          - TWD
                          - TZS
                          - UAH
                          - UGX
                          - UYU
                          - UZS
                          - VEF
                          - VND
                          - VUV
                          - WST
                          - YER
                          - ZAR
                          - ZMW
                          - ZWL
                        description: Transaction currency.
                        example: EUR
                      customer_id:
                        type: string
                        description: ID of the customer linked to the transaction.
                        example: cus_QalW2vTAdkR6IY
                      provider_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Deprecated field, please use
                          `integrations[].entity_id`.
                        deprecated: true
                      process_at:
                        type: string
                        format: date-time
                        description: >-
                          Date corresponding to the processing of the
                          transaction. If in the future, the transaction is
                          scheduled to be processed.
                        example: '2024-11-12T07:38:39.222Z'
                      settled_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date when the transaction was settled. For provider
                          transactions, this is derived from provider settlement
                          data when available.
                        example: '2024-11-12T07:38:39.222Z'
                      created_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction was recorded in Hyperline,
                          independent of its processing date.
                        example: '2026-11-12T10:00:00.000Z'
                      updated_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction or its invoice allocations were
                          last updated in Hyperline. Use the updated_at filters
                          to sync changes incrementally.
                        example: '2026-11-12T11:00:00.000Z'
                      refunded_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date corresponding to the refund of the transaction.
                        example: null
                      original_transaction_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          ID of the payment transaction refunded or charged
                          back.
                        example: null
                      reversed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date when a chargeback withdrawal was reversed.
                        example: null
                      last_refreshed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date corresponding to the last synchronization of the
                          details with the payment provider.
                        example: null
                      provider_fee:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: >-
                              Monetary amount. Expressed in currency's smallest
                              unit.
                          currency:
                            type: string
                            enum:
                              - EUR
                              - AED
                              - AFN
                              - XCD
                              - ALL
                              - AMD
                              - AOA
                              - ARS
                              - USD
                              - AUD
                              - AWG
                              - AZN
                              - BAM
                              - BBD
                              - BDT
                              - BGN
                              - BHD
                              - BIF
                              - XOF
                              - BMD
                              - BND
                              - BOB
                              - BRL
                              - BSD
                              - BTN
                              - NOK
                              - BWP
                              - BYR
                              - BZD
                              - CAD
                              - CDF
                              - XAF
                              - CHF
                              - NZD
                              - CLP
                              - CNY
                              - COP
                              - CRC
                              - CUP
                              - CVE
                              - ANG
                              - CZK
                              - DJF
                              - DKK
                              - DOP
                              - DZD
                              - EGP
                              - MAD
                              - ERN
                              - ETB
                              - FJD
                              - FKP
                              - GBP
                              - GEL
                              - GHS
                              - GIP
                              - GMD
                              - GNF
                              - GTQ
                              - GYD
                              - HKD
                              - HNL
                              - HRK
                              - HTG
                              - HUF
                              - IDR
                              - ILS
                              - INR
                              - IQD
                              - IRR
                              - ISK
                              - JMD
                              - JOD
                              - JPY
                              - KES
                              - KGS
                              - KHR
                              - KMF
                              - KPW
                              - KRW
                              - KWD
                              - KYD
                              - KZT
                              - LAK
                              - LBP
                              - LKR
                              - LRD
                              - LSL
                              - LYD
                              - MDL
                              - MGA
                              - MKD
                              - MMK
                              - MNT
                              - MOP
                              - MRO
                              - MUR
                              - MVR
                              - MWK
                              - MXN
                              - MYR
                              - MZN
                              - NAD
                              - XPF
                              - NGN
                              - NIO
                              - NPR
                              - OMR
                              - PAB
                              - PEN
                              - PGK
                              - PHP
                              - PKR
                              - PLN
                              - PYG
                              - QAR
                              - RON
                              - RSD
                              - RUB
                              - RWF
                              - SAR
                              - SBD
                              - SCR
                              - SDG
                              - SEK
                              - SGD
                              - SHP
                              - SLL
                              - SOS
                              - SRD
                              - SSP
                              - STD
                              - SYP
                              - SZL
                              - THB
                              - TJS
                              - TMT
                              - TND
                              - TOP
                              - TRY
                              - TTD
                              - TWD
                              - TZS
                              - UAH
                              - UGX
                              - UYU
                              - UZS
                              - VEF
                              - VND
                              - VUV
                              - WST
                              - YER
                              - ZAR
                              - ZMW
                              - ZWL
                            description: >-
                              Currency code. See [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).
                            example: EUR
                          exchange_rate:
                            type:
                              - number
                              - 'null'
                        required:
                          - amount
                          - currency
                          - exchange_rate
                        description: >-
                          Fee applied by the Payment Service Provider. Only
                          supported for Stripe.
                        example: null
                      chargeback:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: Total chargeback loss amount.
                            example: 31500
                          last_chargeback_at:
                            type: string
                            format: date-time
                            description: >-
                              Date corresponding to the last chargeback loss
                              event.
                            example: '2024-10-13T10:00:01.860Z'
                        required:
                          - amount
                          - last_chargeback_at
                        description: >-
                          Deprecated field. Use transactions where `type` is
                          `chargeback`; `original_transaction_id` identifies the
                          affected payment transaction.
                        deprecated: true
                        example: null
                      integrations:
                        type: array
                        items:
                          type: object
                          properties:
                            entity_id:
                              type: string
                              description: ID of the entity in the provider.
                            provider_name:
                              type: string
                              enum:
                                - adyen
                                - stripe
                                - mollie
                                - gocardless
                                - airwallex
                                - paypal
                                - salesforce
                                - hubspot
                                - attio
                                - xero
                                - pennylane
                                - zoho-books
                                - exact-online
                                - quickbooks
                                - netsuite
                                - rillet
                                - campfire
                                - dualentry
                                - datev
                                - anrok
                                - sphere
                                - chargebee
                                - slack
                                - plain
                                - zendesk
                                - pylon
                                - intercom
                                - front
                                - helpscout
                                - claap
                                - grain
                                - gong
                                - jiminny
                                - modjo
                                - posthog
                              description: Provider name.
                            provider_account_id:
                              type: string
                              description: ID of the connected provider account.
                            created_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Creation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                products, coupons and subscriptions; `null` when
                                the provider does not report one.
                              example: '2024-12-20T16:04:11Z'
                            activated_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Activation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                subscriptions; `null` when the provider does not
                                report one.
                              example: '2024-12-20T16:04:11Z'
                          required:
                            - entity_id
                            - provider_name
                            - provider_account_id
                          description: Reference to the entity in an external provider.
                          example:
                            entity_id: '123456789'
                            provider_name: stripe
                            provider_account_id: acc_1234567890
                    required:
                      - id
                      - type
                      - amount
                      - currency
                      - customer_id
                      - provider_id
                      - process_at
                      - settled_at
                      - created_at
                      - updated_at
                      - refunded_at
                      - original_transaction_id
                      - reversed_at
                      - last_refreshed_at
                      - provider_fee
                      - chargeback
                      - integrations
                  - type: object
                    properties:
                      payment_method_type:
                        type: string
                        enum:
                          - wallet
                        description: Payment method type used for the transaction.
                      wallet_id:
                        type: string
                        description: ID of the wallet used for a wallet transaction.
                        example: wal_PPpxP5d3uvgiTT
                    required:
                      - payment_method_type
                      - wallet_id
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - failed
                        description: |-

                          Transaction status.

                          - `failed`: The transaction failed.
                            
                        example: failed
                      error_type:
                        type:
                          - string
                          - 'null'
                        enum:
                          - authentication_required
                          - declined
                          - fraud
                          - insufficient_funds
                          - mandate_invalid
                          - payment_method_authorization_error
                          - payment_method_declined
                          - payment_method_expired
                          - payment_method_invalid
                          - payment_method_not_supported
                          - processing_error
                          - provider_error
                          - unknown
                        description: >-

                          Transaction error type.


                          - `authentication_required`: The card was declined as
                          the transaction requires authentication (e.g. 3-D
                          Secure). The customer should go to their portal page
                          and authenticate their card. If the error happened on
                          an already authenticated transaction, the customer
                          needs to contact their card issuer for more
                          information.

                          - `payment_method_authorization_error`: A transaction
                          authorization cannot be created for a variety of
                          reasons such as the card issuer couldn't be reached,
                          or the card requires a PIN.

                          - `payment_method_declined`: The payment method was
                          declined for a variety of reasons such as a card
                          reported as lost or stolen, insufficient funds or
                          reaching the limit available on the method to complete
                          the purchase, a payment method on a known block list,
                          etc.

                          - `payment_method_expired`: The payment method is
                          expired. The customer should go to their portal page
                          and change their payment method.

                          - `payment_method_invalid`: The payment method is
                          invalid in most cases because of incorrect details
                          (card/account number, CVC, expiration date, postal
                          code).

                          - `payment_method_not_supported`: The payment method
                          doesn't support this type of purchase (e.g. currency,
                          online payment).

                          - `declined`: The payment was declined for a variety
                          of reasons such as security violation, banking service
                          not available, transaction not allowed, etc.

                          - `fraud`: The payment provider suspected the
                          transaction was fraudulent and has been blocked. Don't
                          report more detailed information to your customer, and
                          check on your provider account.

                          - `processing_error`: The payment couldn't be
                          processed by the issuer for an unknown reason.

                          - `provider_error`: An error occurred when contacting
                          the payment provider to initiate the transaction.

                          - `unknown`: A generic error happened on the payment
                          provider side.
                            
                        example: null
                      error_message:
                        type:
                          - string
                          - 'null'
                        description: Details of the error.
                        example: null
                    required:
                      - status
                      - error_type
                      - error_message
                title: Transaction Wallet failed
              - allOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        description: Transaction ID.
                        example: tra_2QdJDDUej969ev
                      type:
                        type: string
                        enum:
                          - subscription
                          - one_time
                          - refund
                          - chargeback
                        description: >-

                          Transaction type.


                          - `subscription`: The transaction is related to a
                          subscription payment.

                          - `one_time`: The transaction is related to a one-time
                          payment.

                          - `refund`: The transaction is related to a refund
                          payment.

                          - `chargeback`: The transaction records funds
                          withdrawn after a payment dispute.
                            
                        example: subscription
                      amount:
                        type: number
                        description: Transaction amount.
                        example: 31500
                      currency:
                        type: string
                        enum:
                          - EUR
                          - AED
                          - AFN
                          - XCD
                          - ALL
                          - AMD
                          - AOA
                          - ARS
                          - USD
                          - AUD
                          - AWG
                          - AZN
                          - BAM
                          - BBD
                          - BDT
                          - BGN
                          - BHD
                          - BIF
                          - XOF
                          - BMD
                          - BND
                          - BOB
                          - BRL
                          - BSD
                          - BTN
                          - NOK
                          - BWP
                          - BYR
                          - BZD
                          - CAD
                          - CDF
                          - XAF
                          - CHF
                          - NZD
                          - CLP
                          - CNY
                          - COP
                          - CRC
                          - CUP
                          - CVE
                          - ANG
                          - CZK
                          - DJF
                          - DKK
                          - DOP
                          - DZD
                          - EGP
                          - MAD
                          - ERN
                          - ETB
                          - FJD
                          - FKP
                          - GBP
                          - GEL
                          - GHS
                          - GIP
                          - GMD
                          - GNF
                          - GTQ
                          - GYD
                          - HKD
                          - HNL
                          - HRK
                          - HTG
                          - HUF
                          - IDR
                          - ILS
                          - INR
                          - IQD
                          - IRR
                          - ISK
                          - JMD
                          - JOD
                          - JPY
                          - KES
                          - KGS
                          - KHR
                          - KMF
                          - KPW
                          - KRW
                          - KWD
                          - KYD
                          - KZT
                          - LAK
                          - LBP
                          - LKR
                          - LRD
                          - LSL
                          - LYD
                          - MDL
                          - MGA
                          - MKD
                          - MMK
                          - MNT
                          - MOP
                          - MRO
                          - MUR
                          - MVR
                          - MWK
                          - MXN
                          - MYR
                          - MZN
                          - NAD
                          - XPF
                          - NGN
                          - NIO
                          - NPR
                          - OMR
                          - PAB
                          - PEN
                          - PGK
                          - PHP
                          - PKR
                          - PLN
                          - PYG
                          - QAR
                          - RON
                          - RSD
                          - RUB
                          - RWF
                          - SAR
                          - SBD
                          - SCR
                          - SDG
                          - SEK
                          - SGD
                          - SHP
                          - SLL
                          - SOS
                          - SRD
                          - SSP
                          - STD
                          - SYP
                          - SZL
                          - THB
                          - TJS
                          - TMT
                          - TND
                          - TOP
                          - TRY
                          - TTD
                          - TWD
                          - TZS
                          - UAH
                          - UGX
                          - UYU
                          - UZS
                          - VEF
                          - VND
                          - VUV
                          - WST
                          - YER
                          - ZAR
                          - ZMW
                          - ZWL
                        description: Transaction currency.
                        example: EUR
                      customer_id:
                        type: string
                        description: ID of the customer linked to the transaction.
                        example: cus_QalW2vTAdkR6IY
                      provider_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Deprecated field, please use
                          `integrations[].entity_id`.
                        deprecated: true
                      process_at:
                        type: string
                        format: date-time
                        description: >-
                          Date corresponding to the processing of the
                          transaction. If in the future, the transaction is
                          scheduled to be processed.
                        example: '2024-11-12T07:38:39.222Z'
                      settled_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date when the transaction was settled. For provider
                          transactions, this is derived from provider settlement
                          data when available.
                        example: '2024-11-12T07:38:39.222Z'
                      created_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction was recorded in Hyperline,
                          independent of its processing date.
                        example: '2026-11-12T10:00:00.000Z'
                      updated_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction or its invoice allocations were
                          last updated in Hyperline. Use the updated_at filters
                          to sync changes incrementally.
                        example: '2026-11-12T11:00:00.000Z'
                      refunded_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date corresponding to the refund of the transaction.
                        example: null
                      original_transaction_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          ID of the payment transaction refunded or charged
                          back.
                        example: null
                      reversed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date when a chargeback withdrawal was reversed.
                        example: null
                      last_refreshed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date corresponding to the last synchronization of the
                          details with the payment provider.
                        example: null
                      provider_fee:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: >-
                              Monetary amount. Expressed in currency's smallest
                              unit.
                          currency:
                            type: string
                            enum:
                              - EUR
                              - AED
                              - AFN
                              - XCD
                              - ALL
                              - AMD
                              - AOA
                              - ARS
                              - USD
                              - AUD
                              - AWG
                              - AZN
                              - BAM
                              - BBD
                              - BDT
                              - BGN
                              - BHD
                              - BIF
                              - XOF
                              - BMD
                              - BND
                              - BOB
                              - BRL
                              - BSD
                              - BTN
                              - NOK
                              - BWP
                              - BYR
                              - BZD
                              - CAD
                              - CDF
                              - XAF
                              - CHF
                              - NZD
                              - CLP
                              - CNY
                              - COP
                              - CRC
                              - CUP
                              - CVE
                              - ANG
                              - CZK
                              - DJF
                              - DKK
                              - DOP
                              - DZD
                              - EGP
                              - MAD
                              - ERN
                              - ETB
                              - FJD
                              - FKP
                              - GBP
                              - GEL
                              - GHS
                              - GIP
                              - GMD
                              - GNF
                              - GTQ
                              - GYD
                              - HKD
                              - HNL
                              - HRK
                              - HTG
                              - HUF
                              - IDR
                              - ILS
                              - INR
                              - IQD
                              - IRR
                              - ISK
                              - JMD
                              - JOD
                              - JPY
                              - KES
                              - KGS
                              - KHR
                              - KMF
                              - KPW
                              - KRW
                              - KWD
                              - KYD
                              - KZT
                              - LAK
                              - LBP
                              - LKR
                              - LRD
                              - LSL
                              - LYD
                              - MDL
                              - MGA
                              - MKD
                              - MMK
                              - MNT
                              - MOP
                              - MRO
                              - MUR
                              - MVR
                              - MWK
                              - MXN
                              - MYR
                              - MZN
                              - NAD
                              - XPF
                              - NGN
                              - NIO
                              - NPR
                              - OMR
                              - PAB
                              - PEN
                              - PGK
                              - PHP
                              - PKR
                              - PLN
                              - PYG
                              - QAR
                              - RON
                              - RSD
                              - RUB
                              - RWF
                              - SAR
                              - SBD
                              - SCR
                              - SDG
                              - SEK
                              - SGD
                              - SHP
                              - SLL
                              - SOS
                              - SRD
                              - SSP
                              - STD
                              - SYP
                              - SZL
                              - THB
                              - TJS
                              - TMT
                              - TND
                              - TOP
                              - TRY
                              - TTD
                              - TWD
                              - TZS
                              - UAH
                              - UGX
                              - UYU
                              - UZS
                              - VEF
                              - VND
                              - VUV
                              - WST
                              - YER
                              - ZAR
                              - ZMW
                              - ZWL
                            description: >-
                              Currency code. See [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).
                            example: EUR
                          exchange_rate:
                            type:
                              - number
                              - 'null'
                        required:
                          - amount
                          - currency
                          - exchange_rate
                        description: >-
                          Fee applied by the Payment Service Provider. Only
                          supported for Stripe.
                        example: null
                      chargeback:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: Total chargeback loss amount.
                            example: 31500
                          last_chargeback_at:
                            type: string
                            format: date-time
                            description: >-
                              Date corresponding to the last chargeback loss
                              event.
                            example: '2024-10-13T10:00:01.860Z'
                        required:
                          - amount
                          - last_chargeback_at
                        description: >-
                          Deprecated field. Use transactions where `type` is
                          `chargeback`; `original_transaction_id` identifies the
                          affected payment transaction.
                        deprecated: true
                        example: null
                      integrations:
                        type: array
                        items:
                          type: object
                          properties:
                            entity_id:
                              type: string
                              description: ID of the entity in the provider.
                            provider_name:
                              type: string
                              enum:
                                - adyen
                                - stripe
                                - mollie
                                - gocardless
                                - airwallex
                                - paypal
                                - salesforce
                                - hubspot
                                - attio
                                - xero
                                - pennylane
                                - zoho-books
                                - exact-online
                                - quickbooks
                                - netsuite
                                - rillet
                                - campfire
                                - dualentry
                                - datev
                                - anrok
                                - sphere
                                - chargebee
                                - slack
                                - plain
                                - zendesk
                                - pylon
                                - intercom
                                - front
                                - helpscout
                                - claap
                                - grain
                                - gong
                                - jiminny
                                - modjo
                                - posthog
                              description: Provider name.
                            provider_account_id:
                              type: string
                              description: ID of the connected provider account.
                            created_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Creation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                products, coupons and subscriptions; `null` when
                                the provider does not report one.
                              example: '2024-12-20T16:04:11Z'
                            activated_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Activation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                subscriptions; `null` when the provider does not
                                report one.
                              example: '2024-12-20T16:04:11Z'
                          required:
                            - entity_id
                            - provider_name
                            - provider_account_id
                          description: Reference to the entity in an external provider.
                          example:
                            entity_id: '123456789'
                            provider_name: stripe
                            provider_account_id: acc_1234567890
                    required:
                      - id
                      - type
                      - amount
                      - currency
                      - customer_id
                      - provider_id
                      - process_at
                      - settled_at
                      - created_at
                      - updated_at
                      - refunded_at
                      - original_transaction_id
                      - reversed_at
                      - last_refreshed_at
                      - provider_fee
                      - chargeback
                      - integrations
                  - type: object
                    properties:
                      payment_method_type:
                        type: string
                        enum:
                          - external
                        description: Payment method type used for the transaction.
                    required:
                      - payment_method_type
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - scheduled
                          - to_process
                          - pending
                          - settled
                          - cancelled
                        description: >-

                          Transaction status.


                          - `scheduled`: The transaction is scheduled to be
                          processed in the future.

                          - `to_process`: The transaction is waiting to be
                          processed by our system.

                          - `pending`: The transaction has been authorized by
                          the related payment processor, but the banking
                          transaction is not yet settled.

                          - `settled`: The transaction has been cleared on the
                          banking side, the money transfer is fully completed.

                          - `cancelled`: The transaction has been cancelled and
                          won't be processed again.
                            
                        example: settled
                    required:
                      - status
                title: Transaction External
              - allOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        description: Transaction ID.
                        example: tra_2QdJDDUej969ev
                      type:
                        type: string
                        enum:
                          - subscription
                          - one_time
                          - refund
                          - chargeback
                        description: >-

                          Transaction type.


                          - `subscription`: The transaction is related to a
                          subscription payment.

                          - `one_time`: The transaction is related to a one-time
                          payment.

                          - `refund`: The transaction is related to a refund
                          payment.

                          - `chargeback`: The transaction records funds
                          withdrawn after a payment dispute.
                            
                        example: subscription
                      amount:
                        type: number
                        description: Transaction amount.
                        example: 31500
                      currency:
                        type: string
                        enum:
                          - EUR
                          - AED
                          - AFN
                          - XCD
                          - ALL
                          - AMD
                          - AOA
                          - ARS
                          - USD
                          - AUD
                          - AWG
                          - AZN
                          - BAM
                          - BBD
                          - BDT
                          - BGN
                          - BHD
                          - BIF
                          - XOF
                          - BMD
                          - BND
                          - BOB
                          - BRL
                          - BSD
                          - BTN
                          - NOK
                          - BWP
                          - BYR
                          - BZD
                          - CAD
                          - CDF
                          - XAF
                          - CHF
                          - NZD
                          - CLP
                          - CNY
                          - COP
                          - CRC
                          - CUP
                          - CVE
                          - ANG
                          - CZK
                          - DJF
                          - DKK
                          - DOP
                          - DZD
                          - EGP
                          - MAD
                          - ERN
                          - ETB
                          - FJD
                          - FKP
                          - GBP
                          - GEL
                          - GHS
                          - GIP
                          - GMD
                          - GNF
                          - GTQ
                          - GYD
                          - HKD
                          - HNL
                          - HRK
                          - HTG
                          - HUF
                          - IDR
                          - ILS
                          - INR
                          - IQD
                          - IRR
                          - ISK
                          - JMD
                          - JOD
                          - JPY
                          - KES
                          - KGS
                          - KHR
                          - KMF
                          - KPW
                          - KRW
                          - KWD
                          - KYD
                          - KZT
                          - LAK
                          - LBP
                          - LKR
                          - LRD
                          - LSL
                          - LYD
                          - MDL
                          - MGA
                          - MKD
                          - MMK
                          - MNT
                          - MOP
                          - MRO
                          - MUR
                          - MVR
                          - MWK
                          - MXN
                          - MYR
                          - MZN
                          - NAD
                          - XPF
                          - NGN
                          - NIO
                          - NPR
                          - OMR
                          - PAB
                          - PEN
                          - PGK
                          - PHP
                          - PKR
                          - PLN
                          - PYG
                          - QAR
                          - RON
                          - RSD
                          - RUB
                          - RWF
                          - SAR
                          - SBD
                          - SCR
                          - SDG
                          - SEK
                          - SGD
                          - SHP
                          - SLL
                          - SOS
                          - SRD
                          - SSP
                          - STD
                          - SYP
                          - SZL
                          - THB
                          - TJS
                          - TMT
                          - TND
                          - TOP
                          - TRY
                          - TTD
                          - TWD
                          - TZS
                          - UAH
                          - UGX
                          - UYU
                          - UZS
                          - VEF
                          - VND
                          - VUV
                          - WST
                          - YER
                          - ZAR
                          - ZMW
                          - ZWL
                        description: Transaction currency.
                        example: EUR
                      customer_id:
                        type: string
                        description: ID of the customer linked to the transaction.
                        example: cus_QalW2vTAdkR6IY
                      provider_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Deprecated field, please use
                          `integrations[].entity_id`.
                        deprecated: true
                      process_at:
                        type: string
                        format: date-time
                        description: >-
                          Date corresponding to the processing of the
                          transaction. If in the future, the transaction is
                          scheduled to be processed.
                        example: '2024-11-12T07:38:39.222Z'
                      settled_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date when the transaction was settled. For provider
                          transactions, this is derived from provider settlement
                          data when available.
                        example: '2024-11-12T07:38:39.222Z'
                      created_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction was recorded in Hyperline,
                          independent of its processing date.
                        example: '2026-11-12T10:00:00.000Z'
                      updated_at:
                        type: string
                        format: date-time
                        description: >-
                          Date the transaction or its invoice allocations were
                          last updated in Hyperline. Use the updated_at filters
                          to sync changes incrementally.
                        example: '2026-11-12T11:00:00.000Z'
                      refunded_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date corresponding to the refund of the transaction.
                        example: null
                      original_transaction_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          ID of the payment transaction refunded or charged
                          back.
                        example: null
                      reversed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Date when a chargeback withdrawal was reversed.
                        example: null
                      last_refreshed_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Date corresponding to the last synchronization of the
                          details with the payment provider.
                        example: null
                      provider_fee:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: >-
                              Monetary amount. Expressed in currency's smallest
                              unit.
                          currency:
                            type: string
                            enum:
                              - EUR
                              - AED
                              - AFN
                              - XCD
                              - ALL
                              - AMD
                              - AOA
                              - ARS
                              - USD
                              - AUD
                              - AWG
                              - AZN
                              - BAM
                              - BBD
                              - BDT
                              - BGN
                              - BHD
                              - BIF
                              - XOF
                              - BMD
                              - BND
                              - BOB
                              - BRL
                              - BSD
                              - BTN
                              - NOK
                              - BWP
                              - BYR
                              - BZD
                              - CAD
                              - CDF
                              - XAF
                              - CHF
                              - NZD
                              - CLP
                              - CNY
                              - COP
                              - CRC
                              - CUP
                              - CVE
                              - ANG
                              - CZK
                              - DJF
                              - DKK
                              - DOP
                              - DZD
                              - EGP
                              - MAD
                              - ERN
                              - ETB
                              - FJD
                              - FKP
                              - GBP
                              - GEL
                              - GHS
                              - GIP
                              - GMD
                              - GNF
                              - GTQ
                              - GYD
                              - HKD
                              - HNL
                              - HRK
                              - HTG
                              - HUF
                              - IDR
                              - ILS
                              - INR
                              - IQD
                              - IRR
                              - ISK
                              - JMD
                              - JOD
                              - JPY
                              - KES
                              - KGS
                              - KHR
                              - KMF
                              - KPW
                              - KRW
                              - KWD
                              - KYD
                              - KZT
                              - LAK
                              - LBP
                              - LKR
                              - LRD
                              - LSL
                              - LYD
                              - MDL
                              - MGA
                              - MKD
                              - MMK
                              - MNT
                              - MOP
                              - MRO
                              - MUR
                              - MVR
                              - MWK
                              - MXN
                              - MYR
                              - MZN
                              - NAD
                              - XPF
                              - NGN
                              - NIO
                              - NPR
                              - OMR
                              - PAB
                              - PEN
                              - PGK
                              - PHP
                              - PKR
                              - PLN
                              - PYG
                              - QAR
                              - RON
                              - RSD
                              - RUB
                              - RWF
                              - SAR
                              - SBD
                              - SCR
                              - SDG
                              - SEK
                              - SGD
                              - SHP
                              - SLL
                              - SOS
                              - SRD
                              - SSP
                              - STD
                              - SYP
                              - SZL
                              - THB
                              - TJS
                              - TMT
                              - TND
                              - TOP
                              - TRY
                              - TTD
                              - TWD
                              - TZS
                              - UAH
                              - UGX
                              - UYU
                              - UZS
                              - VEF
                              - VND
                              - VUV
                              - WST
                              - YER
                              - ZAR
                              - ZMW
                              - ZWL
                            description: >-
                              Currency code. See [ISO
                              4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).
                            example: EUR
                          exchange_rate:
                            type:
                              - number
                              - 'null'
                        required:
                          - amount
                          - currency
                          - exchange_rate
                        description: >-
                          Fee applied by the Payment Service Provider. Only
                          supported for Stripe.
                        example: null
                      chargeback:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount:
                            type: number
                            description: Total chargeback loss amount.
                            example: 31500
                          last_chargeback_at:
                            type: string
                            format: date-time
                            description: >-
                              Date corresponding to the last chargeback loss
                              event.
                            example: '2024-10-13T10:00:01.860Z'
                        required:
                          - amount
                          - last_chargeback_at
                        description: >-
                          Deprecated field. Use transactions where `type` is
                          `chargeback`; `original_transaction_id` identifies the
                          affected payment transaction.
                        deprecated: true
                        example: null
                      integrations:
                        type: array
                        items:
                          type: object
                          properties:
                            entity_id:
                              type: string
                              description: ID of the entity in the provider.
                            provider_name:
                              type: string
                              enum:
                                - adyen
                                - stripe
                                - mollie
                                - gocardless
                                - airwallex
                                - paypal
                                - salesforce
                                - hubspot
                                - attio
                                - xero
                                - pennylane
                                - zoho-books
                                - exact-online
                                - quickbooks
                                - netsuite
                                - rillet
                                - campfire
                                - dualentry
                                - datev
                                - anrok
                                - sphere
                                - chargebee
                                - slack
                                - plain
                                - zendesk
                                - pylon
                                - intercom
                                - front
                                - helpscout
                                - claap
                                - grain
                                - gong
                                - jiminny
                                - modjo
                                - posthog
                              description: Provider name.
                            provider_account_id:
                              type: string
                              description: ID of the connected provider account.
                            created_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Creation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                products, coupons and subscriptions; `null` when
                                the provider does not report one.
                              example: '2024-12-20T16:04:11Z'
                            activated_at:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              description: >-
                                Activation date of the entity in the provider,
                                when it was imported from there. Exposed on
                                subscriptions; `null` when the provider does not
                                report one.
                              example: '2024-12-20T16:04:11Z'
                          required:
                            - entity_id
                            - provider_name
                            - provider_account_id
                          description: Reference to the entity in an external provider.
                          example:
                            entity_id: '123456789'
                            provider_name: stripe
                            provider_account_id: acc_1234567890
                    required:
                      - id
                      - type
                      - amount
                      - currency
                      - customer_id
                      - provider_id
                      - process_at
                      - settled_at
                      - created_at
                      - updated_at
                      - refunded_at
                      - original_transaction_id
                      - reversed_at
                      - last_refreshed_at
                      - provider_fee
                      - chargeback
                      - integrations
                  - type: object
                    properties:
                      payment_method_type:
                        type: string
                        enum:
                          - external
                        description: Payment method type used for the transaction.
                    required:
                      - payment_method_type
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - failed
                        description: |-

                          Transaction status.

                          - `failed`: The transaction failed.
                            
                        example: failed
                      error_type:
                        type:
                          - string
                          - 'null'
                        enum:
                          - authentication_required
                          - declined
                          - fraud
                          - insufficient_funds
                          - mandate_invalid
                          - payment_method_authorization_error
                          - payment_method_declined
                          - payment_method_expired
                          - payment_method_invalid
                          - payment_method_not_supported
                          - processing_error
                          - provider_error
                          - unknown
                        description: >-

                          Transaction error type.


                          - `authentication_required`: The card was declined as
                          the transaction requires authentication (e.g. 3-D
                          Secure). The customer should go to their portal page
                          and authenticate their card. If the error happened on
                          an already authenticated transaction, the customer
                          needs to contact their card issuer for more
                          information.

                          - `payment_method_authorization_error`: A transaction
                          authorization cannot be created for a variety of
                          reasons such as the card issuer couldn't be reached,
                          or the card requires a PIN.

                          - `payment_method_declined`: The payment method was
                          declined for a variety of reasons such as a card
                          reported as lost or stolen, insufficient funds or
                          reaching the limit available on the method to complete
                          the purchase, a payment method on a known block list,
                          etc.

                          - `payment_method_expired`: The payment method is
                          expired. The customer should go to their portal page
                          and change their payment method.

                          - `payment_method_invalid`: The payment method is
                          invalid in most cases because of incorrect details
                          (card/account number, CVC, expiration date, postal
                          code).

                          - `payment_method_not_supported`: The payment method
                          doesn't support this type of purchase (e.g. currency,
                          online payment).

                          - `declined`: The payment was declined for a variety
                          of reasons such as security violation, banking service
                          not available, transaction not allowed, etc.

                          - `fraud`: The payment provider suspected the
                          transaction was fraudulent and has been blocked. Don't
                          report more detailed information to your customer, and
                          check on your provider account.

                          - `processing_error`: The payment couldn't be
                          processed by the issuer for an unknown reason.

                          - `provider_error`: An error occurred when contacting
                          the payment provider to initiate the transaction.

                          - `unknown`: A generic error happened on the payment
                          provider side.
                            
                        example: null
                      error_message:
                        type:
                          - string
                          - 'null'
                        description: Details of the error.
                        example: null
                    required:
                      - status
                      - error_type
                      - error_message
                title: Transaction External failed
          description: List of transactions related to the invoice.
        public_url:
          type: string
          format: uri
          description: >-
            Public URL of the invoice page where the customer can pay the
            invoice.
      required:
        - id
        - number
        - type
        - document_name
        - status
        - reference
        - purchase_order
        - currency
        - source
        - origin
        - total_amount
        - amount_due
        - amount_paid
        - amount_fixed
        - amount_excluding_tax
        - tax_rate
        - tax_amount
        - tax_scheme
        - discount_amount
        - conversion_rate
        - converted_amount
        - converted_at
        - payment_method_id
        - bank_account_id
        - custom_note
        - additional_info
        - footer
        - customer
        - seller
        - subscription_id
        - period_starts_at
        - period_ends_at
        - emitted_at
        - due_at
        - issuing_method
        - refunded_at
        - grace_period_ended_at
        - settled_at
        - created_at
        - updated_at
        - properties
        - custom_properties
        - additional_display_fields
        - original_invoice_id
        - original_invoice_number
        - line_items
        - coupons
        - transactions
        - public_url
    Address:
      type:
        - object
        - 'null'
      properties:
        name:
          type:
            - string
            - 'null'
          description: Address name.
          example: Acme
        line1:
          type:
            - string
            - 'null'
          description: Address first line.
          example: 5 rue de Paradis
        line2:
          type:
            - string
            - 'null'
          description: Address second line (optional).
          example: null
        city:
          type:
            - string
            - 'null'
          description: Address city.
          example: Paris
        zip:
          type:
            - string
            - 'null'
          description: Address ZIP code.
          example: '75010'
        state:
          type:
            - string
            - 'null'
          description: >-
            State or province of the address, stored as its code (the second
            part of the ISO 3166-2 code, e.g. `CA` for `US-CA`) for:

            - United States: state, see [ISO
            3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)

            - Canada: province or territory, see [ISO
            3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)

            - Italy: province, see [ISO
            3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)

            - Brazil: state, see [ISO
            3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)


            A code or a name is accepted (e.g. `ON` or `Ontario`); a value that
            matches neither for these countries is rejected. For any other
            country, the state is ignored.
          example: CA
        country:
          type:
            - string
            - 'null'
          enum:
            - AD
            - AE
            - AF
            - AG
            - AI
            - AL
            - AM
            - AO
            - AQ
            - AR
            - AS
            - AT
            - AU
            - AW
            - AX
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BG
            - BH
            - BI
            - BJ
            - BL
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BF
            - BV
            - BW
            - BY
            - BZ
            - CA
            - CC
            - CD
            - CF
            - CG
            - CH
            - CI
            - CK
            - CL
            - CM
            - CN
            - CO
            - CR
            - CU
            - CV
            - CW
            - CX
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - EH
            - ER
            - ES
            - ES-CE
            - ES-ML
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FO
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GS
            - GT
            - GU
            - GW
            - GY
            - HK
            - HM
            - HN
            - HR
            - HT
            - HU
            - IC
            - ID
            - IE
            - IL
            - IM
            - IN
            - IO
            - IQ
            - IR
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KP
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MF
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NC
            - NE
            - NF
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PF
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PS
            - PT
            - PT-20
            - PT-30
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RU
            - RW
            - SA
            - SB
            - SC
            - SD
            - SE
            - SG
            - SH
            - SI
            - SJ
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - SS
            - ST
            - SV
            - SX
            - SY
            - SZ
            - TC
            - TD
            - TF
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - UM
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - XK
            - YE
            - YT
            - ZA
            - ZM
            - ZW
          description: >-
            Two-letter country code in ISO format. See [ISO 3166-1
            alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
          example: FR
      description: Customer billing address.
    InvoiceLineItem:
      type: object
      properties:
        id:
          type: string
          description: Invoice line item ID.
          example: ili_0FACNpeoEFkGu3
        name:
          type: string
          description: Name of the line item, corresponding to the related product.
          example: Platform access
        entry_type:
          type: string
          enum:
            - debit
            - credit
          description: Indicates whether the line item is a debit or credit.
          example: debit
        product_id:
          type:
            - string
            - 'null'
          description: ID of the product billed by the line item.
          example: itm_KbLcWt2qm5p1S2
        price_configuration_id:
          type:
            - string
            - 'null'
          description: >-
            ID of the catalog price configuration linked to the line. Determines
            the product and revenue classification when subscription terms
            cannot be resolved. Must belong to the supplied product, if any. On
            finalized invoices, changing this link never changes amounts or
            taxes.
          example: pcf_monthly
        product_type:
          type:
            - string
            - 'null'
          enum:
            - flat_fee
            - seat
            - dynamic
            - credit
            - bundle
          description: Product type related to the invoice line item.
          example: flat_fee
        units_count:
          type: number
          description: Count of units of the product related to the invoice line item.
          example: 1
        unit_amount:
          type: number
          description: >-
            Amount of one unit of the product related to the invoice line item.
            Expressed in currency's smallest unit.
          example: 24000
        amount:
          type: number
          description: >-
            Total amount of the invoice line item. Debit or credit can be
            distinguished using the `entry_type` field. Expressed in currency's
            smallest unit.
          example: 24000
        amount_excluding_tax:
          type: number
          description: >-
            Total amount without the taxes amount of the invoice line item.
            Expressed in currency's smallest unit.
          example: 20000
        tax_rate:
          type: number
          description: Tax rate of the invoice line item.
          example: 20
        tax_rate_id:
          type:
            - string
            - 'null'
          description: ID of the custom tax rate applied to the line item.
          example: null
        tax_amount:
          type: number
          description: >-
            Tax amount of the invoice line item. Expressed in currency's
            smallest unit.
          example: 4000
        discount_amount:
          type: number
          description: >-
            Amount corresponding to the discounted part of the total amount of
            the invoice line item. Expressed in currency's smallest unit.
          example: 0
        discount_percent:
          type:
            - number
            - 'null'
          description: >-
            Percentage applied to compute the discounted part of the invoice
            line amount. Only if coupons applied are percentage based.
        period_starts_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Start date of the line item's service period.
          example: '2026-10-13T00:00:00.000Z'
        period_ends_at:
          type:
            - string
            - 'null'
          format: date-time
          description: End date of the line item's service period.
          example: '2026-11-13T00:00:00.000Z'
        revenue_type:
          type:
            - string
            - 'null'
          enum:
            - recurring
            - variable
            - one_off
          description: >-
            Revenue type classification of the line item.


            - `recurring`: Recurring revenue (MRR) from subscription products
            billed at regular intervals.

            - `variable`: Variable revenue from usage-based products.

            - `one_off`: One-time revenue from single charges or products billed
            once.
          example: recurring
        revenue_interval_count:
          type:
            - number
            - 'null'
          description: >-
            Number of billing interval periods for recurring or variable revenue
            (e.g., 1 with months for monthly, 1 with years for annual). This is
            separate from the line service dates.
          example: 1
        revenue_interval_period:
          type:
            - string
            - 'null'
          enum:
            - days
            - weeks
            - months
            - quarters
            - years
            - once
            - all
          description: >-
            Billing interval unit for recurring or variable revenue (days,
            weeks, months, quarters, years). One-off revenue has no billing
            interval.
          example: months
        display_unit_amount:
          type: boolean
          description: >-
            Whether the unit amount is displayed on the invoice PDF. Defaults to
            true.
          example: true
        display_service_period:
          type: boolean
          description: >-
            Whether the service period dates are displayed in the line item
            description on the invoice PDF. Defaults to true.
          example: true
        subscription_id:
          type:
            - string
            - 'null'
          description: >-
            ID of the subscription billed by this line. For consolidated lines,
            this is the subscription of the source invoice. Null for lines
            without a subscription.
          example: sub_amiaWZ3lzDIWaoT
        original_line_item_id:
          type:
            - string
            - 'null'
          description: >-
            ID of the original line item this line item is linked to (used for
            organisation-based billing).
          example: null
      required:
        - id
        - name
        - entry_type
        - product_id
        - price_configuration_id
        - product_type
        - units_count
        - unit_amount
        - amount
        - amount_excluding_tax
        - tax_rate
        - tax_rate_id
        - tax_amount
        - discount_amount
        - discount_percent
        - period_starts_at
        - period_ends_at
        - revenue_type
        - revenue_interval_count
        - revenue_interval_period
        - display_unit_amount
        - display_service_period
        - subscription_id
        - original_line_item_id
    InvoiceCoupon:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
          description: Coupon ID.
          example: cou_DKL4Xcb5VSa8CQ
        name:
          type:
            - string
            - 'null'
          description: Coupon name.
          example: Partner discount
        subscription_coupon_id:
          type:
            - string
            - 'null'
          description: >-
            ID of the subscription coupon the discount comes from, matching
            `subscription_coupon_id` on the subscription coupons. Null when the
            coupon was added directly to the invoice.
          example: coos_d9pVekhjoGppuX
        discount_amount:
          type:
            - number
            - 'null'
          description: >-
            Amount to apply as a discount on the total amount (excluding taxes)
            of a subscription. Expressed in the currency's smallest unit.
          example: 2000
        discount_percent:
          type:
            - number
            - 'null'
          description: >-
            Percentage to apply as a discount on the amount (excluding taxes) of
            a product.
          example: null
        line_item_ids:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            IDs of the line items to which the coupon applies. Null means all
            line items.
          example:
            - ili_0FACNpeoEFkGu3
      required:
        - id
        - name
        - subscription_coupon_id
        - discount_amount
        - discount_percent
        - line_item_ids
    PaymentMethod:
      anyOf:
        - type: object
          properties:
            id:
              type: string
              description: Payment method ID.
              example: pm_1xMpj5bwRqN7LM
            status:
              type: string
              enum:
                - active
                - pending
                - expired
                - errored
              description: >-

                Payment method status.


                - `active`: The payment method is ready to be used.

                - `pending`: The payment method is pending activation or being
                validated.
                  
              example: active
            type:
              type: string
              enum:
                - card
                - apple_pay
                - google_pay
              description: |-

                Payment method type.

                - `card`: Credit or debit card
                - `apple_pay`: Apple Pay
                - `google_pay`: Google Pay
                - `direct_debit_sepa`: SEPA Direct Debit
                - `direct_debit_ach`: ACH Direct Debit
                - `direct_debit_bacs`: Bacs Direct Debit
                - `stripe_link`: Stripe Link
                - `paypal`: PayPal
                  
              example: card
            last_4_digits:
              type:
                - number
                - 'null'
              description: Last four digits of the card.
              example: 2718
            expiration_date:
              type:
                - string
                - 'null'
              description: Expiration date of the card using YYYY-MM format.
              example: 2027-11
            brand:
              type:
                - string
                - 'null'
              enum:
                - amex
                - bancontact
                - cartes_bancaires
                - diners
                - discover
                - jcb
                - link
                - maestro
                - mastercard
                - other
                - unionpay
                - unknown
                - visa
              description: Card brand.
              examples:
                - visa
                - mastercard
                - amex
          required:
            - id
            - status
            - type
            - last_4_digits
            - expiration_date
            - brand
          title: Card
        - type: object
          properties:
            id:
              type: string
              description: Payment method ID.
              example: pm_1xMpj5bwRqN7LM
            status:
              type: string
              enum:
                - errored
              description: >-

                Payment method status.


                - `errored`: The payment method has failed and can no longer be
                used.
                  
              example: errored
            error_type:
              type: string
              enum:
                - authentication_required
                - authorization_error
                - insufficient_funds
                - declined
                - expired
                - fraud
                - invalid
                - mandate_invalid
                - not_supported
                - unknown
              description: >-

                Payment method error type.


                - `authentication_required`: The card was declined as the
                transaction requires authentication (e.g. 3-D Secure). The
                customer should go to their portal page and authenticate their
                card. If the error happened on an already authenticated
                transaction, the customer needs to contact their card issuer for
                more information.

                - `authorization_error`: A transaction authorization cannot be
                created for a variety of reasons such as the card issuer
                couldn't be reached, or the card requires a PIN.

                - `declined`: The payment method was declined for a variety of
                reasons such as a card reported as lost or stolen, insufficient
                funds or reaching the limit available on the method to complete
                the purchase, a payment method on a known block list, etc.

                - `expired`: The payment method is expired. The customer should
                go to their portal page and change their payment method.

                - `fraud`: The payment provider suspected the payment method was
                fraudulent and has been blocked. Don't report more detailed
                information to your customer, and check on your provider
                account.

                - `invalid`: The payment method is invalid in most cases because
                of incorrect details (card/account number, CVC, expiration date,
                postal code).

                - `not_supported`: The payment method doesn't support this type
                of purchase (e.g. currency, online payment).

                - `unknown`: A generic error happened on the payment provider
                side.
                  
              example: expired
            type:
              type: string
              enum:
                - card
                - apple_pay
                - google_pay
              description: |-

                Payment method type.

                - `card`: Credit or debit card
                - `apple_pay`: Apple Pay
                - `google_pay`: Google Pay
                - `direct_debit_sepa`: SEPA Direct Debit
                - `direct_debit_ach`: ACH Direct Debit
                - `direct_debit_bacs`: Bacs Direct Debit
                - `stripe_link`: Stripe Link
                - `paypal`: PayPal
                  
              example: card
            last_4_digits:
              type:
                - number
                - 'null'
              description: Last four digits of the card.
              example: 2718
            expiration_date:
              type:
                - string
                - 'null'
              description: Expiration date of the card using YYYY-MM format.
              example: 2027-11
            brand:
              type:
                - string
                - 'null'
              enum:
                - amex
                - bancontact
                - cartes_bancaires
                - diners
                - discover
                - jcb
                - link
                - maestro
                - mastercard
                - other
                - unionpay
                - unknown
                - visa
              description: Card brand.
              examples:
                - visa
                - mastercard
                - amex
          required:
            - id
            - status
            - error_type
            - type
            - last_4_digits
            - expiration_date
            - brand
          title: Card (errored)
        - type: object
          properties:
            id:
              type: string
              description: Payment method ID.
              example: pm_1xMpj5bwRqN7LM
            status:
              type: string
              enum:
                - active
                - pending
                - expired
                - errored
              description: >-

                Payment method status.


                - `active`: The payment method is ready to be used.

                - `pending`: The payment method is pending activation or being
                validated.
                  
              example: active
            type:
              type: string
              enum:
                - direct_debit
                - direct_debit_ach
                - direct_debit_bacs
              description: |-

                Payment method type.

                - `card`: Credit or debit card
                - `apple_pay`: Apple Pay
                - `google_pay`: Google Pay
                - `direct_debit_sepa`: SEPA Direct Debit
                - `direct_debit_ach`: ACH Direct Debit
                - `direct_debit_bacs`: Bacs Direct Debit
                - `stripe_link`: Stripe Link
                - `paypal`: PayPal
                  
              example: direct_debit
            account_number_ending:
              type:
                - string
                - 'null'
              description: Last characters of the account number.
              example: '6789'
          required:
            - id
            - status
            - type
            - account_number_ending
          title: Direct Debit
        - type: object
          properties:
            id:
              type: string
              description: Payment method ID.
              example: pm_1xMpj5bwRqN7LM
            status:
              type: string
              enum:
                - errored
              description: >-

                Payment method status.


                - `errored`: The payment method has failed and can no longer be
                used.
                  
              example: errored
            error_type:
              type: string
              enum:
                - authentication_required
                - authorization_error
                - insufficient_funds
                - declined
                - expired
                - fraud
                - invalid
                - mandate_invalid
                - not_supported
                - unknown
              description: >-

                Payment method error type.


                - `authentication_required`: The card was declined as the
                transaction requires authentication (e.g. 3-D Secure). The
                customer should go to their portal page and authenticate their
                card. If the error happened on an already authenticated
                transaction, the customer needs to contact their card issuer for
                more information.

                - `authorization_error`: A transaction authorization cannot be
                created for a variety of reasons such as the card issuer
                couldn't be reached, or the card requires a PIN.

                - `declined`: The payment method was declined for a variety of
                reasons such as a card reported as lost or stolen, insufficient
                funds or reaching the limit available on the method to complete
                the purchase, a payment method on a known block list, etc.

                - `expired`: The payment method is expired. The customer should
                go to their portal page and change their payment method.

                - `fraud`: The payment provider suspected the payment method was
                fraudulent and has been blocked. Don't report more detailed
                information to your customer, and check on your provider
                account.

                - `invalid`: The payment method is invalid in most cases because
                of incorrect details (card/account number, CVC, expiration date,
                postal code).

                - `not_supported`: The payment method doesn't support this type
                of purchase (e.g. currency, online payment).

                - `unknown`: A generic error happened on the payment provider
                side.
                  
              example: expired
            type:
              type: string
              enum:
                - direct_debit
                - direct_debit_ach
                - direct_debit_bacs
              description: |-

                Payment method type.

                - `card`: Credit or debit card
                - `apple_pay`: Apple Pay
                - `google_pay`: Google Pay
                - `direct_debit_sepa`: SEPA Direct Debit
                - `direct_debit_ach`: ACH Direct Debit
                - `direct_debit_bacs`: Bacs Direct Debit
                - `stripe_link`: Stripe Link
                - `paypal`: PayPal
                  
              example: direct_debit
            account_number_ending:
              type:
                - string
                - 'null'
              description: Last characters of the account number.
              example: '6789'
          required:
            - id
            - status
            - error_type
            - type
            - account_number_ending
          title: Direct Debit (errored)
        - type: object
          properties:
            id:
              type: string
              description: Payment method ID.
              example: pm_1xMpj5bwRqN7LM
            status:
              type: string
              enum:
                - active
                - pending
                - expired
                - errored
              description: >-

                Payment method status.


                - `active`: The payment method is ready to be used.

                - `pending`: The payment method is pending activation or being
                validated.
                  
              example: active
            type:
              type: string
              enum:
                - stripe_link
              description: |-

                Payment method type.

                - `card`: Credit or debit card
                - `apple_pay`: Apple Pay
                - `google_pay`: Google Pay
                - `direct_debit_sepa`: SEPA Direct Debit
                - `direct_debit_ach`: ACH Direct Debit
                - `direct_debit_bacs`: Bacs Direct Debit
                - `stripe_link`: Stripe Link
                - `paypal`: PayPal
                  
              example: stripe_link
          required:
            - id
            - status
            - type
          title: Stripe Link
        - type: object
          properties:
            id:
              type: string
              description: Payment method ID.
              example: pm_1xMpj5bwRqN7LM
            status:
              type: string
              enum:
                - errored
              description: >-

                Payment method status.


                - `errored`: The payment method has failed and can no longer be
                used.
                  
              example: errored
            error_type:
              type: string
              enum:
                - authentication_required
                - authorization_error
                - insufficient_funds
                - declined
                - expired
                - fraud
                - invalid
                - mandate_invalid
                - not_supported
                - unknown
              description: >-

                Payment method error type.


                - `authentication_required`: The card was declined as the
                transaction requires authentication (e.g. 3-D Secure). The
                customer should go to their portal page and authenticate their
                card. If the error happened on an already authenticated
                transaction, the customer needs to contact their card issuer for
                more information.

                - `authorization_error`: A transaction authorization cannot be
                created for a variety of reasons such as the card issuer
                couldn't be reached, or the card requires a PIN.

                - `declined`: The payment method was declined for a variety of
                reasons such as a card reported as lost or stolen, insufficient
                funds or reaching the limit available on the method to complete
                the purchase, a payment method on a known block list, etc.

                - `expired`: The payment method is expired. The customer should
                go to their portal page and change their payment method.

                - `fraud`: The payment provider suspected the payment method was
                fraudulent and has been blocked. Don't report more detailed
                information to your customer, and check on your provider
                account.

                - `invalid`: The payment method is invalid in most cases because
                of incorrect details (card/account number, CVC, expiration date,
                postal code).

                - `not_supported`: The payment method doesn't support this type
                of purchase (e.g. currency, online payment).

                - `unknown`: A generic error happened on the payment provider
                side.
                  
              example: expired
            type:
              type: string
              enum:
                - stripe_link
              description: |-

                Payment method type.

                - `card`: Credit or debit card
                - `apple_pay`: Apple Pay
                - `google_pay`: Google Pay
                - `direct_debit_sepa`: SEPA Direct Debit
                - `direct_debit_ach`: ACH Direct Debit
                - `direct_debit_bacs`: Bacs Direct Debit
                - `stripe_link`: Stripe Link
                - `paypal`: PayPal
                  
              example: stripe_link
          required:
            - id
            - status
            - error_type
            - type
          title: Stripe Link (errored)
        - type: object
          properties:
            id:
              type: string
              description: Payment method ID.
              example: pm_1xMpj5bwRqN7LM
            status:
              type: string
              enum:
                - active
                - pending
                - expired
                - errored
              description: >-

                Payment method status.


                - `active`: The payment method is ready to be used.

                - `pending`: The payment method is pending activation or being
                validated.
                  
              example: active
            type:
              type: string
              enum:
                - paypal
              description: |-

                Payment method type.

                - `card`: Credit or debit card
                - `apple_pay`: Apple Pay
                - `google_pay`: Google Pay
                - `direct_debit_sepa`: SEPA Direct Debit
                - `direct_debit_ach`: ACH Direct Debit
                - `direct_debit_bacs`: Bacs Direct Debit
                - `stripe_link`: Stripe Link
                - `paypal`: PayPal
                  
              example: paypal
          required:
            - id
            - status
            - type
          title: PayPal
        - type: object
          properties:
            id:
              type: string
              description: Payment method ID.
              example: pm_1xMpj5bwRqN7LM
            status:
              type: string
              enum:
                - errored
              description: >-

                Payment method status.


                - `errored`: The payment method has failed and can no longer be
                used.
                  
              example: errored
            error_type:
              type: string
              enum:
                - authentication_required
                - authorization_error
                - insufficient_funds
                - declined
                - expired
                - fraud
                - invalid
                - mandate_invalid
                - not_supported
                - unknown
              description: >-

                Payment method error type.


                - `authentication_required`: The card was declined as the
                transaction requires authentication (e.g. 3-D Secure). The
                customer should go to their portal page and authenticate their
                card. If the error happened on an already authenticated
                transaction, the customer needs to contact their card issuer for
                more information.

                - `authorization_error`: A transaction authorization cannot be
                created for a variety of reasons such as the card issuer
                couldn't be reached, or the card requires a PIN.

                - `declined`: The payment method was declined for a variety of
                reasons such as a card reported as lost or stolen, insufficient
                funds or reaching the limit available on the method to complete
                the purchase, a payment method on a known block list, etc.

                - `expired`: The payment method is expired. The customer should
                go to their portal page and change their payment method.

                - `fraud`: The payment provider suspected the payment method was
                fraudulent and has been blocked. Don't report more detailed
                information to your customer, and check on your provider
                account.

                - `invalid`: The payment method is invalid in most cases because
                of incorrect details (card/account number, CVC, expiration date,
                postal code).

                - `not_supported`: The payment method doesn't support this type
                of purchase (e.g. currency, online payment).

                - `unknown`: A generic error happened on the payment provider
                side.
                  
              example: expired
            type:
              type: string
              enum:
                - paypal
              description: |-

                Payment method type.

                - `card`: Credit or debit card
                - `apple_pay`: Apple Pay
                - `google_pay`: Google Pay
                - `direct_debit_sepa`: SEPA Direct Debit
                - `direct_debit_ach`: ACH Direct Debit
                - `direct_debit_bacs`: Bacs Direct Debit
                - `stripe_link`: Stripe Link
                - `paypal`: PayPal
                  
              example: paypal
          required:
            - id
            - status
            - error_type
            - type
          title: PayPal (errored)
        - type: 'null'
      description: Payment method used for a card or direct debit transaction.
    BankAccount:
      anyOf:
        - $ref: '#/components/schemas/StandardBankAccount'
        - $ref: '#/components/schemas/ConnectedBankAccount'
        - type: 'null'
      description: Bank account used for a bank transfer transaction.
    StandardBankAccount:
      allOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - standard
              description: |
                Bank account type.

                - `standard`: Bank account not connected through open banking.
                - `connected`: Bank account connected through open banking.
              example: standard
          required:
            - type
        - type: object
          properties:
            id:
              type: string
              description: Bank account ID.
              example: bac_KJyPrMA1toAqRG
            currency:
              type: string
              enum:
                - EUR
                - AED
                - AFN
                - XCD
                - ALL
                - AMD
                - AOA
                - ARS
                - USD
                - AUD
                - AWG
                - AZN
                - BAM
                - BBD
                - BDT
                - BGN
                - BHD
                - BIF
                - XOF
                - BMD
                - BND
                - BOB
                - BRL
                - BSD
                - BTN
                - NOK
                - BWP
                - BYR
                - BZD
                - CAD
                - CDF
                - XAF
                - CHF
                - NZD
                - CLP
                - CNY
                - COP
                - CRC
                - CUP
                - CVE
                - ANG
                - CZK
                - DJF
                - DKK
                - DOP
                - DZD
                - EGP
                - MAD
                - ERN
                - ETB
                - FJD
                - FKP
                - GBP
                - GEL
                - GHS
                - GIP
                - GMD
                - GNF
                - GTQ
                - GYD
                - HKD
                - HNL
                - HRK
                - HTG
                - HUF
                - IDR
                - ILS
                - INR
                - IQD
                - IRR
                - ISK
                - JMD
                - JOD
                - JPY
                - KES
                - KGS
                - KHR
                - KMF
                - KPW
                - KRW
                - KWD
                - KYD
                - KZT
                - LAK
                - LBP
                - LKR
                - LRD
                - LSL
                - LYD
                - MDL
                - MGA
                - MKD
                - MMK
                - MNT
                - MOP
                - MRO
                - MUR
                - MVR
                - MWK
                - MXN
                - MYR
                - MZN
                - NAD
                - XPF
                - NGN
                - NIO
                - NPR
                - OMR
                - PAB
                - PEN
                - PGK
                - PHP
                - PKR
                - PLN
                - PYG
                - QAR
                - RON
                - RSD
                - RUB
                - RWF
                - SAR
                - SBD
                - SCR
                - SDG
                - SEK
                - SGD
                - SHP
                - SLL
                - SOS
                - SRD
                - SSP
                - STD
                - SYP
                - SZL
                - THB
                - TJS
                - TMT
                - TND
                - TOP
                - TRY
                - TTD
                - TWD
                - TZS
                - UAH
                - UGX
                - UYU
                - UZS
                - VEF
                - VND
                - VUV
                - WST
                - YER
                - ZAR
                - ZMW
                - ZWL
              description: Bank account currency.
              example: EUR
            bank_name:
              type:
                - string
                - 'null'
              description: Bank name.
              example: Fake bank
            name:
              type:
                - string
                - 'null'
              description: Bank account display name.
              example: Main account
            country:
              type:
                - string
                - 'null'
              description: Bank account country.
              example: FR
          required:
            - id
            - currency
            - bank_name
            - name
            - country
        - anyOf:
            - type: object
              properties:
                format:
                  type: string
                  enum:
                    - iban_bic_swift
                  description: Bank account details format.
                  example: iban_bic_swift
                iban:
                  type: string
                  description: IBAN.
                  example: FR7630006000011234567890189
                bic_swift:
                  type:
                    - string
                    - 'null'
                  description: BIC or SWIFT code.
                  example: BNPAFRPP
              required:
                - format
                - iban
                - bic_swift
              title: IBAN / BIC / SWIFT
            - type: object
              properties:
                format:
                  type: string
                  enum:
                    - sort_code_account_number
                  description: Bank account details format.
                  example: sort_code_account_number
                sort_code:
                  type: string
                  description: Sort code.
                  example: '123456'
                account_number:
                  type: string
                  description: Account number.
                  example: '000123456789'
              required:
                - format
                - sort_code
                - account_number
              title: Sort code / Account number
            - type: object
              properties:
                format:
                  type: string
                  enum:
                    - account_number_routing_number
                  description: Bank account details format.
                  example: account_number_routing_number
                account_number:
                  type: string
                  description: Account number.
                  example: '000123456789'
                routing_number:
                  type: string
                  description: Routing number.
                  example: '021000021'
              required:
                - format
                - account_number
                - routing_number
              title: Account number / Routing number
            - type: object
              properties:
                format:
                  type: string
                  enum:
                    - account_number_bic_swift
                  description: Bank account details format.
                  example: account_number_bic_swift
                account_number:
                  type: string
                  description: Account number.
                  example: '000123456789'
                bic_swift:
                  type: string
                  description: BIC or SWIFT code.
                  example: BNPAFRPP
              required:
                - format
                - account_number
                - bic_swift
              title: Account number / BIC / SWIFT
          example:
            format: iban_bic_swift
            iban: FR7630006000011234567890189
            bic_swift: BNPAFRPP
      title: Standard bank account
    ConnectedBankAccount:
      allOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - connected
              description: |
                Bank account type.

                - `standard`: Bank account not connected through open banking.
                - `connected`: Bank account connected through open banking.
              example: connected
            status:
              type: string
              enum:
                - active
                - error
              description: Bank account connection status.
              example: active
            balance:
              type:
                - number
                - 'null'
              description: >-
                Latest known balance for connected bank accounts, expressed in
                the currency's smallest unit.
              example: 120500
            last_refreshed_at:
              type:
                - string
                - 'null'
              format: date-time
              description: Date when the connected bank account was last refreshed.
              example: '2026-01-15T10:30:00.000Z'
            last_error_type:
              type:
                - string
                - 'null'
              enum:
                - provider_error
                - invalid_credentials
                - unknown
              description: Latest connection error type, when the account is errored.
              example: null
          required:
            - type
            - status
            - balance
            - last_refreshed_at
            - last_error_type
        - type: object
          properties:
            id:
              type: string
              description: Bank account ID.
              example: bac_KJyPrMA1toAqRG
            currency:
              type: string
              enum:
                - EUR
                - AED
                - AFN
                - XCD
                - ALL
                - AMD
                - AOA
                - ARS
                - USD
                - AUD
                - AWG
                - AZN
                - BAM
                - BBD
                - BDT
                - BGN
                - BHD
                - BIF
                - XOF
                - BMD
                - BND
                - BOB
                - BRL
                - BSD
                - BTN
                - NOK
                - BWP
                - BYR
                - BZD
                - CAD
                - CDF
                - XAF
                - CHF
                - NZD
                - CLP
                - CNY
                - COP
                - CRC
                - CUP
                - CVE
                - ANG
                - CZK
                - DJF
                - DKK
                - DOP
                - DZD
                - EGP
                - MAD
                - ERN
                - ETB
                - FJD
                - FKP
                - GBP
                - GEL
                - GHS
                - GIP
                - GMD
                - GNF
                - GTQ
                - GYD
                - HKD
                - HNL
                - HRK
                - HTG
                - HUF
                - IDR
                - ILS
                - INR
                - IQD
                - IRR
                - ISK
                - JMD
                - JOD
                - JPY
                - KES
                - KGS
                - KHR
                - KMF
                - KPW
                - KRW
                - KWD
                - KYD
                - KZT
                - LAK
                - LBP
                - LKR
                - LRD
                - LSL
                - LYD
                - MDL
                - MGA
                - MKD
                - MMK
                - MNT
                - MOP
                - MRO
                - MUR
                - MVR
                - MWK
                - MXN
                - MYR
                - MZN
                - NAD
                - XPF
                - NGN
                - NIO
                - NPR
                - OMR
                - PAB
                - PEN
                - PGK
                - PHP
                - PKR
                - PLN
                - PYG
                - QAR
                - RON
                - RSD
                - RUB
                - RWF
                - SAR
                - SBD
                - SCR
                - SDG
                - SEK
                - SGD
                - SHP
                - SLL
                - SOS
                - SRD
                - SSP
                - STD
                - SYP
                - SZL
                - THB
                - TJS
                - TMT
                - TND
                - TOP
                - TRY
                - TTD
                - TWD
                - TZS
                - UAH
                - UGX
                - UYU
                - UZS
                - VEF
                - VND
                - VUV
                - WST
                - YER
                - ZAR
                - ZMW
                - ZWL
              description: Bank account currency.
              example: EUR
            bank_name:
              type:
                - string
                - 'null'
              description: Bank name.
              example: Fake bank
            name:
              type:
                - string
                - 'null'
              description: Bank account display name.
              example: Main account
            country:
              type:
                - string
                - 'null'
              description: Bank account country.
              example: FR
          required:
            - id
            - currency
            - bank_name
            - name
            - country
        - anyOf:
            - type: object
              properties:
                format:
                  type: string
                  enum:
                    - iban_bic_swift
                  description: Bank account details format.
                  example: iban_bic_swift
                iban:
                  type: string
                  description: IBAN.
                  example: FR7630006000011234567890189
                bic_swift:
                  type:
                    - string
                    - 'null'
                  description: BIC or SWIFT code.
                  example: BNPAFRPP
              required:
                - format
                - iban
                - bic_swift
              title: IBAN / BIC / SWIFT
            - type: object
              properties:
                format:
                  type: string
                  enum:
                    - sort_code_account_number
                  description: Bank account details format.
                  example: sort_code_account_number
                sort_code:
                  type: string
                  description: Sort code.
                  example: '123456'
                account_number:
                  type: string
                  description: Account number.
                  example: '000123456789'
              required:
                - format
                - sort_code
                - account_number
              title: Sort code / Account number
            - type: object
              properties:
                format:
                  type: string
                  enum:
                    - account_number_routing_number
                  description: Bank account details format.
                  example: account_number_routing_number
                account_number:
                  type: string
                  description: Account number.
                  example: '000123456789'
                routing_number:
                  type: string
                  description: Routing number.
                  example: '021000021'
              required:
                - format
                - account_number
                - routing_number
              title: Account number / Routing number
            - type: object
              properties:
                format:
                  type: string
                  enum:
                    - account_number_bic_swift
                  description: Bank account details format.
                  example: account_number_bic_swift
                account_number:
                  type: string
                  description: Account number.
                  example: '000123456789'
                bic_swift:
                  type: string
                  description: BIC or SWIFT code.
                  example: BNPAFRPP
              required:
                - format
                - account_number
                - bic_swift
              title: Account number / BIC / SWIFT
          example:
            format: iban_bic_swift
            iban: FR7630006000011234567890189
            bic_swift: BNPAFRPP
      title: Connected bank account
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.