Invopop’s SAT Mexico provider allows you to generate and issue CFDI documents in Mexico. This component uses SW Sapien, an Authorised Certification Provider (PAC) that Invopop partners with, to sign and stamp CFDI documents for the Mexican tax authority (SAT).

This guide will walk you through the steps necessary to set up a workflow that will let you issue GOBL documents in Mexico using the SAT Mexico provider.

Please refer to the GOBL’s Mexico Tax Regime docs to learn about the specifics of Mexican GOBL documents and to get examples.

The library that transforms GOBL into CFDI documents is also publicly available as an open-source project and can be found at github.com/invopop/gobl.cfdi.

Sandbox Setup

SW Sapien provides a sandbox environment where you can test the issuance of CFDI documents end-to-end without any tax or legal consequences. If you wish to use this environment, simply select it when configuring the SAT Mexico provider (as explained in the next section) and then use one of the test RFCs provided by SW Sapien, whose CSDs we have already uploaded to the sandbox environment, as the supplier of your GOBL documents.

Workflow Setup

When issuing documents in Mexico, the SAT Mexico provider will convert the GOBL documents into CFDI documents. It will then sign and stamp them using the SW Sapien services.

This is how you can set up the workflow to issue GOBL documents in Mexico for one or multiple suppliers:

  1. Sign in to the Invopop console at https://console.invopop.com.
  2. If you have more than one company, you can just select the one you want to use in the top left corner.
  3. Go to “Workflows”, create a new workflow and give it a name.
  4. Add a new “Step” and select “Sequence Enumerator” from the list. Edit the step configuration and select “-Dynamic-” as the sequence to use. This will automatically create sequences for each supplier and series code you use in your invoices. These sequences will use the parameters (prefix, suffix, start…) that you set here.
    We recommend this configuration as it allows you to issue documents for multiple suppliers and series without having to create a new series and workflow for each one. However, please note that you can also do as in the Invoice Guide if you want all documents processed by this workflow (regardless of document type or supplier) to use the same series code and sequence.
  5. Add a new “Step” and select “SAT Mexico” from the list. Then, edit the configuration of the step, select the environment you want to use (production or sandbox), and whether you want to generate a PDF representation of the CFDI using the SW Sapien service.
    The standard Invopop PDF Generator could be used as the next step in the workflow, but please note that the PDF generated won’t currently meet the SAT requirements for a valid CFDI representation. Therefore, if you need to provide customers with a PDF copy, you’ll probably want to check the “Generate PDF” option here.

Enable suppliers to issue documents

Now, you’ll need to enable suppliers to issue documents using this workflow. For each supplier (i.e., each company or individual with an RFC that will issue invoices), you will need to:

Step 1: Upload the supplier’s CSD to the PAC

The first step is to upload the supplier’s CSD (Certificado de Sello Digital) to the PAC (Proveedor Autorizado de Certificación). This is the certificate that will be used to sign your CFDI documents. It must be associated with the supplier’s RFC (tax code ID) that you’ll use in your GOBL documents.

The CSD comprises two files (with extensions .cer and .key) and a password. Here there’s a guide on how a company or individual can obtain one.

This step will be automated in the future. For now, you (or the supplier) will need to contact us via Slack or support@invopop.com to upload the CSD to the PAC.

Step 2: Authorise the PAC to issue CFDI documents

Although it’s not strictly necessary to do it before you start issuing invoices, we strongly recommend that, at this point, the supplier signs the manifest document that explicitly authorises the PAC to sign, stamp and send CFDIs to the SAT on their behalf.

The supplier’s legal representative will need their FIEL certificate (Firma Electrónica). Go to https://cliente.smartweb.com.mx/Public/ManifestSigning2019 and follow the instructions there.