Payment Entries are stamped as CFDI Complemento de Pago 2.0 (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/TI-Sin-Problemas/erpnext_mexico_compliance/llms.txt
Use this file to discover all available pages before exploring further.
pago20) documents. This complement is required by the SAT when a Sales Invoice is issued with payment method PPD (Pago en Parcialidades o Diferido) — meaning payment is received after the invoice date. Each Payment Entry that settles one or more of those invoices must be stamped as a separate CFDI Pago document.
Requirements
All of the following conditions must be satisfied before a Payment Entry can be stamped:- The Company must have a default address with a Zip Code (
pincode). - At least one Digital Signing Certificate must exist for the Company issuing the payment.
- You must have available stamp credits in your TI Sin Problemas account.
- All referenced Sales Invoices must already be stamped — each must have a non-empty
mx_stamped_xmlandmx_uuid. - All referenced Sales Invoices must have a SAT Payment Option of PPD.
- The Payment Entry must be of type Receive with party type Customer.
- The Customer must have a primary address with a Zip Code.
- The Mode of Payment must have an SAT payment method code that is not
99(To be defined). A99code is explicitly blocked during validation.
Auto-stamp conditions
Whenstamp_on_submit is enabled in CFDI Stamping Settings, the Payment Entry override evaluates four conditions at submission time. Auto-stamping only proceeds when all four are true simultaneously:
As with Sales Invoices, a stamping failure during auto-stamp does not roll back the submission. The entry remains submitted so you can resolve the issue and stamp manually.
Stamping manually
Submit the Payment Entry
Complete and submit the Payment Entry. All referenced Sales Invoices must already be in Submitted and Stamped status.
Click Stamp CFDI
Once submitted, the Stamp CFDI button is available on the form. Click it to begin the stamping process.
Select the Digital Signing Certificate
Select the Digital Signing Certificate (CSD) for the Company. Only certificates registered for the payment entry’s Company are available.
CFDI Pago structure
Theget_cfdi_voucher method on the PaymentEntry override builds a cfdi40.Comprobante of type Pago. Only the full-settlement path is supported — partial payments are not.
Full-settlement path (all references: total_amount == allocated_amount):
The app calls cfdi40.Comprobante.pago_comprobantes, passing the original CFDI objects loaded directly from each referenced invoice’s mx_stamped_xml. The SAT library computes the payment amounts and balances automatically from the original CFDI data.
Related document fields
The following fields are added to the Payment Entry DocType by the app:| Field | Description |
|---|---|
mx_payment_mode | SAT payment form code sourced from the Mode of Payment’s SAT Payment Method field. |
mx_stamped_xml | The full stamped XML returned by the web service, including the TimbreFiscalDigital complement. |
mx_uuid | The UUID extracted from the TimbreFiscalDigital complement of the stamped XML. |
mx_cfdi_status | Current CFDI status: Valid, Pending Cancellation, or Cancelled. |
cancellation_reason | SAT cancellation reason code (link to the Cancellation Reason DocType). Required before cancelling a stamped entry. |
substitute_payment_entry | The name of the substitute Payment Entry when cancellation reason 01 is used. |
cancellation_acknowledgement | The ACK XML returned by the SAT after a cancellation request is accepted. |