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

# Get Payments

> Lists every Complemento de Pago of the invoice (vigente, cancelado or en_proceso). `paid` and `balance` count only vigente and en_proceso.

Lists the installments (Complementos de Pago) of a **PPD** invoice and its balance. Same authentication as [Get Invoice](https://docs.timbrix.mx/api-reference/invoices/get.md) (`read:invoices` with an API key).

`installments` includes cancelled Complementos de Pago (`status: "cancelado"`) and the ones still being stamped (`status: "en_proceso"`, `repUuid: null`). `paid` and `balance` count only `vigente` and `en_proceso`, except an installment that was [replaced](https://docs.timbrix.mx/api-reference/invoices/register-payment.md#replacing-a-complemento-de-pago): `substitutedByUuid` holds the UUID of its replacement, and it no longer counts while the replacement does. `substitutedByUuid` is `null` otherwise.

`credited` is the sum of the invoice's vigente credit notes (Egresos with `TipoRelacion` `01`); it is not included in `paid`. `balance = total − credited − paid`, never negative.

```json theme={null}
{
  "total": 1160,
  "paid": 1000,
  "credited": 160,
  "balance": 0,
  "currency": "MXN",
  "installments": [
    {
      "repUuid": "9a8b7c6d-…",
      "installment": 1,
      "amountPaid": 500,
      "date": "2026-10-01T10:00:00",
      "status": "vigente",
      "substitutedByUuid": null
    },
    {
      "repUuid": "1b2c3d4e-…",
      "installment": 2,
      "amountPaid": 500,
      "date": "2026-10-15T12:00:00",
      "status": "vigente",
      "substitutedByUuid": null
    }
  ]
}
```

## Errors

| Status | When |
| - | - |
| `403` | The caller does not belong to the invoice's organization |
| `404` | `uuid` does not match any invoice |
| `422` | The invoice is not an Ingreso PPD invoice (PUE or other types): `La factura {uuid} no es de pago en parcialidades o diferido (PPD), así que no lleva complementos de pago` |


## OpenAPI

````yaml GET /invoices/{uuid}/payments
openapi: 3.0.0
info:
  title: Timbrix API
  description: >-
    API de facturación electrónica CFDI 4.0 para México, con servidor OAuth2
    para gestionar organizaciones, miembros y webhooks. Compatible con agentes
    de IA — ver la extensión `x-ai-agent-friendly` en la raíz de esta spec.


    REST API with OAuth2 server for managing organizations, members, and
    webhooks.
  version: '1.0'
  contact: {}
servers: []
security: []
tags:
  - name: organizations
    description: Organization management endpoints
  - name: oauth
    description: OAuth2 authentication and authorization
  - name: webhooks
    description: Webhook configuration and delivery
  - name: users
    description: User information endpoints
  - name: api-keys
    description: API Keys management and validation
  - name: request-logs
    description: API request log
paths:
  /invoices/{uuid}/payments:
    get:
      tags:
        - invoices
      summary: Get the installments and balance of a PPD invoice
      description: >-
        Lists every Complemento de Pago of the invoice (vigente, cancelado or
        en_proceso). `paid` and `balance` count only vigente and en_proceso.
      operationId: InvoicesController_payments
      parameters:
        - name: uuid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoicePaymentSummaryDto'
        '403':
          description: Caller does not belong to the invoice's organization
        '404':
          description: uuid does not match any invoice
        '422':
          description: The invoice is not a PPD Ingreso
      security:
        - apiKey: []
        - bearer: []
components:
  schemas:
    InvoicePaymentSummaryDto:
      type: object
      properties:
        total:
          type: number
          example: 1160
        paid:
          type: number
          example: 500
          description: Suma de complementos vigentes y en timbrado
        credited:
          type: number
          example: 160
          description: >-
            Suma de las notas de crédito vigentes (egresos con TipoRelacion 01)
            relacionadas con la factura
        balance:
          type: number
          example: 500
          description: total − credited − paid, nunca negativo
        currency:
          type: string
          example: MXN
        installments:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceInstallmentDto'
      required:
        - total
        - paid
        - credited
        - balance
        - currency
        - installments
    InvoiceInstallmentDto:
      type: object
      properties:
        repUuid:
          type: object
          nullable: true
          example: 9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d
          description: UUID del complemento de pago; null mientras se timbra
        installment:
          type: number
          example: 1
        amountPaid:
          type: number
          example: 500
        date:
          type: string
          example: '2026-10-15T12:00:00'
          description: Fecha del pago (hora de la Ciudad de México)
        status:
          type: string
          enum:
            - vigente
            - cancelado
            - en_proceso
          example: vigente
        substitutedByUuid:
          type: object
          nullable: true
          example: null
          description: >-
            UUID del complemento que sustituye esta parcialidad. Mientras el
            sustituto cuente, esta ya no descuenta saldo; si sigue vigente,
            cancélala con motivo 01.
      required:
        - repUuid
        - installment
        - amountPaid
        - date
        - status
        - substitutedByUuid
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API Key for authentication (format: sk_...)'
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.