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

# List Invoices

> List Invoices



## OpenAPI

````yaml openapi/v1-en.yaml GET /api/v1/invoices
openapi: 3.0.3
info:
  title: Subotiz API
  description: Subotiz OpenAPI
  version: 1.0.0
servers:
  - url: https://{api}.subotiz.com
    variables:
      api:
        default: api
security:
  - sec0: []
tags:
  - name: Subscription
    description: Subscription
  - name: Price
    description: Price
  - name: Trade
    description: Trade
  - name: Payment
    description: Payment
  - name: Checkout Session
    description: Checkout Session
  - name: Customer
    description: Customer
  - name: Customer Portal
    description: Customer Portal
paths:
  /api/v1/invoices:
    get:
      tags:
        - Invoice
      summary: List Invoices
      description: List Invoices
      operationId: v1-invoice-list-invoice
      parameters:
        - name: invoice_ids
          in: query
          description: Invoice ID array, filter invoices whose IDs belong to this array
          schema:
            type: array
            items:
              type: string
        - name: trade_ids
          in: query
          description: Trade ID array, filter invoices whose Trade IDs belong to this array
          schema:
            type: array
            items:
              type: string
        - name: order_ids
          in: query
          description: Order ID array, filter invoices whose Order IDs belong to this array
          schema:
            type: array
            items:
              type: string
        - name: subscription_id
          in: query
          description: Subscription ID
          schema:
            type: string
        - name: customer_id
          in: query
          description: Customer ID
          schema:
            type: string
        - name: biz_status
          in: query
          description: >-
            Invoice status array, filter invoices whose status belong to this
            array

            - open: Initial state

            - pending: Invoice pending

            - retrying: Invoice retrying

            - success: Invoice successful

            - failed: Invoice failed

            - refunded: Invoice fully refunded

            - partially_refunded: Invoice partially refunded
          schema:
            type: array
            items:
              type: string
        - name: invoice_types
          in: query
          description: |-
            Invoice type array, filter invoices whose type belong to this array
            - initial: First payment
            - trial: Trial period
            - renewal: Renewal
            - refund: Refund
          schema:
            type: array
            items:
              type: string
        - name: starting_after
          in: query
          description: >-
            Cursor for pagination. `starting_after` is the object ID that
            defines your position in the list. For example, if you want to get
            the next page, you can use the last object's ID as the parameter
            value after getting the object list for the first time. Cannot be
            used together with `ending_before`
          schema:
            type: string
        - name: ending_before
          in: query
          description: >-
            Cursor for pagination. `ending_before` is the object ID that defines
            your position in the list. For example, if you want to get the
            previous page, you can use the first object's ID as the parameter
            value after getting the object list for the first time. Cannot be
            used together with `starting_after`
          schema:
            type: string
        - name: limit
          in: query
          description: >-
            Pagination parameter, number of items per page, default: 10,
            interface defaults to sorting by creation time in descending order.
            Limit: [1, 100]
          schema:
            type: integer
            format: int32
        - name: created_at.gt
          in: query
          description: >-
            Minimum value to filter by (exclusive, UTC time in RFC3339 format,
            such as '2025-01-01T00:00:00Z')
          schema:
            type: string
        - name: created_at.gte
          in: query
          description: >-
            Minimum value to filter by (inclusive, UTC time in RFC3339 format,
            such as '2025-01-01T00:00:00Z')
          schema:
            type: string
        - name: created_at.lt
          in: query
          description: >-
            Maximum value to filter by (exclusive, UTC time in RFC3339 format,
            such as '2025-01-01T00:00:00Z')
          schema:
            type: string
        - name: created_at.lte
          in: query
          description: >-
            Maximum value to filter by (inclusive, UTC time in RFC3339 format,
            such as '2025-01-01T00:00:00Z')
          schema:
            type: string
        - $ref: '#/components/parameters/HeaderRequestID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListInvoiceResponse'
components:
  parameters:
    HeaderRequestID:
      name: Request-Id
      in: header
      description: The unique identifier of the request
      required: true
      schema:
        type: string
        default: 008e3967-a1b5-48bb-be14-d5bff5092e61
  schemas:
    ListInvoiceResponse:
      type: object
      properties:
        code:
          type: string
          description: error code
        message:
          type: string
          description: error message
        data:
          $ref: '#/components/schemas/ListInvoiceResponse_Data'
    ListInvoiceResponse_Data:
      type: object
      properties:
        has_more:
          type: boolean
          description: Whether there is more data
        list:
          type: array
          items:
            $ref: '#/components/schemas/Invoice'
          description: Invoice list
    Invoice:
      type: object
      properties:
        invoice_id:
          type: string
          description: Invoice ID
        merchant_id:
          type: string
          description: Merchant ID
        trade_id:
          type: string
          description: Trade ID
        subscription_id:
          type: string
          description: Subscription ID
        price_id:
          type: string
          description: Pricing plan ID
        customer_id:
          type: string
          description: Subotiz platform `customer_id`
        order_id:
          type: string
          description: Third-party order number
        original_invoice_id:
          type: string
          description: >-
            Original invoice ID, used for refund invoices to reference the
            original invoice
        refund_order_id:
          type: string
          description: Associated refund order ID
        amount:
          type: string
          description: Payment amount, truncated to two decimal places
        currency:
          type: string
          description: Currency
        biz_status:
          type: string
          description: |-
            Invoice status:
            - open: Initialized
            - pending: Processing
            - retrying: Retrying
            - success: Payment succeeded
            - failed: Payment failed
            - refunded: Fully refunded
            - partially_refunded: Partially refunded
        invoice_type:
          type: string
          description: |-
            Invoice type:
            - initial: Initial payment
            - trial: Trial period
            - renewal: Subscription renewal
            - refund: Refund
        paid_at:
          type: string
          description: Payment success time
        cycle_index:
          type: integer
          description: Current cycle index of the subscription
          format: int32
        created_at:
          type: string
          description: Creation time
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            A set of key-value pairs that can be attached to an object, allowing
            you to store additional information in a structured format.
        Discounts:
          allOf:
            - $ref: '#/components/schemas/Discounts'
          description: >-
            Discounts applied to the invoice, including all discount information
            for this invoice
        price_version_id:
          type: string
          description: Pricing plan version ID
        tax_amount:
          type: string
          description: Tax amount
    Discounts:
      type: object
      properties:
        current_period:
          type: array
          items:
            $ref: '#/components/schemas/CurrentPeriodDiscount'
          description: The current period's discount details
      description: Trade order discount information
    CurrentPeriodDiscount:
      type: object
      properties:
        discount_id:
          type: string
          description: The unique identifier for the discount
        discount_amount:
          type: string
          description: The amount discounted
        discount_code:
          type: string
          description: The discount code used
      description: Details for a discount applied in the current period
  securitySchemes:
    sec0:
      type: http
      description: >-
        Bearer API Key authentication. Format: Authorization: Bearer
        {your_api_key}
      scheme: bearer

````