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

# List invoices

> Returns a paginated list of invoices.



## OpenAPI

````yaml /api-reference/openapi.json get /api/gateway/invoices
openapi: 3.1.0
info:
  title: Open Rails API
  version: 0.1.0
  description: >-
    Hosted checkout, provider routing, runtime schemas, and normalized webhook
    examples for Open Rails merchants and agents.
servers:
  - url: https://dash.getopenrails.com
    description: Production dashboard and API origin
security: []
tags:
  - name: Gateway
  - name: Agent
  - name: Routing
  - name: Webhooks
paths:
  /api/gateway/invoices:
    get:
      tags:
        - Gateway
      summary: List invoices
      description: Returns a paginated list of invoices.
      operationId: listGatewayInvoices
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            default: 20
        - name: customerId
          in: query
          schema:
            type: string
        - name: paymentId
          in: query
          schema:
            type: string
        - name: invoiceId
          in: query
          schema:
            type: string
        - name: status
          in: query
          schema:
            type: string
      responses:
        '200':
          description: List of invoices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceListResponse'
components:
  schemas:
    InvoiceListResponse:
      type: object
      required:
        - object
        - data
        - hasMore
      properties:
        object:
          type: string
          enum:
            - list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Invoice'
        hasMore:
          type: boolean
    Invoice:
      type: object
      required:
        - id
        - object
        - status
        - amount
        - currency
        - created
      properties:
        id:
          type: string
          description: Invoice ID with inv_* prefix.
        object:
          type: string
          enum:
            - invoice
        customerId:
          type: string
        paymentId:
          type: string
        sessionId:
          type: string
        amount:
          type: number
        currency:
          type: string
        status:
          type: string
          enum:
            - open
            - paid
            - void
        metadata:
          $ref: '#/components/schemas/Metadata'
        created:
          type: string
          format: date-time
    Metadata:
      type: object
      additionalProperties:
        type: string
        maxLength: 500
      default: {}

````