SAT Mexico — Electronic Invoicing (CFDI 4.0)
Overview
Section titled “Overview”The SAT nodes connect your workflows with Mexico’s electronic invoicing (CFDI 4.0). Floogos builds the receipt, computes the original chain, seals it with your CSD and stamps it with a PAC, obtaining the UUID (fiscal folio).
| Node | What it does |
|---|---|
SAT: Stamp CFDI 4.0 (satTimbrarCFDI) | Issues and stamps a CFDI (builds, seals, stamps via PAC) |
SAT: Cancel CFDI (satCancelarCFDI) | Cancels a stamped CFDI (reasons 01-04) |
SAT: Query CFDI status (satConsultarEstatus) | Receipt status at the SAT (Valid/Cancelled) |
SAT: Representation / QR (satRepresentacion) | Generates the printable receipt with QR |
Credential
Section titled “Credential”The nodes use a SAT credential. Create it under Credentials → Add → Mexico SAT / CFDI 4.0 with:
| Field | Description |
|---|---|
| CSD | Your Digital Seal Certificate: a .p12 (base64) or the SAT .cer + .key pair. |
| CSD password | The password protecting the CSD key. |
| RFC and Legal name | Issuer data. |
| Tax regime and Postal code | Regime key (c_RegimenFiscal) and place of issue. |
| PAC + user/password/token | The stamping provider and its credentials. |
| Environment | PAC sandbox or production. |
The CSD seals the receipt; stamping is done by the PAC with your PAC credentials.
The full flow
Section titled “The full flow”-
Prepare the receipt as JSON (type, recipient, concepts). The issuer comes from the credential.
-
Stamp with Stamp CFDI 4.0. Floogos validates catalogs, computes the original chain, seals with the CSD and sends it to the PAC, which returns the UUID.
-
Generate the printable representation with Representation / QR.
-
If needed, cancel with Cancel CFDI or check the status with Query status.
Stamping a CFDI
Section titled “Stamping a CFDI”Node: SAT: Stamp CFDI 4.0. The receipt comes from the cfdi field (JSON) or the input data. Example of an invoice (Ingreso):
{ "serie": "F", "folio": "123", "tipoDeComprobante": "I", "formaPago": "01", "metodoPago": "PUE", "receptor": { "rfc": "XEXX010101000", "nombre": "Cliente SA", "codigoPostal": "64000", "regimenFiscal": "601", "usoCFDI": "G03" }, "conceptos": [ { "claveProdServ": "50111500", "claveUnidad": "H87", "cantidad": 1, "descripcion": "Product", "valorUnitario": 1000, "iva": 0.16, "objetoImp": "02" } ]}Floogos computes the VAT (16%) and totals. The output includes the uuid, the stamped XML and the status.
Receipt types (tipoDeComprobante)
Section titled “Receipt types (tipoDeComprobante)”| Type | Receipt | Notes |
|---|---|---|
| I | Income (invoice) | — |
| E | Egress (credit note) | cfdiRelacionados with the original CFDI UUIDs |
| P | Payment (complement) | For PPD collections; carries the Payments complement |
Payments complement (PPD)
Section titled “Payments complement (PPD)”When you invoice with the PPD payment method (installments or deferred), upon collection you issue a type P CFDI with the Payments complement, which references the receipts being paid:
{ "tipoDeComprobante": "P", "receptor": { "rfc": "XEXX010101000", "codigoPostal": "64000", "regimenFiscal": "601" }, "pago": { "fechaPago": "2026-07-29T12:00:00", "formaDePago": "03", "moneda": "MXN", "documentos": [ { "uuid": "AAAA1111-2222-3333-4444-555566667777", "numParcialidad": 1, "saldoAnterior": 1160, "pagado": 1160 } ] }}Cancelling a CFDI
Section titled “Cancelling a CFDI”Cancel CFDI cancels by UUID with a reason: 01 (errors with relation → requires the replacement invoice UUID), 02 (errors without relation), 03 (not carried out), 04 (nominative in global invoice). Depending on the case, the recipient must accept the cancellation.
Querying status
Section titled “Querying status”Query status queries the SAT service directly and returns whether the receipt is Valid or Cancelled, whether it is cancelable and the cancellation status. RFCs and total are filled from the stored CFDI.
Printable representation (QR)
Section titled “Printable representation (QR)”Representation / QR generates the printable receipt in HTML (exportable to PDF), with the UUID, the seals and the SAT verification QR (which carries the UUID and the last 8 characters of the seal).
Error handling
Section titled “Error handling”| Situation | Retryable | What to do |
|---|---|---|
| PAC rejection | No | The node returns the PAC error (invalid catalog, seal, etc.). Fix the receipt. |
| Invalid catalogs | No | Floogos validates before stamping (RFC, CP, ClaveProdServ, UsoCFDI…) to avoid wasting a stamp. |
| Expired CSD | No | Renew the CSD and update the credential. |
| Network / Timeout | Yes | Transient issue; retried automatically. |
See also
Section titled “See also”- Retry queue (DLQ) — how failed executions are retried.
- HTTP node — for services not covered by these nodes.