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

# List payments applied to an invoice

> Returns both processed and out-of-band payments for one invoice, newest first, using cursor pagination. Every row exposes `effectiveAt`; out-of-band rows additionally expose `method`, `reference`, and `recordedBy` so the dashboard can render payment history without a second lookup.



## OpenAPI

````yaml /openapi.json get /invoices/{id}/payments
openapi: 3.0.0
info:
  title: PayGood Merchant API
  description: Server-to-server integration surface for merchant API keys.
  version: '1.0'
  contact: {}
servers:
  - url: https://api-sandbox.paygood.co
    description: Sandbox
  - url: https://api.paygood.co
    description: Production
security: []
paths:
  /invoices/{id}/payments:
    get:
      tags:
        - invoices
      summary: List payments applied to an invoice
      description: >-
        Returns both processed and out-of-band payments for one invoice, newest
        first, using cursor pagination. Every row exposes `effectiveAt`;
        out-of-band rows additionally expose `method`, `reference`, and
        `recordedBy` so the dashboard can render payment history without a
        second lookup.
      operationId: InvoicesController_listPayments
      parameters:
        - name: id
          required: true
          in: path
          description: Invoice TypeID (`inv_...`) whose payments are returned.
          schema:
            example: inv_01hxy8m1nqk9g3x3y3p0azq2va
            type: string
        - name: cursor
          required: false
          in: query
          description: Opaque cursor from a previous `page.nextCursor`.
          schema:
            example: >-
              eyJ2IjoxLCJkYXRhIjp7ImNyZWF0ZWRBdCI6IjIwMjYtMDMtMDFUMTI6MDA6MDAuMDAwWiIsImlkIjoiaW52cGF5XzAxLi4uIn19
            type: string
        - name: limit
          required: false
          in: query
          description: Number of items to return. Maximum 100.
          schema:
            example: 25
            type: number
        - name: merchantId
          required: true
          in: query
          description: Merchant TypeID (`mer_...`) used for authorization scope.
          schema:
            example: mer_01hxy8m1nqk9g3x3y3p0azq2bg
            type: string
      responses:
        '200':
          description: Paginated payment history for the requested invoice.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListInvoicePaymentsResponseDto'
        '400':
          description: Invalid query parameters or malformed cursor token.
        '401':
          description: Missing or invalid authentication credentials.
        '403':
          description: >-
            Authenticated principal lacks `invoices.view` capability or merchant
            scope.
        '404':
          description: Invoice was not found for the provided merchant scope.
      security:
        - bearer: []
components:
  schemas:
    ListInvoicePaymentsResponseDto:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              allocationId:
                type: string
              invoiceId:
                type: string
              kind:
                type: string
                enum:
                  - payment
                  - out_of_band
              status:
                type: string
                enum:
                  - pending
                  - applied
                  - canceled
                  - reversed
              amount:
                type: object
                properties:
                  amount:
                    type: integer
                    exclusiveMinimum: true
                    maximum: 9007199254740991
                    minimum: 0
                  currency:
                    description: Supported currency code (USD, CAD)
                    type: string
                    minLength: 3
                    maxLength: 3
                required:
                  - amount
                  - currency
              paymentId:
                description: Present only for `payment` allocations.
                type: string
              method:
                description: Present only for `out_of_band` allocations.
                type: string
                enum:
                  - cash
                  - check
                  - bank_transfer
                  - wire
                  - zelle
                  - venmo
                  - cash_app
                  - paypal
                  - other
              reference:
                type: string
              recordedBy:
                description: >-
                  Who recorded an out-of-band payment, snapshotted at write
                  time. Deliberately omits the raw principal id.
                type: object
                properties:
                  principalType:
                    type: string
                    enum:
                      - member
                      - operator
                      - api_key
                  display:
                    type: string
                required:
                  - principalType
              effectiveAt:
                description: >-
                  When the money arrived, per the processor for `payment` rows
                  and per the merchant for `out_of_band` rows. Null while a
                  payment allocation is still pending.
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              createdAt:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              appliedAt:
                description: When PayGood credited the amount to the invoice balance.
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              canceledAt:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              reversedAt:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            required:
              - allocationId
              - invoiceId
              - kind
              - status
              - amount
              - createdAt
        page:
          type: object
          properties:
            hasMore:
              type: boolean
            nextCursor:
              type: string
          required:
            - hasMore
      required:
        - items
        - page
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: merchant_<prefix>_<secret>
      type: http
      description: >-
        Merchant API key bearer token. Legacy wire prefixes `api_key_` and
        `api_` are also accepted.

````