Skip to content
Concepts

FISCALISTO / API

SAT rejections

What each CFDI40 code SAT or the PAC rejects an invoice with means, and what to change in your request so it's stamped.

Open in ChatGPTOpen in ClaudeOpen in Cursor

When the PAC or SAT rejects an invoice, the API returns 422 invoice_rejected: sat_code carries SAT's rule code (from Anexo 20's validation matrix), message what it said in plain words and doc_url the section that explains that code. The invoice becomes rejected and used no timbre: correct it and send it again with another Idempotency-Key.

Fiscalisto checks many rules before sending it to the PAC and returns invoice_invalid with the field (param) to change, without waiting for SAT. And since Fiscalisto calculates totals, taxes and rounding, rejections for sums or decimals shouldn't reach you: if one does, it's our error.

{
  "error": {
    "type": "invoice_error",
    "code": "invoice_rejected",
    "sat_code": "CFDI40145",
    "message": "El nombre del cliente no coincide con su RFC en el SAT…",
    "doc_url": "https://fiscalisto.com/docs/api/rechazos-del-sat#cfdi40145",
    "request_id": "req_…"
  }
}

To avoid the rejection: validate the customer's data with POST /v1/tax_ids/validate, and review the rules in What an invoice carries. Most rejections are the customer's data: their name, postal code or regime aren't the ones SAT has for that RFC.

Every code

The explanation of each code, with what to change in your request, is on the Spanish page, one section per code: doc_url in the error links straight to it. The codes are SAT's and the section anchors are the code in lowercase (#cfdi40145), so you can build the link from sat_code on your own.

Was this page helpful?

On this page