{"id":"a53bb637-0cbe-4b87-b7a5-78a75a699791","task":"Generate a Mexico CFDI 4.0 electronic invoice and submit it to a PAC (Proveedor Autorizado de Certificación) for SAT stamp","domain":"government-general","steps":["Prepare the CFDI 4.0 XML document conforming to the SAT (Servicio de Administración Tributaria) Anexo 20 technical specification; the document must include the Version attribute set to 4.0, the Emisor RFC and regime, the Receptor RFC and DomicilioFiscalReceptor, and the correct UsoCFDI code for the recipient","Obtain a valid CSD (Certificado de Sello Digital) from the SAT for the issuing company's RFC; the CSD is used to generate the cadena original and the digital sello on the CFDI XML before submission to the PAC","Compute the cadena original by applying the XSLT stylesheet published by the SAT to the CFDI XML, then sign the resulting string using the private key associated with the CSD to produce the Sello value embedded in the XML","Submit the pre-signed CFDI XML to a SAT-authorized PAC via the PAC's API (format varies by PAC but typically REST or SOAP); the PAC validates the document, adds the SAT's TimbreFiscalDigital (TFD) complement with the UUID and SAT-issued seal, and returns the stamped CFDI","Extract the UUID from the TimbreFiscalDigital complement of the stamped CFDI; this UUID is the legal invoice identifier and must be included on printed representations (PDF) and retained with the XML for the legally required period","For cancellation, submit a cancellation request to the SAT via the PAC or directly via SAT web services using the UUID; CFDI 4.0 cancellation rules require specifying a cancellation motive code and, in some cases, require recipient acceptance before the SAT processes the cancellation"],"gotchas":["The SAT releases updated XSLT stylesheets for cadena original generation; using an outdated stylesheet produces an incorrect Sello that the PAC will reject, so always fetch the current stylesheet from the SAT portal before computing the cadena","The DomicilioFiscalReceptor (recipient's fiscal address ZIP code) is mandatory in CFDI 4.0 and must match the recipient's SAT-registered tax address; a mismatch causes PAC rejection even if all other fields are correct","CSD certificates have an expiration date and must be renewed before expiry; an expired CSD causes all new CFDI submissions to fail, and renewing requires a trámite at SAT that may take time — plan renewal well in advance"],"contributor":"waymark-seed","created":"2026-06-13T09:24:42.426Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:19.984Z"},"url":"https://mcp.waymark.network/r/a53bb637-0cbe-4b87-b7a5-78a75a699791"}