NF-e SP
The NF-e SP connector integrates with the SEFAZ (Secretaria da Fazenda) of Sao Paulo for issuing and managing NF-e (Nota Fiscal Eletronica) documents, following the national NF-e layout version 4.00.
Setup
To use this connector, you need a valid A1 Digital Certificate issued by an ICP-Brasil certification authority.
| Field | Description |
|---|---|
| Environment | Execution environment: producao or homologacao. |
| Certificate (PFX/P12) | Your digital certificate file in Base64. |
| Certificate Password | The password to unlock the digital certificate. |
Auto-computed Fields
The connector automatically generates the following fields:
| Field | Description |
|---|---|
| Access Key (id) | Computed from c_uf, dh_emi, cnpj, mod, serie, n_nf, tp_emis, and c_nf. |
| Check Digit (c_dv) | Computed via modulo 11 from the access key. |
Important: If you don't provide the
idfield in your JSON, the connector generates the access key automatically. We recommend not passingidmanually to avoid inconsistencies.
Available Actions
nfe_autorizacao
Issues an NF-e. Receives a JSON payload with the invoice data and returns the authorization protocol.
nfe_consulta_protocolo
Queries the status of an NF-e by its access key.
nfe_status_servico
Checks if the SEFAZ service is available.
recepcao_evento
Sends events such as cancellation and correction letters.
nfe_inutilizacao
Invalidates a range of NF-e numbers.
nfe_distribuicao_dfe
Retrieves fiscal documents distributed to the CNPJ.
XML Structure
The connector automatically generates the digitally signed NF-e XML. The structure follows the official XSD schemas:
- Namespace:
http://www.portalfiscal.inf.br/nfe - Root element:
<enviNFe> - Signed element:
<infNFe>(referenced by theIdattribute) - Algorithms: RSA-SHA1 for signature, SHA1 for digest
Important Notes
- Test in homologacao first — Set
environment: "homologacao"to test before going to production. - A1 Certificate — The connector accepts PFX/P12 certificates in Base64. Make sure the certificate is valid and contains the private key.
- TLS 1.2 — Communication with SEFAZ uses TLS 1.2 exclusively.