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

# Get invoices

> Returns a paginated list of invoices specified by their IDs. Supports simulation context via `simulatedAt` and `whenAt` query parameters.



## OpenAPI

````yaml /openapi.json get /billing
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /billing:
    get:
      tags:
        - billing
      summary: Get invoices
      description: >-
        Returns a paginated list of invoices specified by their IDs. Supports
        simulation context via `simulatedAt` and `whenAt` query parameters.
      operationId: BillingController_getInvoices
      parameters:
        - name: simulatedAt
          required: false
          in: query
          description: 'Optional: the simulatedAt datetime'
          schema:
            type: string
        - name: whenAt
          required: false
          in: query
          description: 'Optional: the whenAt datetime'
          schema:
            type: string
        - name: ids
          required: true
          in: query
          description: the invoice ids to retrieve
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetInvoicesOutput'
components:
  schemas:
    GetInvoicesOutput:
      type: object
      properties:
        data:
          description: the list of items in the page
          type: array
          items:
            $ref: '#/components/schemas/InvoiceDto'
        pageInfo:
          description: the page info
          allOf:
            - $ref: '#/components/schemas/ResponsePageInfo'
        totalCount:
          type: number
          description: the total number of items
        currentPage:
          type: number
          description: the current page
        totalPages:
          type: number
          description: the total number of pages
      required:
        - data
        - pageInfo
        - totalCount
        - currentPage
        - totalPages
    InvoiceDto:
      type: object
      properties:
        issuedAt:
          type: string
          description: invoice issuance date
        period:
          $ref: '#/components/schemas/Period'
        components:
          type: array
          items:
            $ref: '#/components/schemas/BillingComponentDto'
        lines:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineDto'
        total:
          $ref: '#/components/schemas/AmountDto'
        reconciledInvoiceIds:
          description: Invoice ids that have been reconciled
          type: array
          items:
            type: array
        metadata:
          description: metadata assigned to the object
          type: array
          items:
            $ref: '#/components/schemas/Metadata'
        id:
          type: string
          description: the invoice id
        type:
          type: string
          description: entity type
          enum:
            - INVOICE
        status:
          type: string
          description: invoice status
          enum:
            - DRAFTED
            - ISSUED
            - PAID
            - FINALIZED
            - PAYMENT_DISPUTED
            - PAYMENT_IN_PROGRESS
            - PAYMENT_FAILED
            - RECONCILED
            - CANCELLED
            - REFUND_NOT_HANDLED
            - PARTIALLY_FINALIZED
            - REFUND_IN_PROGRESS
            - WRITTEN_OFF
        createdAt:
          type: string
          description: invoice creation date
        hasFailedOnce:
          type: boolean
          description: has invoice failed at least once
        firstFailedAt:
          type: string
          description: first invoice payment failure date
        incrementalId:
          type: number
          description: Incremental invoice id
        externalId:
          type: string
          description: External invoice id
        paymentId:
          type: string
          description: Invoice payment id, if PAID
        paidAt:
          type: string
          description: Payment date, if PAID
        finalizedAt:
          type: string
          description: Finalization date, if FINALIZED
        creditedInvoiceId:
          type: string
          description: Original invoice that we are crediting
        replacedInvoiceId:
          type: string
          description: Original invoice that we are replacing
        refundNotHandledReason:
          description: Reason for refund not handled
          allOf:
            - $ref: '#/components/schemas/InvoiceRefundNotHandledReason'
      required:
        - issuedAt
        - period
        - components
        - lines
        - total
        - metadata
        - id
        - type
        - status
        - createdAt
    ResponsePageInfo:
      type: object
      properties:
        first:
          type: boolean
          description: whether this is the first page
        last:
          type: boolean
          description: whether this is the last page
    Period:
      type: object
      properties:
        startedAt:
          type: string
          description: the start date of the period
        endedAt:
          type: string
          description: the end date of the period
      required:
        - startedAt
        - endedAt
    BillingComponentDto:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - PREMIUM
            - PERIL
            - FEE
            - TAX
            - SPECIAL
        premium:
          $ref: '#/components/schemas/AmountDto'
        reconciliation:
          type: boolean
      required:
        - id
        - type
        - premium
        - reconciliation
    InvoiceLineDto:
      type: object
      properties:
        label:
          type: string
        total:
          $ref: '#/components/schemas/AmountDto'
      required:
        - label
        - total
    AmountDto:
      type: object
      properties:
        amountPreFeesAndTaxes:
          type: integer
        fees:
          type: array
          items:
            $ref: '#/components/schemas/FeeDto'
        totalFees:
          type: integer
        amountWithFeesPreTaxes:
          type: integer
        taxes:
          type: array
          items:
            $ref: '#/components/schemas/TaxDto'
        totalTaxes:
          type: integer
        amountWithFeesAndTaxes:
          type: integer
      required:
        - amountPreFeesAndTaxes
        - fees
        - totalFees
        - amountWithFeesPreTaxes
        - taxes
        - totalTaxes
        - amountWithFeesAndTaxes
    Metadata:
      type: object
      properties:
        key:
          type: string
          description: the key of the metadata
        value:
          type: string
          description: the value of the metadata
      required:
        - key
        - value
    InvoiceRefundNotHandledReason:
      type: string
      enum:
        - SEPA_PAYMENT_180_DAYS_EXCEEDED
        - INSUFFICIENT_AMOUNT
      description: Reason for refund not handled
    FeeDto:
      type: object
      properties:
        id:
          type: string
        brokerageFirmId:
          type: string
        chargeType:
          type: string
          enum:
            - ONE_TIME
            - SPOT
            - RECURRING
        amount:
          type: integer
      required:
        - id
        - chargeType
        - amount
    TaxDto:
      type: object
      properties:
        id:
          type: string
        chargeType:
          type: string
          enum:
            - ONE_TIME
            - SPOT
            - RECURRING
        amount:
          type: integer
      required:
        - id
        - chargeType
        - amount

````