# NFE-397

Source: https://xmlvalid.com/rules/NFE-397

> Rejeição: Parâmetro do QR-Code divergente da Nota Fiscal [Param: chave de acesso …].

- Level: error
- Rule sets: SEFAZ authorisation rules of NF-e 4.00 MOC 7.0 Anexo I, NTs up to 2026.010
- Context: `nfe:infNFe`
- Test: `empty($qr) or $qr[1] = substring(@Id, 4)`

> Rejeição: Parâmetro do QR-Code divergente da Nota Fiscal [Param: tipo de ambiente …, tpAmb …].

- Level: error
- Rule sets: SEFAZ authorisation rules of NF-e 4.00 MOC 7.0 Anexo I, NTs up to 2026.010
- Context: `nfe:infNFe`
- Test: `count($qr) lt 3 or $qr[3] = string($ide/nfe:tpAmb)`

In English: A parameter of the QR code (the access key or the environment) differs from the NF-e.

Validate a document against these rules: https://xmlvalid.com/validate
