> ## 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.

# Get transaction

> Retrieve the details of an existing transaction.



## OpenAPI

````yaml get /v1/transactions/{id}
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/transactions/{id}:
    get:
      tags:
        - Transactions
      summary: Get transaction
      description: Retrieve the details of an existing transaction.
      operationId: getTransaction
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                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'
                      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: >-
                          Original payment transaction ID for a refund or
                          chargeback.
                        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
                                - salesforce
                                - hubspot
                                - attio
                                - xero
                                - pennylane
                                - zoho-books
                                - exact-online
                                - quickbooks
                                - netsuite
                                - datev
                                - anrok
                                - chargebee
                                - slack
                                - plain
                                - zendesk
                                - pylon
                                - intercom
                                - front
                                - helpscout
                                - claap
                                - grain
                                - gong
                                - posthog
                              description: Provider name.
                            provider_account_id:
                              type: string
                              description: ID of the connected provider account.
                          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
                      - refunded_at
                      - original_transaction_id
                      - reversed_at
                      - last_refreshed_at
                      - provider_fee
                      - chargeback
                      - integrations
                  - oneOf:
                      - type: object
                        properties:
                          payment_method_type:
                            type: string
                            enum:
                              - card
                              - direct_debit
                              - direct_debit_ach
                              - direct_debit_bacs
                          payment_method:
                            $ref: '#/components/schemas/PaymentMethod'
                        required:
                          - payment_method_type
                          - payment_method
                      - type: object
                        properties:
                          payment_method_type:
                            type: string
                            enum:
                              - transfer
                              - transfer_automated
                          bank_account:
                            allOf:
                              - $ref: '#/components/schemas/BankAccount'
                              - anyOf:
                                  - $ref: '#/components/schemas/StandardBankAccount'
                                  - $ref: '#/components/schemas/ConnectedBankAccount'
                                  - type: 'null'
                        required:
                          - payment_method_type
                          - bank_account
                      - type: object
                        properties:
                          payment_method_type:
                            type: string
                            enum:
                              - wallet
                          wallet_id:
                            type: string
                            example: wal_PPpxP5d3uvgiTT
                        required:
                          - payment_method_type
                          - wallet_id
                      - type: object
                        properties:
                          payment_method_type:
                            type: string
                            enum:
                              - external
                        required:
                          - payment_method_type
                  - anyOf:
                      - 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
                      - 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
                  - type: object
                    properties:
                      allocations:
                        type: array
                        items:
                          type: object
                          properties:
                            invoice_id:
                              type: string
                              description: >-
                                ID of the invoice receiving the allocated
                                amount.
                              example: inv_2QdJDDUej969ev
                            amount:
                              type: number
                              description: >-
                                Transaction amount allocated to the invoice, in
                                the currency's smallest unit.
                              example: 31500
                          required:
                            - invoice_id
                            - amount
                        description: >-
                          Invoice allocations currently associated with the
                          transaction.
                    required:
                      - allocations
        '404':
          description: Transaction not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - bearer: []
components:
  schemas:
    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
                  
              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'
              description: Brand of the card.
              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
                  
              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'
              description: Brand of the card.
              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
                  
              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
                  
              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
                  
              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
                  
              example: stripe_link
          required:
            - id
            - status
            - error_type
            - type
          title: Stripe Link (errored)
        - type: 'null'
    BankAccount:
      anyOf:
        - $ref: '#/components/schemas/StandardBankAccount'
        - $ref: '#/components/schemas/ConnectedBankAccount'
    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
            - 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
            - 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
            - 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
          example:
            format: iban_bic_swift
            iban: FR7630006000011234567890189
            bic_swift: BNPAFRPP
    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
            - 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
            - 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
            - 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
          example:
            format: iban_bic_swift
            iban: FR7630006000011234567890189
            bic_swift: BNPAFRPP
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````