The SAT key comes first
In a SAT rejection, message starts with the key: «CFDI40143 - Este RFC del receptor no existe…». code carries 400, the same HTTP status as the response.
When your customer's RFC, name or postal code doesn't match the SAT's records, the API responds HTTP 400 with the error key. Here is every recipient key, how to read it from your system and how to fix it or stamp with the generic RFC.
What the response carries and what to do with it.
In a SAT rejection, message starts with the key: «CFDI40143 - Este RFC del receptor no existe…». code carries 400, the same HTTP status as the response.
If a value doesn't have the shape the SAT schema requires, code is 702 and errors carries the field and the value. That CFDI never reaches the SAT.
CFDI40143 to CFDI40161, plus the keys tied to the generic RFC, with the wording of the SAT error matrix from July 2026.
A folio is deducted only when the SAT stamps. With Folio AUTO, the rejected CFDI's folio goes back to the counter.
The five fields to stamp to XAXX010101000 when your customer can't confirm their data, and what the SAT responds if one is off.
The test PAC checks the recipient against the SAT's list just like production, so you test your fallback with real rejections.
The stamping request is the usual one. What changes is the response: HTTP 400 with the cause in the body, so your system can decide whether to fix the value or stamp with the fallback.
# FD_API=https://sandbox-app.facturadigital.com.mx/api/v5
curl -X POST "$FD_API/invoice/create" \
-H "X-Api-Key: $FD_API_KEY" \
--data-urlencode "json@factura.json"{
"message": "CFDI40143 - Este RFC del receptor no existe en la lista de RFC inscritos no cancelados del SAT.",
"code": 400
}{
"message": "El CFDI no cumple con el esquema del SAT. Se encontró 1 error de validación. Revisa el campo 'errors' para el detalle.",
"code": 702,
"errorType": "cfdi_schema_validation",
"docs": "https://docs.facturadigital.com.mx/errores/702",
"errors": [
{
"severity": "error",
"libxmlCode": 1839,
"message": "Elemento 'Receptor', campo 'Rfc': [faceta 'patrón'] El valor 'ZKA010101JWY' no está aceptado por el validador del SAT regex '[A-Z&Ñ]{3,4}[0-9]{2}(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])[A-Z0-9]{2}[0-9A]'.",
"rawMessage": "Element '{http://www.sat.gob.mx/cfd/4}Receptor', attribute 'Rfc': [facet 'pattern'] The value 'ZKA010101JWY' is not accepted by the pattern '[A-Z&Ñ]{3,4}[0-9]{2}(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])[A-Z0-9]{2}[0-9A]'.",
"element": "Receptor",
"namespace": "http://www.sat.gob.mx/cfd/4",
"field": "Rfc",
"value": "ZKA010101JWY",
"line": 4
}
]
}From the response to a stamped CFDI.
702: the value doesn't have the SAT's shape and errors says which one. 400: the SAT key is the first nine characters of message, such as CFDI40143.
With the same value, the SAT gives the same answer. If you have the right value, fix it; if your customer can't confirm it, switch to the generic RFC.
Rfc XAXX010101000, your customer's name, DomicilioFiscalReceptor equal to LugarExpedicion, RegimenFiscalReceptor 616 and UsoCFDI S01.
Store the rejection key with your customer's data. Their Constancia de Situación Fiscal has the exact RFC, name, postal code and tax regime.
Wording from the SAT's CFDI 4.0 error matrix (July 2026), plus the 702 from our schema check. The SAT tweaks the wording now and then; the key is what stays the same.
The five recipient fields with the generic RFC. With Nombre «PUBLICO EN GENERAL», the SAT treats it as a global invoice and requires InformacionGlobal (CFDI40130); for an invoice to one customer, use their name.
{
"LugarExpedicion": "64000",
"Receptor": {
"Rfc": "XAXX010101000",
"Nombre": "YOUR CUSTOMER NAME",
"DomicilioFiscalReceptor": "64000",
"RegimenFiscalReceptor": "616",
"UsoCFDI": "S01"
}
}Cancel with reasons 01 to 04 and check the cancellation status with the SAT.
Test your rejections and your fallback for free, with the same API v5 as production.
Authentication, endpoints and the three ways to stamp: JSON, XML in Base64 or an XML file.
Something missing? Write to us or check the full reference.
Both arrive with HTTP 400. If code is 702, the value doesn't have the SAT schema's shape and errors gives you the field and the value. If code is 400 and message starts with CFDI followed by five digits, it's a SAT validation and that's the key, for example CFDI40143. Match on the key, not on the text, which the SAT tweaks now and then.
On the SAT portal, in the Anexo 20 documentation: «Matriz de errores CFDI versión 4.0». The table on this page has every Receptor key from the July 2026 version and the keys tied to the generic RFC.
No: as long as the value doesn't change, the SAT gives the same answer. Fix the value or stamp with the generic RFC. The one to retry as is is 5037, when the PAC couldn't be reached and nothing was sent. With 5034 the outcome is uncertain: first look the CFDI up by its series and folio.
Its shape, yes, at no cost: the SAT accepts an RFC that matches the pattern [A-Z&Ñ]{3,4}[0-9]{2}(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])[A-Z0-9]{2}[0-9A]. If it doesn't match, the response is 702 and you can go straight to the generic RFC. Whether the RFC is registered, with that name and that postal code, is confirmed by the SAT when stamping; your customer's Constancia de Situación Fiscal has the exact data.
The SAT's status service doesn't return the cancellation date. We take it from the acknowledgment the SAT issues when you cancel through the API. If the SAT cancelled on receiving the request (estatuscancelacion «Cancelado sin aceptación»), that's the date and it comes in fecha_cancelacion. If it was cancelled later, because your customer accepted («Cancelado con aceptación») or because their time to respond ran out («Plazo vencido»), the SAT doesn't publish that moment: fecha_cancelacion is null and fecha_solicitud_cancelacion holds when you requested it. While your customer hasn't answered («En proceso») you also get only the request date. Both are null if the CFDI was cancelled outside Factura Digital, and in the sandbox, because the SAT doesn't know test CFDIs. Dates are in central Mexico time.
Yes. The test PAC checks the recipient against the SAT's list, so an unregistered RFC, or a name or postal code that doesn't match, responds with the same keys as in production. It's free and your sandbox account is separate from production.
The test PAC checks the recipient just like production. It's free and a rejection uses no folio.