Skip to content

SatRepresentacion

Generates the printable representation of a CFDI 4.0 with the UUID, seals and the SAT verification QR code, ready to convert to PDF and hand to the customer. If a uuid is provided, the node retrieves the already-stamped CFDI (with its real seals) from the database; otherwise it builds a preview from a CFDI JSON, useful for reviewing the layout before stamping.

FieldTypeRequiredDescription
credentials_idcredentialsYesSAT credential
uuidtextNoUUID of the stamped CFDI to render (retrieved from the database)
cfdijsonNoCFDI as JSON to preview (if no uuid is provided)

Requires a sat credential type with:

  • Issuer RFC, legal name, fiscal regime and postal code (used to fill in the issuer data on the representation)
  • CSD (required on the credential, although not used to generate the representation)
  • Environment: test or production
{
"success": true,
"uuid": "A1B2C3D4-E5F6-4A5B-9C8D-1234567890AB",
"html": "Printable HTML with the CFDI data and the embedded QR",
"qrUrl": "https://verificacfdi.facturaelectronica.sat.gob.mx/default.aspx?...",
"qrImage": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
{
"credentials_id": "cred-sat-prod",
"uuid": "A1B2C3D4-E5F6-4A5B-9C8D-1234567890AB"
}
{
"credentials_id": "cred-sat-prod",
"cfdi": {
"tipoDeComprobante": "I",
"serie": "FA",
"folio": "1001",
"receptor": { "rfc": "XAXX010101000", "nombre": "PUBLICO EN GENERAL" },
"conceptos": [
{ "claveProdServ": "81112100", "descripcion": "Consulting service", "cantidad": 1, "claveUnidad": "E48", "valorUnitario": 1000.00 }
]
}
}
  • With uuid, the representation includes the SAT’s real seals (Digital Tax Stamp); without uuid, the preview has no fiscal validity.
  • The returned HTML is meant to be converted to PDF with an HTML-to-PDF node before emailing it out.
  • The QR follows the SAT’s official verification format, with the UUID, issuer and recipient RFCs, and the total.