{"id":"a8fbf8ff-0961-49d5-ab41-d68798b8cff9","task":"Implement Brazil NF-e (Nota Fiscal Eletrônica) emission via a SEFAZ webservice for a product invoice","domain":"government-general","steps":["Obtain a digital certificate (e-CNPJ or NF-e certificate) from an ICP-Brasil accredited certification authority; the certificate is required for signing NF-e XML documents and authenticating to SEFAZ (Secretaria da Fazenda) web services","Generate the NF-e XML document conforming to the current NF-e technical manual schema (leiaute NF-e) published by SEFAZ; key sections include ide (identification), emit (emitter), dest (recipient), det (products/services), total (totals), and transp (transport data)","Sign the NF-e XML using the e-CNPJ certificate with XML-DSig; SEFAZ web services reject unsigned or incorrectly signed documents — the signature must be applied to the infNFe element","Submit the signed NF-e via SOAP to the appropriate SEFAZ web service endpoint for the emitter's state (each Brazilian state has its own SEFAZ endpoint, and SEFAZ Nacional handles contingency); use the NfeAutorizacao operation for new emissions","Parse the SEFAZ asynchronous or synchronous response (cStat code and xMotivo description); a cStat of 100 indicates authorization, and the response contains the authorized NF-e with the Protocolo de Autorização (authorization protocol number) appended","Generate the DANFE (Documento Auxiliar da Nota Fiscal Eletrônica) from the authorized NF-e XML to accompany physical goods in transit; the DANFE must include the chave de acesso (44-digit access key) and the SEFAZ authorization protocol"],"gotchas":["Each Brazilian state operates its own SEFAZ infrastructure with potentially different technical manual versions and web service endpoints; an NF-e valid for one state's SEFAZ may fail schema validation in another state, and state-specific addenda (complementary fields) vary","NF-e XML schemas and technical manuals are updated by SEFAZ periodically; submitters must track NT (Nota Técnica) publications from SEFAZ to implement mandatory schema changes by the effective date, as SEFAZ enforces new versions on a fixed cutover date","The chave de acesso (44-digit access key) is computed from specific NF-e fields including CNPJ, date, serial number, sequential number, and a check digit; an incorrectly computed chave causes SEFAZ rejection and the NF-e cannot be resubmitted with the same number"],"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:23.292Z"},"url":"https://mcp.waymark.network/r/a8fbf8ff-0961-49d5-ab41-d68798b8cff9"}