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

> Returns a paginated list of payments.



## OpenAPI

````yaml /api-reference/openapi.json get /api/gateway/payments
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/payments:
    get:
      tags:
        - Gateway
      summary: List payments
      description: Returns a paginated list of payments.
      operationId: listGatewayPayments
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            default: 20
        - name: customerId
          in: query
          schema:
            type: string
        - name: invoiceId
          in: query
          schema:
            type: string
        - name: paymentId
          in: query
          schema:
            type: string
        - name: status
          in: query
          schema:
            type: string
      responses:
        '200':
          description: List of payments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentListResponse'
components:
  schemas:
    PaymentListResponse:
      type: object
      required:
        - object
        - data
        - hasMore
      properties:
        object:
          type: string
          enum:
            - list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Payment'
        hasMore:
          type: boolean
    Payment:
      type: object
      required:
        - id
        - object
        - status
        - ledgerStatus
        - amount
        - currency
        - created
      properties:
        id:
          type: string
          description: Payment ID with pay_* prefix.
        object:
          type: string
          enum:
            - payment
        customerId:
          type: string
        invoiceId:
          type: string
        sessionId:
          type: string
        amount:
          type: number
        currency:
          type: string
        status:
          type: string
          enum:
            - pending
            - paid
            - failed
        ledgerStatus:
          type: string
          enum:
            - pending
            - settled
            - refunded
        route:
          type: object
          properties:
            id:
              type: string
            kind:
              $ref: '#/components/schemas/RouteKind'
            label:
              type: string
        fees:
          type: object
          properties:
            buyer_fee:
              type: number
            gateway_fee:
              type: number
            merchant_net:
              type: number
            total:
              type: number
        metadata:
          $ref: '#/components/schemas/Metadata'
        created:
          type: string
          format: date-time
    RouteKind:
      type: string
      enum:
        - card
        - wallet
        - local
    Metadata:
      type: object
      additionalProperties:
        type: string
        maxLength: 500
      default: {}

````