TF Fiscal
Documentation

NFC-e

Cancel by substitution

Cancels the normal NFC-e that was duplicated by an offline contingency NFC-e for the same sale.

POST/openapi/v2/empresas/{empresaId}/nfce/{nfceId}/cancelar-substituicao
Requires the token, timestamp and sign signature headers, see Authentication.

Typical case: the normal invoice was sent, SEFAZ did not answer and the till issued an offline invoice; later both ended up valid. This endpoint cancels the normal invoice identified by nfceId and points to the offline invoice that replaces it. The platform already settles most of these cases on its own when SEFAZ is back; use this endpoint for special cases. Deadline: 168 hours after authorization.

Path parameters

empresaId*
stringIssuing company identifier
nfceId*
stringNFC-e identifier

* Required field

Request body

chaveAcessoSubstituta*
stringKey of the replacing invoice
justificativa*
stringCancellation reason

* Required field

200
Accepted; no body. The result arrives by webhook and shows in the query.

No response body

Registered at SEFAZ: the invoice becomes Cancelada and the nfce.canceled webhook arrives. Rejected by SEFAZ: the invoice stays valid, nfce.cancel_rejected arrives and the query shows the reason in motivoStatus. Payloads are in Webhooks.