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

# Complemento de pago

> Registra un pago (CFDI tipo P) contra un CFDI PPD previamente timbrado. El CFDI referenciado debe existir, ser PPD y del mismo emisor.



## OpenAPI

````yaml /openapi.json post /cfdi/complemento-pago
openapi: 3.1.0
info:
  title: Ipsofactura API
  description: API de timbrado CFDI 4.0 de Palenca.
  version: v1
servers:
  - url: https://api.ipsofactura.com
    description: Producción
  - url: https://sandbox.api.ipsofactura.com
    description: Sandbox (pruebas, sin validez fiscal)
security:
  - apiKeyAuth: []
tags:
  - name: CFDI
    description: Timbrado, complemento de pago, cancelación y descarga de CFDIs.
  - name: Empresas
    description: Alta y consulta de empresas emisoras.
  - name: Certificados
    description: Administración del Certificado de Sello Digital (CSD).
paths:
  /cfdi/complemento-pago:
    post:
      tags:
        - CFDI
      summary: Complemento de pago
      description: >-
        Registra un pago (CFDI tipo P) contra un CFDI PPD previamente timbrado.
        El CFDI referenciado debe existir, ser PPD y del mismo emisor.
      operationId: complementoPago
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PagoRequest'
            examples:
              Pago que liquida un PPD:
                description: Pago que liquida un PPD
                value:
                  rfc_emisor: EKU9003173C9
                  pagos:
                    - fecha_pago: '2026-07-21T09:55:00'
                      forma_pago_p: '03'
                      moneda_p: MXN
                      monto: 1160
                      num_operacion: OP-0001
                      documentos_relacionados:
                        - factura_id: <id-del-CFDI-PPD>
                          imp_pagado: 1160
        required: true
      responses:
        '201':
          description: Complemento de pago timbrado
          content:
            '*/*':
              example:
                id: 169fe189-...
                uuid: b0440bb7-...
                fecha_timbrado: '2026-07-21T09:56:00'
                sello_cfdi: ...
                sello_sat: ...
                documentos_relacionados:
                  - id_documento: 0bcfae68-...
                    num_parcialidad: 1
                    imp_pagado: '1160.00'
                    imp_saldo_insoluto: '0.00'
                    liquidado: true
        '400':
          description: >-
            El CFDI referenciado no es PPD, no existe, o el importe excede el
            saldo
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PagoResponse'
components:
  schemas:
    PagoRequest:
      type: object
      properties:
        fecha:
          type: string
          pattern: \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:\d{2})?
        serie:
          type: string
        folio:
          type: string
        pagos:
          type: array
          items:
            $ref: '#/components/schemas/PagoDTO'
          minItems: 1
        rfc_emisor:
          type: string
          minLength: 1
        idempotency_key:
          type: string
      required:
        - pagos
        - rfc_emisor
    PagoResponse:
      type: object
      properties:
        id:
          type: string
        uuid:
          type: string
        serie:
          type: string
        folio:
          type: string
        sandbox:
          type: boolean
        fecha_timbrado:
          type: string
        sello_cfdi:
          type: string
        sello_sat:
          type: string
        documentos_relacionados:
          type: array
          items:
            $ref: '#/components/schemas/DoctoResumen'
    PagoDTO:
      type: object
      properties:
        monto:
          type: number
        fecha_pago:
          type: string
          minLength: 1
        forma_pago_p:
          type: string
          minLength: 1
        moneda_p:
          type: string
          minLength: 1
        tipo_cambio_p:
          type: number
        num_operacion:
          type: string
        rfc_emisor_cta_ord:
          type: string
        nom_banco_ord_ext:
          type: string
        cta_ordenante:
          type: string
        rfc_emisor_cta_ben:
          type: string
        cta_beneficiario:
          type: string
        documentos_relacionados:
          type: array
          items:
            $ref: '#/components/schemas/DoctoRelacionadoDTO'
          minItems: 1
      required:
        - documentos_relacionados
        - fecha_pago
        - forma_pago_p
        - moneda_p
        - monto
    DoctoResumen:
      type: object
      properties:
        id_documento:
          type: string
        num_parcialidad:
          type: integer
          format: int32
        imp_pagado:
          type: string
        imp_saldo_insoluto:
          type: string
        liquidado:
          type: boolean
    DoctoRelacionadoDTO:
      type: object
      properties:
        id_documento:
          type: string
        factura_id:
          type: string
        moneda_dr:
          type: string
        equivalencia_dr:
          type: number
        imp_pagado:
          type: number
        objeto_imp_dr:
          type: string
        traslados_dr:
          type: array
          items:
            $ref: '#/components/schemas/ImpuestoDTO'
        retenciones_dr:
          type: array
          items:
            $ref: '#/components/schemas/ImpuestoDTO'
      required:
        - imp_pagado
    ImpuestoDTO:
      type: object
      properties:
        base:
          type: number
        impuesto:
          type: string
          minLength: 1
        importe:
          type: number
        tipo_factor:
          type: string
        tasa_o_cuota:
          type: string
      required:
        - base
        - impuesto
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: API key emitida por Ipsofactura, enviada en el header x-api.
      name: x-api
      in: header

````