Facturación

Crear complemento de pago PPD

Changed on

Emite el complemento de pago de un billing document PPD para los Invoices de una Transaction.

Genera el CFDI de complemento de pago (recepción de pagos) ante Facturama y registra el evento de creación. La operación es idempotente por Transaction mediante un lock. Devuelve los billing documents emitidos.

post/billing-documents/ppd-complement

Request

  • Base URL
    https://api.trytoku.com
  • URL
    https://api.trytoku.com/billing-documents/ppd-complement
  • Auth
    API key in header x-api-key

Headers

x-account-keystring

Llave de API de una Account, para operar sobre esa Account en lugar de la principal.

Request body

id_accountstring required

Identificador público de la Account que emite el CFDI. Determina el certificado y el folio con que se timbra.

id_transactionstring required

Identificador público de la transacción a timbrar. Sus Invoices se unen en un solo CFDI.

issue_datestring date-time

Fecha de emisión en formato ISO 8601. Si se omite, se usa la del momento del timbrado.

Example request

{
  "id_account": "acc_Nkj5FQ4blAzg-ieIKeRpULgj4hjTf-UJ",
  "id_transaction": "trs_8Jm4Pq2Rs6Tv0Wx1Yz3Ab5Cd7Ef9Gh",
  "issue_date": "2026-08-12T10:30:00"
}

Response

Successful Response

billing_addressstring
billing_emailstring
checkout_session_idstring
discountnumber required
fiscal_billing_idstring required
foliostring required
id_accountstring required
id_billing_documentstring required
id_customerstring
id_invoicestring
id_transactionstring
issue_datestring date-time required
pdf_urlstring required
provider_external_idstring required
public_pdf_urlstring
public_xml_urlstring
related_fiscal_billing_idstring
status'ISSUED' | 'FAILED' | 'CANCELLED' | 'PENDING_CANCELLATION'

Estado de un comprobante fiscal mexicano ante el SAT. Nace ISSUED, que es el documento ya timbrado y vigente. Pedir su cancelación lo deja en PENDING_CANCELLATION mientras el receptor la acepta, y el documento sigue vigente durante esa espera: pasa a CANCELLED si la acepta, y vuelve a ISSUED si la ventana de aceptación vence sin respuesta.

FAILED está declarado pero ningún flujo lo emite: el comprobante se registra solo después de timbrarse, así que un timbrado fallido no deja documento.

sub_totalnumber required
tax_idstring required
tax_regimestring required
tax_zip_codestring required
totalnumber required
type'INVOICE' | 'CREDIT_NOTE' | 'COMPLEMENT'

Clase de comprobante fiscal mexicano (CFDI) que se emitió: INVOICE es la factura de ingreso que documenta la venta, COMPLEMENT el complemento de pago que acusa el pago de una factura PPD ya emitida, y CREDIT_NOTE la nota de crédito que rebaja o revierte un comprobante anterior, relacionada al CFDI original.

xml_urlstring required

Changes

    • breaking

      request body became required

    • breaking

      removed the success response with the status

    • info

      api operation id complemento-ppd removed and replaced with create_ppd_complement_billing_document

    • info

      api tag Facturación added

    • info

      added the new optional header request parameter x-account-key

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added the success response with the status