/api/invoice/received/checkCheck received invoice
Compares the received invoice with the purchase order and with what the engine expects (interstate rate, TIPI, ICMS-ST, CST × CRT, CFOP × operation, cClassTrib) and returns the discrepancies. The invoice must have been synchronized with the full XML; the route reads the stored XML and does not query the tax authority.
The route does not send any event. The decision is the customer's, who uses /api/invoice/manifest.
Required headers
tokenstring | string | Company token; CNPJ, state and tax regime are read from the company's registration |
signstring | string | MD5 signature: md5(token + "/api/invoice/received/check" + body without line breaks + timestamp) |
timestampstring | string | Unix timestamp in seconds, 5-minute tolerance |
Body
chave*string | string | 44-digit key |
finalidadestring | string | Default purpose of the items (defines whether ST is expected) |
itens[]array | array | |
nItemint | int | Invoice item |
finalidadestring | string | Item purpose |
itens[].number / string | number / string | Purchase order data |
* Required field.
Checks
| Code | Check |
|---|---|
destinatario_divergente | Recipient CNPJ or IE differs from the token company |
nota_cancelada | Invoice cancelled or denied |
ncm_divergente | NCM differs from the order |
quantidade_divergente / valor_divergente | Difference above the tolerance (default BRL 0.05 per item and 0.01% on the total; configurable in /api/company/edit) |
cfop_incompativel | Intrastate CFOP in an interstate operation, or the opposite |
cst_incompativel | CST/CSOSN incompatible with the issuer's CRT |
aliquota_icms_divergente | Interstate rate differs from the expected one (4%, 7% or 12%, by origin) |
ipi_divergente | Itemized IPI differs from TIPI |
st_divergente | ST expected and not withheld, or withheld without being expected. Expected ST below the per-item tolerance is not reported |
ibscbs_divergente | Invalid IBS/CBS classification, or missing group in a regular-regime invoice issued from 08/03/2026 (Ato Conjunto RFB/CGIBS 4/2026); Simples Nacional only from 2027. Regular regime = CRT 3; CRT 2 (above the sub-limit) follows the Simples rule |
Result: aprovada, aprovada_com_avisos, divergente or pendente (check not performed; reason in pendencias). Each discrepancy has codigo, nItem, esperado, encontrado and mensagem.
In the Brazilian system the recipient cannot reject the invoice or ask the tax authority to have it reissued. It can register a recipient event:
- 210220 — Unknown operation: when it does not recognize the purchase;
- 210240 — Operation not carried out: when the purchase existed but the goods were not received or were refused.
The event does not cancel the invoice. Afterwards, regularization is done by the supplier (cancellation, while within the deadline, or an entry NF-e when the goods return) or by the customer itself (return NF-e, when the goods already entered inventory, for example a product rejected at inspection).
Deadline: 90 days from the invoice authorization for 210200, 210220 and 210240, for invoices authorized from 06/01/2026 (Ajuste SINIEF 14/2026; NT 2020.001 v1.60); before that, 180 days. The response returns prazo_manifestacao with the deadline; when there is a discrepancy, the warnings prazo_manifestacao_proximo (up to 10 days) and prazo_manifestacao_expirado show the urgency.
Common errors
| Message | Cause |
|---|---|
| empresa não encontrada para este token / 该token未找到企业 | The token is not linked to a registered company |
| Corpo da requisição inválido: envie um objeto JSON / 请求体无效,请传入 JSON 对象 | The body is not a valid JSON object |
| Falha na conferência da nota. Tente novamente mais tarde. / 发票核对失败,请稍后重试 | Internal calculation failure; the request can be retried later |
Examples
# sign = md5(token + path + body + timestamp) # Template generated from the endpoint path; replace the placeholders curl -X POST "https://api.tffiscal.com/api/invoice/received/check" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN" \ -d @body.json
{
"chave": "41261112345678000195550010000000101000000105",
"finalidade": "revenda",
"itens": [
{ "nItem": 1, "quantidade": 1, "valor_unitario": 1000.00, "ncm": "84713012" }
]
}
{
"success": true,
"data": {
"chave": "41261112345678000195550010000000101000000105",
"resultado": "divergente",
"emitente": { "CNPJ": "12345678000195", "xNome": "FORNECEDOR", "UF": "PR", "CRT": 3 },
"nota": { "nNF": "10", "serie": "1", "dhEmi": "2026-11-05T10:00:00", "vNF": 1050.00, "total_itens": 1 },
"tolerancias": { "item": 0.05, "total_percentual": 0.01 },
"divergencias": [
{ "codigo": "aliquota_icms_divergente", "nItem": 1, "esperado": "12", "encontrado": "7",
"mensagem": "Alíquota interestadual diferente da esperada para a origem 0." }
],
"avisos": [],
"pendencias": [],
"prazo_manifestacao": { "eventos": [210200, 210220, 210240], "contado_de": "autorizacao", "data_referencia": "2026-11-05",
"dias": 90, "data_limite": "2027-02-03", "dias_restantes": 83, "expirado": false }
}
}