SatRepresentacion
Description
Section titled “Description”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.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | SAT credential |
| uuid | text | No | UUID of the stamped CFDI to render (retrieved from the database) |
| cfdi | json | No | CFDI as JSON to preview (if no uuid is provided) |
Credentials
Section titled “Credentials”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
Output
Section titled “Output”{ "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..."}Usage Example
Section titled “Usage Example”Representation of an already-stamped CFDI
Section titled “Representation of an already-stamped CFDI”{ "credentials_id": "cred-sat-prod", "uuid": "A1B2C3D4-E5F6-4A5B-9C8D-1234567890AB"}Preview before stamping
Section titled “Preview before stamping”{ "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); withoutuuid, 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.
Related Nodes
Section titled “Related Nodes”- SatTimbrarCFDI - Stamp a CFDI
- SatConsultarEstatus - Check whether a CFDI is valid or cancelled