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

# List invoices

> Retrieve a paginated list of invoices for the authenticated organization



## OpenAPI

````yaml post /invoices/list
openapi: 3.1.0
info:
  title: BitGPT 402pay API
  description: Full description of private and dev-availble API endpoints
  version: 1.0.0
  termsOfService: https://bitgpt.xyz/terms
  contact:
    name: API Support
    url: https://help.bitgpt.xyz
    email: support@bitgpt.xyz
servers:
  - url: https://api.bitgpt.xyz
    description: Production API server
security: []
tags:
  - name: Payments
    description: Invoice and payment management endpoints
  - name: Products
    description: Product management endpoints
  - name: dev-api
    description: Developer API endpoints
externalDocs:
  description: Full BitGPT 402pay API documentation
  url: https://docs.bitgpt.xyz
paths:
  /invoices/list:
    post:
      tags:
        - Payments
        - dev-api
      summary: List invoices
      description: Retrieve a paginated list of invoices for the authenticated organization
      operationId: listInvoices
      requestBody:
        $ref: '#/components/requestBodies/listInvoicesRequest'
      responses:
        '200':
          $ref: '#/components/responses/listInvoicesResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
      security:
        - BearerAuth: []
          ApiKeyAuth: []
components:
  requestBodies:
    listInvoicesRequest:
      required: false
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/listInvoicesRequest'
  responses:
    '400':
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                enum:
                  - 400
                  - 401
                  - 403
                  - 404
                description: Status code of the response
              data:
                type:
                  - object
                  - 'null'
                description: Response data containing the requested object
              error:
                type:
                  - string
                  - 'null'
                examples:
                  - Invalid email address
                description: Error message of the response, human readable
              message:
                type: 'null'
              env:
                type: string
                enum:
                  - development
                  - production
                description: API environment
              log:
                type:
                  - string
                  - object
                  - 'null'
                examples:
                  - request_id: req_1234567890
                  - Some pertinent log message
                description: Useful informaiton, not always present, to debug the response
              validator:
                type:
                  - object
                  - 'null'
                examples:
                  - email: Invalid email address
                    password: Password is required
                description: >-
                  Validator response object, each key is the field name and
                  value is the error message
              support_id:
                type:
                  - string
                  - 'null'
                format: uuid
                examples:
                  - support_uuidv7-something-else
                description: >-
                  Support ID linked to the response, used to identify it when
                  talking with our team
            required:
              - status
              - error
              - message
              - env
              - log
              - validator
              - support_id
    '401':
      description: Access token is missing or invalid
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 400
                      - 401
                      - 403
                      - 404
                    description: Status code of the response
                  data:
                    type:
                      - object
                      - 'null'
                    description: Response data containing the requested object
                  error:
                    type:
                      - string
                      - 'null'
                    examples:
                      - Invalid email address
                    description: Error message of the response, human readable
                  message:
                    type: 'null'
                  env:
                    type: string
                    enum:
                      - development
                      - production
                    description: API environment
                  log:
                    type:
                      - string
                      - object
                      - 'null'
                    examples:
                      - request_id: req_1234567890
                      - Some pertinent log message
                    description: >-
                      Useful informaiton, not always present, to debug the
                      response
                  validator:
                    type:
                      - object
                      - 'null'
                    examples:
                      - email: Invalid email address
                        password: Password is required
                    description: >-
                      Validator response object, each key is the field name and
                      value is the error message
                  support_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    examples:
                      - support_uuidv7-something-else
                    description: >-
                      Support ID linked to the response, used to identify it
                      when talking with our team
                required:
                  - status
                  - error
                  - message
                  - env
                  - log
                  - validator
                  - support_id
              - properties:
                  status:
                    type: integer
                    enum:
                      - 401
    '403':
      description: You do not have the required permissions to access this resource
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 400
                      - 401
                      - 403
                      - 404
                    description: Status code of the response
                  data:
                    type:
                      - object
                      - 'null'
                    description: Response data containing the requested object
                  error:
                    type:
                      - string
                      - 'null'
                    examples:
                      - Invalid email address
                    description: Error message of the response, human readable
                  message:
                    type: 'null'
                  env:
                    type: string
                    enum:
                      - development
                      - production
                    description: API environment
                  log:
                    type:
                      - string
                      - object
                      - 'null'
                    examples:
                      - request_id: req_1234567890
                      - Some pertinent log message
                    description: >-
                      Useful informaiton, not always present, to debug the
                      response
                  validator:
                    type:
                      - object
                      - 'null'
                    examples:
                      - email: Invalid email address
                        password: Password is required
                    description: >-
                      Validator response object, each key is the field name and
                      value is the error message
                  support_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    examples:
                      - support_uuidv7-something-else
                    description: >-
                      Support ID linked to the response, used to identify it
                      when talking with our team
                required:
                  - status
                  - error
                  - message
                  - env
                  - log
                  - validator
                  - support_id
              - properties:
                  status:
                    type: integer
                    enum:
                      - 403
    listInvoicesResponse:
      description: Invoice list
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Response200'
              - $ref: '#/components/schemas/listInvoicesResponse'
  schemas:
    listInvoicesRequest:
      type: object
      description: Request body for filtering invoices
      properties:
        status:
          type: array
          description: Filter by invoice status
          items:
            type: string
            enum:
              - PENDING
              - COMPLETED
              - VOIDED
              - PROCESSING
              - WAITING_FOR_CONFIRMATIONS
              - PARTIALLY_PAID
        currency:
          type: array
          description: Filter by currency code
          items:
            type: string
        price_usd_from:
          type:
            - number
            - string
          description: Filter invoices with usd amount greater than or equal to this value
        price_usd_to:
          type:
            - number
            - string
          description: Filter invoices with usd amount less than or equal to this value
        created_at_from:
          type: string
          format: mysql-date-time
          description: Filter invoices created from this date
        created_at_to:
          type: string
          format: mysql-date-time
          description: Filter invoices created until this date
        customer_email:
          type: string
          description: Filter by customer email address
        provider_id:
          type: string
          description: Filter by payment provider
        limit:
          type: integer
          description: Maximum number of invoices to return
        offset:
          type: integer
          description: Number of invoices to skip for pagination
    Response200:
      type: object
      properties:
        status:
          type: integer
          enum:
            - 200
            - 201
            - 202
          description: Status code of the response
        data:
          type:
            - object
            - array
            - 'null'
          description: Response data containing the requested object
        error:
          type:
            - string
            - 'null'
          examples:
            - Invalid email address
          description: Error message of the response, human readable
        message:
          type:
            - string
            - 'null'
          examples:
            - Resource created successfully
          description: Message of the response, human readable
        env:
          type: string
          enum:
            - development
            - production
          description: API environment
        log:
          type:
            - string
            - object
            - 'null'
          examples:
            - request_id: req_1234567890
            - Some pertinent log message
          description: Useful informaiton, not always present, to debug the response
        validator:
          type:
            - object
            - 'null'
          examples:
            - email: Invalid email address
              password: Password is required
          description: >-
            Validator response object, each key is the field name and value is
            the error message
        support_id:
          type:
            - string
            - 'null'
          format: uuid
          examples:
            - support_uuidv7-something-else
          description: >-
            Support ID linked to the response, used to identify it when talking
            with our team
      required:
        - status
        - data
        - message
        - env
      examples:
        - status: 200
          data:
            id: '123'
          error: null
          log: null
          validator: null
          support_id: null
          message: Resource created successfully
          env: development
    listInvoicesResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            count:
              type: integer
              description: Total number of invoices.
            items:
              type: array
              items:
                $ref: '#/components/schemas/invoice'
      required:
        - data
    invoice:
      type: object
      description: >-
        Invoice object containing billing information, invoice items,
        calculations, and organization details for payment processing
      properties:
        id:
          type: string
          description: Unique identifier for the invoice
          examples:
            - invoice_0197d634-7d8e-7615-8007-e37b992cdb30
        organization_id:
          type: string
          description: Unique identifier for the organization
          examples:
            - org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
        customer_email:
          type: string
          format: email
          description: Customer email address for the invoice
          examples:
            - customer@example.com
        status:
          type: string
          description: Current status of the invoice
          enum:
            - PENDING
            - COMPLETED
            - VOIDED
            - PROCESSING
            - WAITING_FOR_CONFIRMATIONS
            - PARTIALLY_PAID
          examples:
            - PENDING
        substatus:
          type:
            - string
            - 'null'
          description: Provides additional context to the invoice's current status
          enum:
            - OVERPAID
          examples:
            - OVERPAID
        currency:
          $ref: '#/components/schemas/currency'
          description: Currency code for the invoice
          examples:
            - EUR
        price:
          type: string
          description: Total price of the invoice as a decimal string
          examples:
            - '504.818257074815000000000000000000'
        price_usd:
          type: string
          description: Total price of the invoice in USD as a decimal string
          examples:
            - '504.818257074815000000000000000000'
        metadata:
          type:
            - object
            - 'null'
          description: Additional metadata for the invoice
        redirect_url:
          type:
            - string
            - 'null'
          format: uri
          description: URL to redirect to after payment completion
          examples:
            - https://example.com/success
        created_at:
          type: string
          format: mysql-date-time
          description: Timestamp when the invoice was created
          examples:
            - '2025-07-04 18:10:53'
        updated_at:
          type:
            - string
            - 'null'
          format: mysql-date-time
          description: Timestamp when the invoice was last updated
          examples:
            - '2025-07-04 18:10:53'
        items:
          type: array
          description: Array of invoice items
          items:
            type: object
            properties:
              id:
                type: string
                description: Unique identifier for the invoice item
              organization_id:
                type: string
                description: Organization identifier
              invoice_id:
                type: string
                description: Invoice identifier
              type:
                type: string
                enum:
                  - PAYMENT_INTENT
                  - PRODUCT
                description: Type of the invoice item
              currency:
                $ref: '#/components/schemas/currency'
                description: Currency code for the item
              product_id:
                type:
                  - string
                  - 'null'
                description: Product identifier if applicable
              billing_schema_id:
                type:
                  - string
                  - 'null'
                description: Billing schema identifier if applicable
              payment_intent_id:
                type:
                  - string
                  - 'null'
                description: Payment intent identifier if applicable
              quantity:
                type: integer
                description: Quantity of the item
              status:
                type: string
                enum:
                  - INCLUDED
                  - EXCLUDED
                description: Status of the invoice item
              exclude_reason:
                type:
                  - string
                  - 'null'
                description: Reason for exclusion if applicable
              created_at:
                type: string
                format: mysql-date-time
                description: Creation timestamp
              updated_at:
                type:
                  - string
                  - 'null'
                format: mysql-date-time
                description: Last update timestamp
              product:
                $ref: '#/components/schemas/product'
              billing_schema:
                $ref: '#/components/schemas/billingSchema'
              payment_intent:
                $ref: '#/components/schemas/paymentIntent'
        calculations:
          type: array
          description: Array of invoice calculations
          items:
            type: object
            properties:
              id:
                type: string
                description: Unique identifier for the calculation
              organization_id:
                type: string
                description: Organization identifier
              invoice_id:
                type: string
                description: Invoice identifier
              invoice_item_id:
                type:
                  - string
                  - 'null'
                description: Invoice item identifier if applicable
              title:
                type: string
                description: Title of the calculation
              calculation_type:
                type: string
                enum:
                  - CURRENCY_CHANGE
                  - PAYMENT_INTENT
                  - PRODUCT
                  - TOTAL
                  - TOTAL_USD
                  - TOTAL_ORIGINAL
                description: Type of calculation
              idx:
                type: integer
                description: Index of the calculation
              currency:
                $ref: '#/components/schemas/currency'
                description: Currency code for the calculation
              initial_price:
                type: string
                description: Initial price as decimal string
              price_delta:
                type: string
                description: Price delta as decimal string
              price:
                type: string
                description: Final price as decimal string
              details:
                type:
                  - object
                  - array
                description: Additional calculation details
              created_at:
                type: string
                format: mysql-date-time
                description: Creation timestamp
              updated_at:
                type:
                  - string
                  - 'null'
                format: mysql-date-time
                description: Last update timestamp
        calculation_summary:
          type: object
          description: Summary of invoice calculations
          properties:
            invoice_id:
              type: string
              description: Invoice identifier
            currency:
              $ref: '#/components/schemas/currency'
              description: Currency code
            currency_original:
              description: Original currency code
              oneOf:
                - $ref: '#/components/schemas/currency'
                - type: 'null'
            total_price:
              type: string
              description: Total price as decimal string
            total_price_usd:
              type: string
              description: Total price in USD as decimal string
            total_price_original:
              type:
                - string
                - 'null'
              description: Total price in original currency as decimal string
            cache:
              type: object
              description: Cache information
              properties:
                used:
                  type: boolean
                  description: Whether cache was used
                expires_at:
                  type: integer
                  description: Cache expiration timestamp
                expires_in:
                  type: integer
                  description: Cache expiration time in seconds
            convert_currency:
              $ref: '#/components/schemas/currency'
              description: Currency to convert to
            total_price_converted:
              type: string
              description: Total price converted to specified currency
        organization:
          type: object
          description: Organization information
          properties:
            name:
              type: string
              description: Organization name
            image_url:
              type:
                - string
                - 'null'
              description: Organization image URL
            stripe_config:
              type:
                - object
                - 'null'
              description: Stripe configuration details
              properties:
                stripe_user_id:
                  type: string
                  description: Stripe user identifier
        payments:
          type: array
          description: Array of payments
          items:
            type: object
            properties:
              id:
                type: string
                description: Unique identifier for the payment
              idempotency_key:
                type: string
                description: Idempotency key for the payment
              organization_id:
                type: string
                description: Organization identifier
              provider_id:
                type: string
                description: Provider identifier
              invoice_id:
                type: string
                description: Invoice identifier
              currency:
                type: string
                description: Currency code for the payment
              price:
                type: string
                description: Price of the payment
              status:
                type: string
                description: Status of the payment
              created_at:
                type: string
                format: mysql-date-time
                description: Creation timestamp
              updated_at:
                type:
                  - string
                  - 'null'
                format: mysql-date-time
                description: Last update timestamp
              happened_at:
                type:
                  - string
                  - 'null'
                format: mysql-date-time
                description: Happened at timestamp
      required:
        - id
        - organization_id
        - status
        - currency
        - price
        - created_at
        - updated_at
      examples:
        - id: invoice_019851f5-39f7-714a-8f2c-3c3eede808b4
          organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
          status: PENDING
          substatus: null
          currency: EUR
          price: '56.550000000000000000000000000000'
          price_usd: '66.750000000000000000000000000000'
          created_at: '2025-07-28 18:54:42'
          updated_at: '2025-07-28 18:55:34'
          redirect_url: null
          customer_email: test@test.tt
          metadata:
            one: '1'
            two: '2'
            three: '3'
            four: '4'
          items:
            - id: invoice_item_019851f5-39f8-753b-9cf5-985300807b51
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_019851f5-39f7-714a-8f2c-3c3eede808b4
              type: PRODUCT
              currency: GBP
              product_id: product_01982266-ee05-7249-a0bf-787b4b6e0946
              billing_schema_id: schema_01982266-ee06-70fe-9cac-bc4b6d964815
              payment_intent_id: null
              quantity: 4
              status: INCLUDED
              exclude_reason: null
              created_at: '2025-07-28 18:54:42'
              updated_at: null
              product:
                id: product_01982266-ee05-7249-a0bf-787b4b6e0946
                version_group_id: product_01981e60-62f5-7f75-8576-aa262be8ea54
                is_active: 1
                name: 'Product #1'
                organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
                description: '111'
                image_id: null
                created_at: '2025-07-19 13:17:07'
                updated_at: null
                image: null
              billing_schema:
                id: schema_01982266-ee06-70fe-9cac-bc4b6d964815
                is_active: 1
                version_group_id: schema_01982266-ee06-70fe-9cac-bc4b6d964815
                name: Basic Product
                description: 'Billing Schema #1'
                organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
                product_id: product_01982266-ee05-7249-a0bf-787b4b6e0946
                type: ONE_TIME
                currency: GBP
                base_price: '10.000000000000000000000000000000'
                interval_type: null
                interval_count: null
                payment_type: null
                renew_type: null
                billing_type: null
                created_at: '2025-07-19 13:17:07'
                updated_at: null
            - id: invoice_item_019851f5-39f9-7eeb-aa8c-2ddfca8c65a3
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_019851f5-39f7-714a-8f2c-3c3eede808b4
              type: PRODUCT
              currency: EUR
              product_id: product_0198222f-fe06-743f-8651-42128a1e218a
              billing_schema_id: schema_0198222f-fe07-76a8-87d0-880d5289f759
              payment_intent_id: null
              quantity: 1
              status: INCLUDED
              exclude_reason: null
              created_at: '2025-07-28 18:54:42'
              updated_at: null
              product:
                id: product_0198222f-fe06-743f-8651-42128a1e218a
                version_group_id: product_0198222f-fe06-743f-8651-42128a1e218a
                is_active: 1
                name: 'Product #2'
                organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
                description: ONE_TIME PRODUCT
                image_id: null
                created_at: '2025-07-19 12:17:07'
                updated_at: null
                image: null
              billing_schema:
                id: schema_0198222f-fe07-76a8-87d0-880d5289f759
                is_active: 1
                version_group_id: schema_0198222f-fe07-76a8-87d0-880d5289f759
                name: 'Product #2'
                description: 'Billing Schema #1'
                organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
                product_id: product_0198222f-fe06-743f-8651-42128a1e218a
                type: ONE_TIME
                currency: EUR
                base_price: '10.000000000000000000000000000000'
                interval_type: null
                interval_count: null
                payment_type: null
                renew_type: null
                billing_type: null
                created_at: '2025-07-19 12:17:07'
                updated_at: null
          calculations:
            - id: invoice_calc_019851f6-03c9-7768-9a6f-3e7a86b7eeed
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_019851f5-39f7-714a-8f2c-3c3eede808b4
              invoice_item_id: invoice_item_019851f5-39f8-753b-9cf5-985300807b51
              title: 'Product #1'
              calculation_type: PRODUCT
              idx: 0
              currency: GBP
              initial_price: '40.000000000000000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '40.000000000000000000000000000000'
              details:
                price: '10.000000000000000000000000000000'
                currency: GBP
                quantity: 4
                product_id: product_01982266-ee05-7249-a0bf-787b4b6e0946
              created_at: '2025-07-28 18:55:34'
              updated_at: null
            - id: invoice_calc_019851f6-03cc-7fe9-8c19-a4cb550bb75c
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_019851f5-39f7-714a-8f2c-3c3eede808b4
              invoice_item_id: invoice_item_019851f5-39f8-753b-9cf5-985300807b51
              title: Currency change GBP => EUR
              calculation_type: CURRENCY_CHANGE
              idx: 1
              currency: EUR
              initial_price: '40.000000000000000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '46.557223908892338549036308436250'
              details:
                to: EUR
                from: GBP
                to_rate_usd: '0.847260000000000000'
                from_rate_usd: '0.727930000000000000'
              created_at: '2025-07-28 18:55:34'
              updated_at: null
            - id: invoice_calc_019851f6-03ce-7afb-a2e6-897bb4a22728
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_019851f5-39f7-714a-8f2c-3c3eede808b4
              invoice_item_id: invoice_item_019851f5-39f9-7eeb-aa8c-2ddfca8c65a3
              title: 'Product #2'
              calculation_type: PRODUCT
              idx: 0
              currency: EUR
              initial_price: '10.000000000000000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '10.000000000000000000000000000000'
              details:
                price: '10.000000000000000000000000000000'
                currency: EUR
                quantity: 1
                product_id: product_0198222f-fe06-743f-8651-42128a1e218a
              created_at: '2025-07-28 18:55:34'
              updated_at: null
            - id: invoice_calc_019851f6-03d0-755e-ac57-96ca8b9dd424
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_019851f5-39f7-714a-8f2c-3c3eede808b4
              invoice_item_id: null
              title: Total
              calculation_type: TOTAL
              idx: 0
              currency: EUR
              initial_price: '56.557223908892338549036308436250'
              price_delta: '0.000000000000000000000000000000'
              price: '56.557223908892338549036308436250'
              details: []
              created_at: '2025-07-28 18:55:34'
              updated_at: null
            - id: invoice_calc_019851f6-03d2-7cd5-872e-d0fdc5f19f97
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_019851f5-39f7-714a-8f2c-3c3eede808b4
              invoice_item_id: null
              title: Total, USD
              calculation_type: TOTAL_USD
              idx: 0
              currency: USD
              initial_price: '66.753091033321930161976616901836'
              price_delta: '0.000000000000000000000000000000'
              price: '66.753091033321930161976616901836'
              details: []
              created_at: '2025-07-28 18:55:34'
              updated_at: null
          organization:
            name: '4'
            image_url: >-
              https://assets.bitgpt.xyz/uploads/2025/03/26/156091ee0884f36de9836d.jpeg
          payments:
            - id: payment_01979449-dc2f-71e4-b565-42d78c0d83aa
              idempotency_key: >-
                1b70f35483e563e009967abe74308e6977f9b36f1bfc05168fa22104b64293d6-invoice_01979284-7610-79f8-86c4-978168730054
              organization_id: org_f44b7809595e5ebe3bb4d6
              provider_id: prov_bitcoin_bitcoin
              invoice_id: invoice_019851f5-39f7-714a-8f2c-3c3eede808b4
              currency: BITCOIN
              price: '0.000126300000000000000000000000'
              status: COMPLETED
              created_at: '2025-06-21 22:59:17'
              updated_at: '2025-08-20 23:57:58'
              happened_at: '2025-06-21 22:59:17'
        - id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
          organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
          customer_email: user@example.com
          status: PENDING
          substatus: null
          currency: EUR
          price: '504.818257074815000000000000000000'
          price_usd: '550.123456789012345678901234567890'
          metadata:
            value1: 1
            value2: test
          redirect_url: null
          created_at: '2025-07-04 18:10:53'
          updated_at: '2025-07-04 18:10:53'
        - id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
          organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
          customer_email: user@example.com
          status: PENDING
          substatus: null
          currency: EUR
          price: '504.818257074815000000000000000000'
          price_usd: '550.123456789012345678901234567890'
          metadata: null
          redirect_url: ''
          created_at: '2025-07-04 18:10:53'
          updated_at: '2025-07-04 18:10:53'
          items:
            - id: invoice_item_0197d634-7d91-712c-a766-510e8d889c69
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              type: PAYMENT_INTENT
              currency: AUD
              product_id: null
              billing_schema_id: null
              payment_intent_id: pi_0197d634-7d90-7124-acc6-fc69c1a3598b
              quantity: 1
              status: INCLUDED
              exclude_reason: null
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_item_0197d634-7d93-7f7a-9131-5f18e7770773
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              type: PAYMENT_INTENT
              currency: BITCOIN
              product_id: null
              billing_schema_id: null
              payment_intent_id: pi_0197d634-7d92-7d0c-b2e8-9021ad9f599d
              quantity: 1
              status: INCLUDED
              exclude_reason: null
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_item_0197d634-7d94-7bcf-a7ef-0979f02b1caf
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              type: PAYMENT_INTENT
              currency: GBP
              product_id: null
              billing_schema_id: null
              payment_intent_id: pi_0197d634-7d93-7433-b205-b7ec90311980
              quantity: 1
              status: INCLUDED
              exclude_reason: null
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_item_0197d634-7d95-720e-8117-7854f2ea3414
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              type: PRODUCT
              currency: GBP
              product_id: product_0197a8d9-8426-7e71-9edf-26301686ed26
              billing_schema_id: schema_0197a8d9-8427-7dc4-9b9f-4e29594b5d12
              payment_intent_id: null
              quantity: 2
              status: INCLUDED
              exclude_reason: null
              created_at: '2025-07-04 18:10:53'
              updated_at: null
              product:
                id: product_0197a8d9-8426-7e71-9edf-26301686ed26
                version_group_id: product_01971675-cbb6-7c81-8281-98c2c8607f09
                is_active: 1
                name: '444'
                organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
                description: '111'
                image_id: file_0196b6e6-54e3-796d-9c6a-2862a5fef597
                created_at: '2025-06-25 22:48:36'
                updated_at: '2025-07-09 17:39:38'
                image:
                  id: file_0196b6e6-54e3-796d-9c6a-2862a5fef597
                  url: >-
                    https://assets.bitgpt.xyz//app/public/src/storage/uploads/image/2025/05/09/0196b6e6-54e3-7290-9d73-0074c623e368.jpg
          calculations:
            - id: invoice_calc_0197d634-7db1-7350-8e0d-4bafd500fecd
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              invoice_item_id: invoice_item_0197d634-7d91-712c-a766-510e8d889c69
              title: Currency change AUD => EUR
              calculation_type: CURRENCY_CHANGE
              idx: 1
              currency: EUR
              initial_price: '501.000000000000000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '286.233549368620000000000000000000'
              details:
                to: EUR
                from: AUD
                to_rate_usd: '0.879502000000000005'
                from_rate_usd: '1.539409000000000027'
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_calc_0197d634-7db1-7923-9a3c-6d26d3c541b1
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              invoice_item_id: invoice_item_0197d634-7d91-712c-a766-510e8d889c69
              title: 'Payment Intent: pi_0197d634-7d90-7124-acc6-fc69c1a3598b'
              calculation_type: PAYMENT_INTENT
              idx: 0
              currency: AUD
              initial_price: '501.000000000000000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '501.000000000000000000000000000000'
              details:
                price: null
                currency: AUD
                quantity: 1
                payment_intent_id: pi_0197d634-7d90-7124-acc6-fc69c1a3598b
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_calc_0197d634-7db2-7ea3-be57-3a8da42b5736
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              invoice_item_id: invoice_item_0197d634-7d93-7f7a-9131-5f18e7770773
              title: 'Payment Intent: pi_0197d634-7d92-7d0c-b2e8-9021ad9f599d'
              calculation_type: PAYMENT_INTENT
              idx: 0
              currency: BITCOIN
              initial_price: '0.001000000000000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '0.001000000000000000000000000000'
              details:
                price: null
                currency: BITCOIN
                quantity: 1
                payment_intent_id: pi_0197d634-7d92-7d0c-b2e8-9021ad9f599d
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_calc_0197d634-7db3-713c-ab66-c765668c2866
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              invoice_item_id: invoice_item_0197d634-7d94-7bcf-a7ef-0979f02b1caf
              title: 'Payment Intent: pi_0197d634-7d93-7433-b205-b7ec90311980'
              calculation_type: PAYMENT_INTENT
              idx: 0
              currency: GBP
              initial_price: '10.000000000000000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '10.000000000000000000000000000000'
              details:
                price: null
                currency: GBP
                quantity: 1
                payment_intent_id: pi_0197d634-7d93-7433-b205-b7ec90311980
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_calc_0197d634-7db3-763f-bc53-0f85b942f469
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              invoice_item_id: invoice_item_0197d634-7d93-7f7a-9131-5f18e7770773
              title: Currency change BITCOIN => EUR
              calculation_type: CURRENCY_CHANGE
              idx: 1
              currency: EUR
              initial_price: '0.001000000000000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '92.397019055174000000000000000000'
              details:
                to: EUR
                from: BITCOIN
                to_rate_usd: '0.879502000000000005'
                from_rate_usd: '0.000009518727000000'
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_calc_0197d634-7db4-7ad5-a3ca-5cc27915ade6
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              invoice_item_id: invoice_item_0197d634-7d94-7bcf-a7ef-0979f02b1caf
              title: Currency change GBP => EUR
              calculation_type: CURRENCY_CHANGE
              idx: 1
              currency: EUR
              initial_price: '10.000000000000000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '11.904498929341000000000000000000'
              details:
                to: EUR
                from: GBP
                to_rate_usd: '0.879502000000000005'
                from_rate_usd: '0.738797999999999954'
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_calc_0197d634-7db5-7133-8a1a-6ce942788d57
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              invoice_item_id: invoice_item_0197d634-7d95-720e-8117-7854f2ea3414
              title: Currency change GBP => EUR
              calculation_type: CURRENCY_CHANGE
              idx: 1
              currency: EUR
              initial_price: '48.000000000000000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '57.141594860840000000000000000000'
              details:
                to: EUR
                from: GBP
                to_rate_usd: '0.879502000000000005'
                from_rate_usd: '0.738797999999999954'
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_calc_0197d634-7db5-7ab5-9818-8fb301c02b71
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              invoice_item_id: invoice_item_0197d634-7d95-720e-8117-7854f2ea3414
              title: '444'
              calculation_type: PRODUCT
              idx: 0
              currency: GBP
              initial_price: '48.000000000000000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '48.000000000000000000000000000000'
              details:
                price: '24.000000000000000000000000000000'
                currency: GBP
                quantity: 2
                product_id: product_0197a8d9-8426-7e71-9edf-26301686ed26
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_calc_0197d634-7db6-753a-9bd9-00241f790bbb
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              invoice_item_id: invoice_item_0197d634-7d95-720e-8117-7854f2ea3414
              title: '444'
              calculation_type: PRODUCT
              idx: 0
              currency: GBP
              initial_price: '48.000000000000000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '48.000000000000000000000000000000'
              details:
                price: '24.000000000000000000000000000000'
                currency: GBP
                quantity: 2
                product_id: product_0197a8d9-8426-7e71-9edf-26301686ed26
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_calc_0197d634-7db7-7761-9a34-d56e71948e73
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              invoice_item_id: invoice_item_0197d634-7d95-720e-8117-7854f2ea3414
              title: Currency change GBP => EUR
              calculation_type: CURRENCY_CHANGE
              idx: 1
              currency: EUR
              initial_price: '48.000000000000000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '57.141594860840000000000000000000'
              details:
                to: EUR
                from: GBP
                to_rate_usd: '0.879502000000000005'
                from_rate_usd: '0.738797999999999954'
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_calc_0197d634-7db8-75af-93bf-0af3202b8705
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              invoice_item_id: null
              title: Total
              calculation_type: TOTAL
              idx: 0
              currency: EUR
              initial_price: '504.818257074815000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '504.818257074815000000000000000000'
              details: []
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_calc_0197d634-7db9-7d8b-b91d-732600f7217b
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              invoice_item_id: null
              title: Total, USD
              calculation_type: TOTAL_USD
              idx: 0
              currency: USD
              initial_price: '573.981931905572000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '573.981931905572000000000000000000'
              details: []
              created_at: '2025-07-04 18:10:53'
              updated_at: null
            - id: invoice_calc_0197d634-7db9-7d8b-b91d-732600f7217b
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
              invoice_item_id: null
              title: Total, GBP
              calculation_type: TOTAL_ORIGINAL
              idx: 0
              currency: GBP
              initial_price: '424.103470801800000000000000000000'
              price_delta: '0.000000000000000000000000000000'
              price: '424.103470801800000000000000000000'
              details: []
              created_at: '2025-07-04 18:10:53'
              updated_at: null
          calculation_summary:
            invoice_id: invoice_0197d634-7d8e-7615-8007-e37b992cdb30
            currency: EUR
            total_price: '504.818257074815000000000000000000'
            total_price_usd: '573.981931905572000000000000000000'
            cache:
              used: false
              expires_at: 1751912947
              expires_in: 0
            convert_currency: GBP
            total_price_converted: '424.056703327972'
          organization:
            name: Organization Name
            image_url: null
            stripe_config:
              stripe_user_id: acct_2SD34569a7asSd0a
    currency:
      type: string
      enum:
        - BITCOIN
        - ETHEREUM
        - USDT
        - USDC
        - USDC_NATIVE
        - SOLANA
        - BINANCE_COIN
        - RIPPLE
        - POLYGON
        - TRON
        - LITECOIN
        - BITCOIN_CASH
        - DOGECOIN
        - USD
        - EUR
        - CHF
        - GBP
        - AUD
        - JPY
        - CNY
        - CAD
        - HKD
        - SGD
        - SEK
        - KRW
        - NOK
        - NZD
        - INR
        - MXN
        - TWD
        - ZAR
        - BRL
        - DKK
        - PLN
        - THB
        - ILS
        - IDR
        - CZK
        - AED
        - TRY
        - HUF
        - CLP
        - SAR
        - PHP
        - MYR
        - COP
        - RUB
        - RON
        - PEN
      examples:
        - GBP
        - BITCOIN
    product:
      type: object
      description: Product entity
      required:
        - id
        - name
        - organization_id
      properties:
        id:
          type: string
          description: Unique product identifier
          examples:
            - product_0197a8d9-8426-7e71-9edf-26301686ed26
        version_group_id:
          type: string
          description: Version group identifier
          examples:
            - vg_0197a8d9-8426-7e71-9edf-26301686ed26
        is_active:
          type:
            - integer
            - 'null'
          description: Whether the product is active
        name:
          type: string
          description: Product name
          examples:
            - Premium API Access
        organization_id:
          type: string
          description: Organization identifier
          examples:
            - org_0197a8d9-8426-7e71-9edf-26301686ed26
        description:
          type:
            - string
            - 'null'
          description: Product description
          examples:
            - Premium API access with advanced features
        image_id:
          type:
            - string
            - 'null'
          description: Product image identifier
          examples:
            - img_0197a8d9-8426-7e71-9edf-26301686ed26
        metadata:
          type:
            - object
            - 'null'
          description: Additional product metadata
        schemas:
          type: array
          description: Product billing schemas
          items:
            $ref: '#/components/schemas/billingSchema'
        created_at:
          type: string
          format: mysql-date-time
          description: Timestamp when the product was created
          examples:
            - '2024-01-15 10:30:00'
        updated_at:
          type:
            - string
            - 'null'
          format: mysql-date-time
          description: Timestamp when the product was last updated
          examples:
            - '2024-01-15 10:30:00'
        image:
          $ref: '#/components/schemas/file'
          type:
            - object
            - 'null'
          description: Associated product's image
      examples:
        - id: product_01971675-8d84-79cb-8daa-304ca034b067
          version_group_id: product_01971675-8d84-79cb-8daa-304ca034b067
          is_active: 1
          name: 'First Subscription #1'
          organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
          description: Third Subscriptio is coming
          image_id: null
          metadata:
            one: '1'
            two: '2'
            three: '3'
            four: '4'
          created_at: '2025-05-28 12:34:52'
          updated_at: '2025-06-22 19:12:41'
          schemas:
            - id: schema_01971675-8d85-7007-bc44-dc2a77e1038d
              version_group_id: schema_01971675-8d85-7007-bc44-dc2a77e1038d
              is_active: 1
              name: Basic Product
              description: Basic Product Schema
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              product_id: product_01971675-8d84-79cb-8daa-304ca034b067
              type: RECURRING
              currency: USD
              base_price: '10.030000000000000000000000000000'
              interval_type: MONTH
              interval_count: 1
              payment_type: ARREARS
              renew_type: CALENDAR
              billing_type: FULL
              created_at: '2025-05-28 12:34:52'
              updated_at: '2025-06-22 19:12:41'
              configurations:
                - id: config_01971675-8d86-72bb-9f08-82e2456c6e26
                  version_group_id: config_01971675-8d86-72bb-9f08-82e2456c6e26
                  is_active: 1
                  schema_id: schema_01971675-8d85-7007-bc44-dc2a77e1038d
                  starts_at: '1.000000000000'
                  ends_at: '2.000000000000'
                  price_per_unit: '5.000000000000000000000000000000'
                  metric_id: metric_01971675-8d86-797c-8621-b918d4c83fc1
                  created_at: '2025-05-28 12:34:52'
                  updated_at: '2025-06-22 19:12:41'
                - id: config_01971675-8d86-72bb-9f08-82e2456c6e27
                  version_group_id: config_01971675-8d86-72bb-9f08-82e2456c6e27
                  is_active: 1
                  schema_id: schema_01971675-8d85-7007-bc44-dc2a77e1038d
                  starts_at: '2.000000000000'
                  ends_at: '3.000000000000'
                  price_per_unit: '6.000000000000000000000000000000'
                  metric_id: metric_01971675-8d86-797c-8621-b918d4c83fc1
                  created_at: '2025-06-12 23:57:41'
                  updated_at: '2025-06-22 19:12:41'
            - id: schema_01971675-8d85-7007-bc44-dc2a77e1038e
              version_group_id: schema_01971675-8d85-7007-bc44-dc2a77e1038e
              is_active: 1
              name: Middle Products
              description: Middle Product Schema
              organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
              product_id: product_01971675-8d84-79cb-8daa-304ca034b067
              type: RECURRING
              currency: USD
              base_price: '15.000000000000000000000000000000'
              interval_type: MONTH
              interval_count: 1
              payment_type: ARREARS
              renew_type: CALENDAR
              billing_type: FULL
              created_at: '2025-06-12 23:47:20'
              updated_at: '2025-06-22 19:12:41'
              configurations: []
    billingSchema:
      type: object
      description: Billing schema
      properties:
        id:
          type: string
          description: Unique schema identifier
          examples:
            - schema_01971675-8d85-7007-bc44-dc2a77e1038d
        version_group_id:
          type: string
          description: Version group identifier
          examples:
            - schema_01971675-8d85-7007-bc44-dc2a77e1038d
        is_active:
          type:
            - integer
            - 'null'
          description: Whether the schema is active
        name:
          type: string
          description: Schema name
          examples:
            - Basic Product
        description:
          type:
            - string
            - 'null'
          description: Schema description
          examples:
            - Basic Product Schema
        organization_id:
          type: string
          description: Organization identifier
          examples:
            - org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
        product_id:
          type:
            - string
            - 'null'
          description: Product identifier
        type:
          type: string
          enum:
            - ONE_TIME
            - RECURRING
            - USAGE_BASED
            - TIERED_USAGE
          description: Billing schema type
        currency:
          $ref: '#/components/schemas/currency'
          description: Currency code
        base_price:
          type:
            - string
            - number
          format: decimal
          description: Price
        interval_type:
          type:
            - string
            - 'null'
          enum:
            - DAY
            - WEEK
            - MONTH
            - YEAR
            - null
          description: Billing interval type
        interval_count:
          type:
            - number
            - 'null'
          description: Billing interval count
        payment_type:
          type:
            - string
            - 'null'
          enum:
            - ADVANCE
            - ARREARS
            - null
          description: Payment type
        renew_type:
          type:
            - string
            - 'null'
          enum:
            - CALENDAR
            - ANNIVERSARY
            - null
          description: Renewal type
        billing_type:
          type:
            - string
            - 'null'
          enum:
            - PRORATED
            - FULL
            - null
          description: Billing type
        created_at:
          type: string
          format: mysql-date-time
          description: Timestamp when the product was created
          examples:
            - '2024-01-15 10:30:00'
        updated_at:
          type:
            - string
            - 'null'
          format: mysql-date-time
          description: Timestamp when the product was last updated
          examples:
            - '2024-01-15 10:30:00'
        configurations:
          type: array
          description: Array of billing configurations for the schema
          items:
            $ref: '#/components/schemas/billingConfiguration'
      examples:
        - id: schema_01971675-8d85-7007-bc44-dc2a77e1038d
          version_group_id: schema_01971675-8d85-7007-bc44-dc2a77e1038d
          is_active: 1
          name: Basic Product
          description: Basic Product Schema
          organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
          product_id: product_01971675-8d84-79cb-8daa-304ca034b067
          type: RECURRING
          currency: USD
          base_price: '10.030000000000000000000000000000'
          interval_type: MONTH
          interval_count: 1
          payment_type: ARREARS
          renew_type: CALENDAR
          billing_type: FULL
          created_at: '2025-05-28 12:34:52'
          updated_at: '2025-06-22 19:12:41'
          configurations:
            - id: config_01971675-8d86-72bb-9f08-82e2456c6e26
              version_group_id: config_01971675-8d86-72bb-9f08-82e2456c6e26
              is_active: 1
              schema_id: schema_01971675-8d85-7007-bc44-dc2a77e1038d
              starts_at: '1.000000000000'
              ends_at: '2.000000000000'
              price_per_unit: '5.000000000000000000000000000000'
              metric_id: metric_01971675-8d86-797c-8621-b918d4c83fc1
              created_at: '2025-05-28 12:34:52'
              updated_at: '2025-06-22 19:12:41'
            - id: config_01971675-8d86-72bb-9f08-82e2456c6e27
              version_group_id: config_01971675-8d86-72bb-9f08-82e2456c6e27
              is_active: 1
              schema_id: schema_01971675-8d85-7007-bc44-dc2a77e1038d
              starts_at: '2.000000000000'
              ends_at: '3.000000000000'
              price_per_unit: '6.000000000000000000000000000000'
              metric_id: metric_01971675-8d86-797c-8621-b918d4c83fc1
              created_at: '2025-06-12 23:57:41'
              updated_at: '2025-06-22 19:12:41'
    paymentIntent:
      type: object
      description: Payment intent entity
      required:
        - id
        - organization_id
        - currency
        - price
        - created_at
      properties:
        id:
          type: string
          description: Unique payment intent identifier
          examples:
            - pi_0197d634-7d90-7124-acc6-fc69c1a3598b
        organization_id:
          type: string
          description: Organization identifier
          examples:
            - org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
        customer_email:
          type:
            - string
            - 'null'
          description: Email address of the customer (optional)
        currency:
          $ref: '#/components/schemas/currency'
          description: Payment currency code
        price:
          type: string
          description: Payment amount with high precision decimal
          examples:
            - '501.000000000000000000000000000000'
        created_at:
          type: string
          format: mysql-date-time
          description: Timestamp when the payment intent was created
          examples:
            - '2025-07-04 18:10:53'
        updated_at:
          type:
            - string
            - 'null'
          format: mysql-date-time
          description: Timestamp when the payment intent was last updated
          examples:
            - '2025-07-04 18:10:53'
            - null
      examples:
        - id: pi_0197d634-7d90-7124-acc6-fc69c1a3598b
          organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
          currency: AUD
          price: '501.000000000000000000000000000000'
          created_at: '2025-07-04 18:10:53'
          updated_at: null
    file:
      type: object
      description: >-
        File object containing file identifier and URL for accessing the file
        resource
      properties:
        id:
          type: string
          description: Unique identifier for the file
          examples:
            - file_0196b6e6-54e3-796d-9c6a-2862a5fef597
        name:
          type: string
          description: Original filename
          examples:
            - 4.jpg
        url:
          type:
            - string
            - 'null'
          format: uri
          description: URL for accessing the file resource
          examples:
            - >-
              https://assets.bitgpt.xyz//app/public/src/storage/uploads/image/2025/05/09/0196b6e6-54e3-7290-9d73-0074c623e368.jpg
        mime_type:
          type: string
          description: MIME type of the file
          examples:
            - image/jpeg
        type:
          type: string
          description: >-
            Type of the file (e.g., image, document, video, audio, archive,
            general)
          enum:
            - image
            - document
            - video
            - audio
            - archive
            - general
          examples:
            - image
        is_duplicate:
          type: boolean
          description: Indicates if the file is a duplicate
          examples:
            - true
        hash:
          type: string
          description: File hash for duplicate detection
          examples:
            - 04b9e2ec43133ae7287f97764c0beda19f304374e1d6bfe4fcc36ad54502e5dc
        organization_id:
          type: string
          description: Organization identifier that owns the file
          examples:
            - org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
        original_name:
          type: string
          description: Original filename as uploaded
          examples:
            - 4.jpg
        filename:
          type: string
          description: Generated filename for storage
          examples:
            - 0198042e-6dde-76e0-b817-3afb324e29ac.jpg
        filepath:
          type: string
          description: Full path to the file in storage
          examples:
            - >-
              org_uploads/org_0196b0e9-11d8-7f26-b1d2-bd47054e4827/image/0198042e-6dde-76e0-b817-3afb324e29ac.jpg
        file_size:
          type: integer
          description: File size in bytes (alternative to size field)
          examples:
            - 1060793
        created_at:
          type: string
          format: mysql-date-time
          description: Timestamp when the file was created
          examples:
            - '2025-07-13 16:26:48.415'
        updated_at:
          type:
            - string
            - 'null'
          format: mysql-date-time
          description: Timestamp when the file was last updated
          examples:
            - null
      examples:
        - id: file_0196b6e6-54e3-796d-9c6a-2862a5fef597
          url: >-
            https://assets.bitgpt.xyz//app/public/src/storage/uploads/image/2025/05/09/0196b6e6-54e3-7290-9d73-0074c623e368.jpg
        - id: file_0198042e-6dde-7b9c-bc91-452a7e0c833b
          name: 4.jpg
          url: >-
            https://assets.bitgpt.xyz/org_uploads/org_0196b0e9-11d8-7f26-b1d2-bd47054e4827/image/0198042e-6dde-76e0-b817-3afb324e29ac.jpg
          file_size: 1060793
          mime_type: image/jpeg
          is_duplicate: true
        - id: file_0198042e-6dde-7b9c-bc91-452a7e0c833b
          hash: 04b9e2ec43133ae7287f97764c0beda19f304374e1d6bfe4fcc36ad54502e5dc
          organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
          original_name: 4.jpg
          filename: 0198042e-6dde-76e0-b817-3afb324e29ac.jpg
          filepath: >-
            org_uploads/org_0196b0e9-11d8-7f26-b1d2-bd47054e4827/image/0198042e-6dde-76e0-b817-3afb324e29ac.jpg
          mime_type: image/jpeg
          file_size: 1060793
          type: image
          created_at: '2025-07-13 16:26:48.415'
          updated_at: null
          url: >-
            https://assets.bitgpt.xyz/org_uploads/org_0196b0e9-11d8-7f26-b1d2-bd47054e4827/image/0198042e-6dde-76e0-b817-3afb324e29ac.jpg
    billingConfiguration:
      type: object
      description: Schema configuration
      properties:
        id:
          type: string
          description: Configuration identifier
        version_group_id:
          type: string
          description: Version group identifier
        is_active:
          type:
            - integer
            - 'null'
          description: Whether the configuration is active
        schema_id:
          type: string
          description: Schema identifier
        starts_at:
          type:
            - string
            - 'null'
          format: decimal
          description: Start time in decimal format
        ends_at:
          type:
            - string
            - 'null'
          format: decimal
          description: End time in decimal format
        price_per_unit:
          type:
            - string
            - 'null'
          format: decimal
          description: Price per unit in decimal format
        metric_id:
          type:
            - string
            - 'null'
          description: Metric identifier for the configuration
        created_at:
          type: string
          format: mysql-date-time
          description: Timestamp when the product was created
          examples:
            - '2024-01-15 10:30:00'
        updated_at:
          type:
            - string
            - 'null'
          format: mysql-date-time
          description: Timestamp when the product was last updated
          examples:
            - '2024-01-15 10:30:00'
      examples:
        - id: config_01971675-8d86-72bb-9f08-82e2456c6e26
          version_group_id: config_01971675-8d86-72bb-9f08-82e2456c6e26
          is_active: 1
          schema_id: schema_01971675-8d85-7007-bc44-dc2a77e1038d
          starts_at: '1.000000000000'
          ends_at: '2.000000000000'
          price_per_unit: '5.000000000000000000000000000000'
          metric_id: metric_01971675-8d86-797c-8621-b918d4c83fc1
          created_at: '2025-05-28 12:34:52'
          updated_at: '2025-06-22 19:12:41'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Send your access token as header Authorization: Bearer {accessToken}'
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your API key that starts with sk_live or sk_test. You can create yours
        at go.bitgpt.xyz/api-keys.

````