This guide takes you from a freshly installed ERPNext Mexico Compliance app to a fully stamped CFDI Sales Invoice. You will configure your Digital Signing Certificate (CSD), connect to the TI Sin Problemas stamping service, verify your master data, and issue your first CFDI — all without leaving ERPNext Desk.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.
Add a Digital Signing Certificate
The SAT requires every CFDI to be digitally signed using a valid Certificado de Sello Digital (CSD) issued to your company. You must upload this certificate to ERPNext before any invoice can be stamped.
- In ERPNext Desk, navigate to Mexico Compliance → Digital Signing Certificate.
- Click New.
- In the Company field, select the company that will issue the CFDI documents.
- In the Certificate File (.cer) field, attach your
.cercertificate file issued by the SAT. - In the Certificate Key File (.key) field, attach your
.keyprivate key file. - Enter the Certificate Key Password that protects your
.keyfile. - Click Save.
Configure CFDI Stamping Settings
CFDI Stamping Settings is the central configuration DocType that connects ERPNext to the TI Sin Problemas stamping web service.
- Navigate to Mexico Compliance → CFDI Stamping Settings.
- Enter your API Key in the corresponding field.
- Enter your API Secret in the corresponding field.
- If you are configuring a production environment, uncheck the Test mode checkbox. Leave Test mode enabled while you are validating your setup in a non-production site.
- Optionally, enable Stamp on submit if you want Sales Invoices to be stamped automatically the moment they are submitted, without requiring a manual button click.
- Click Save.
Check available credits
Before stamping invoices, confirm that your account has sufficient credits.
- In Mexico Compliance → CFDI Stamping Settings, click the Available credits button.
- The current credit balance for your API account will be displayed.
Prepare your master data
The SAT requires specific catalog codes on every CFDI line item. Before stamping your first invoice, verify that the following records are configured correctly in ERPNext:
All SAT catalog values (Tax Regime, Product/Service Key, UOM Key, Payment Method) are available as linked fields pointing to the SAT catalog DocTypes that ship with the app. Use the search on each field to find the correct SAT code for your use case.
| Record | Required field | Where to set it |
|---|---|---|
| Customer | Valid RFC (Tax ID) | Customer → Tax ID |
| Customer | SAT Tax Regime | Customer → SAT Tax Regime |
| Customer Address | Zip Code | Address linked to the Customer |
| Company Address | Zip Code | Address linked to the Company |
| Item | SAT Product or Service Key | Item → SAT Product or Service Key |
| UOM | SAT UOM Key | UOM → SAT UOM Key |
| Mode of Payment | SAT Payment Method | Mode of Payment → SAT Payment Method |
The Sales Invoice itself also requires a SAT Payment Option (Método de pago SAT) and a SAT CFDI Use field. These can be set directly on the invoice or defaulted from the Customer record.
Stamp a Sales Invoice
With configuration and master data in place, you can stamp your first CFDI.If auto-stamp on submit is enabled:
- Create and complete a Sales Invoice as normal.
- Click Submit. The app will automatically call the stamping service after submission. The Stamped XML field on the invoice will be populated with the signed CFDI XML returned by the SAT.
- Create, complete, and submit a Sales Invoice.
- On the submitted invoice form, click the Stamp CFDI button.
- A dialog will appear prompting you to select a Digital Signing Certificate for the company issuing the invoice. Choose the appropriate certificate and confirm.
- The app sends the invoice data to the TI Sin Problemas stamping service, which returns the SAT-sealed XML. The Stamped XML field is updated with the result.
Download CFDI files
After a Sales Invoice has been stamped, you can retrieve the official CFDI files for your records or to send to your customer.
- On the stamped Sales Invoice form, open the CFDI Actions button group.
- Click Download CFDI files.
- ERPNext will package the signed XML file and the PDF representation of the CFDI into a single ZIP archive and prompt you to download it.
Next steps
CFDI Overview
Learn how CFDI documents are structured, how Sales Invoice and Payment Entry stamping differ, and what data is included in the generated XML.
CFDI Cancellation
Understand the SAT cancellation process, how to provide a cancellation reason and substitute document, and how the hourly status check job keeps your records up to date.
Stamping Settings Reference
Full reference for all fields in CFDI Stamping Settings, including Test mode behavior, auto-stamp configuration, and API credential management.
SAT Catalogs
Browse all SAT catalog DocTypes included with the app — payment methods, tax regimes, product/service keys, units of measure, and cancellation reasons.