{"title":"Generate electronic invoices in the Mexican version","url":"https://jonas-paprotka.de/docs/localfunctionality/mexico/how-to-generate-electronic-invoices/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/localfunctionality/mexico/how-to-generate-electronic-invoices, MicrosoftDocs/dynamics365smb-docs at 46907ac (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/localfunctionality/mexico/how-to-generate-electronic-invoices","source":{"name":"Business Central application docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-docs","commit":"46907ace177f8d31deba47a2fdb57c3336e66252","date":"2026-11-19"},"checked":"2026-11-19","description":"After a sales invoice is posted in the Mexican version, an electronic invoice must be generated and sent to the customer.","date":"2026-10-20","meta":{"topic":"how-to"},"outline":[{"level":1,"title":"Generate electronic invoices in the Mexican version","slug":"generate-electronic-invoices-in-the-mexican-version","at":0,"chars":5206},{"level":2,"title":"Generate electronic invoices for sales invoices","slug":"generate-electronic-invoices-for-sales-invoices","at":690,"chars":1385},{"level":2,"title":"Receive payments","slug":"receive-payments","at":2075,"chars":799},{"level":3,"title":"Stamp the payment","slug":"stamp-the-payment","at":2541,"chars":333},{"level":2,"title":"Register export (Comercio Exterior Complement)","slug":"register-export-comercio-exterior-complement","at":2874,"chars":2102},{"level":2,"title":"Related information","slug":"related-information","at":4976,"chars":230}],"text":"# Generate electronic invoices in the Mexican version\nIn Business Central, after you post a sales invoice, you must generate an electronic invoice that is sent to the customer. You can also export the electronic invoice as an XML file, which you can save to a specified location.\nThe following procedure describes how to generate electronic invoices for sales invoices. The same stamp and send workflow is available for the following posted documents:\n Sales credit memos\n Service invoices\n Service credit memos\nFor posted sales shipments and transfer shipments, the Send action requests a stamp without offering the email options. Export the stamped document as XML or print it as needed.\n## Generate electronic invoices for sales invoices\n1. Select Search (Alt+Q) in the upper-right corner, enter Posted Sales Invoices, and then choose the related link.\n1. Select the posted invoice.\n> NOTE\n> To cancel a stamped document, fill in CFDI Cancellation Reason Code. Fill in Substitution Document No. only when the selected cancellation reason requires a replacement document. See electronic-invoicing#cancel-documents.\n1. In the Electronic Document action group, select Send.\n1. Select Request Stamp, Send, or Request Stamp and Send.\n If you choose Request Stamp, the posted invoice is digitally signed by your PAC, and you can then send the posted invoice afterwards. If you choose Request Stamp and Send, the posted invoice is digitally signed and sent in one step.\n Send emails a document that already has a stamp. The XML file is attached to the email. If Send PDF Report is selected on General Ledger Setup, a PDF is attached too.\n View Electronic Document Status on the Electronic Invoice FastTab.\n1. Optionally, choose the Export E-Document as XML action. Select the location where you want to save the electronic invoice as an XML file.\nTo review sending activity, check Date/Time Sent and No. of E-Documents Sent on the Electronic Invoice FastTab. You can also use Export E-Document as PDF after the document receives a stamp.\n> NOTE\n> Your implementation may differ.\n## Receive payments\nYou can generate a CFDI 4.0 payment receipt with the Pagos 2.0 payment complement for an applied customer payment. Configure electronic invoicing and the relevant SAT payment information before you request a stamp. You can't stamp a payment that is applied to an invoice that doesn't have a stamp.\n> IMPORTANT\n> Business Central supports customer payment receipts with the Pagos 2.0 complement. This support doesn't include withholding receipts.\n### Stamp the payment\n1. Select Search (Alt+Q) in the upper-right corner, enter Customer Ledger Entries, and then choose the related link.\n1. Find a payment that you applied to the electronic invoice, and then select this line.\n1. Choose the Send action, and then specify if you want to also request a digital stamp for the payment.\n## Register export (Comercio Exterior Complement)\nThe Comercio Exterior Complement is an annex to the electronic invoice. It identifies importers and exporters and improves the description of the merchandise that is traded. The Comercio Exterior Complement is a key obligation for taxpayers who export merchandise.\nTo set up Comercio Exterior Complement, follow these steps:\n1. Select Search (Alt+Q) in the upper-right corner, enter General Ledger Setup, and then choose the related link.\n1. On the Electronic Invoice FastTab, in the USD Currency Code field, choose the USD currency you want to use. It can be different than USD. For example, it might be USD-CFDI.\n1. Select Search (Alt+Q) in the upper-right corner, enter Units of Measure, and then choose the related link.\n1. In the SAT Customs Unit field, choose the unit of measure from the SAT Custom Units table for foreign trade operations.\nTo create Comercio Exterior Complement:\n1. Select Search (Alt+Q) in the upper-right corner, enter Sales Invoices, and then choose the related link.\n1. Create a sales invoice with all details ready for export.\n1. In CFDI Export Code, select the code for your export. The code's setup determines whether Foreign Trade is selected. Validation also sets Exchange Rate USD from the currency specified in USD Currency Code on General Ledger Setup.\n1. If you configure a foreign trade invoice, you must fill in the following fields.\n Field|Description\n SAT Address ID|On the Electronic Document FastTab, select the SAT address for the destination. Also assign a SAT address to the invoice's location.\n SAT International Trade Term|On the Electronic Document FastTab, select the relevant SAT Incoterm.\n Exchange Rate USD|On the Electronic Document FastTab, review the USD-to-MXN exchange rate. You can change the value if needed.\n1. After posting the document and getting a stamp, you'll get an XML file with the Comercio Exterior Complement.\n> NOTE\n> If you want to create an invoice for foreign trade, the CFDI Export Code field must be different from 01 because that value is used for domestic invoices only.\n## Related information\n how-to-set-up-electronic-invoicing\n electronic-invoicing\n mexico-local-functionality\nFind free e-learning modules for Business Central here<https://learn.microsoft.com/training/dynamics365/business-central>"}