Validate CFDI Service

Validate a CFDI version 3.3 or 4.0: integrity, digital signature and structure according to the SAT standard. It includes the SAT rules and error matrix, validation of the applicable complements, confirmation that the invoice exists in the SAT database and the tax status query (active, canceled or not found).

✓Before you start
1Get a Bearer Token with your SW username and password. We recommend using an infinite token.
2Have the CFDI XML (version 3.3 or 4.0) you want to validate at hand.
❗ Important: Retenciones CFDI (the Mexican withholding and payments-information tax document) and their complements are not validated.
💡 Note: if you validate a real XML in the Testing environment, the SAT status will come back as not found, because the query is made against that environment. To avoid it, use the validatestatus=false parameter.

URL´s

Choose the environment: the examples on this page update with your selection.

🔗 Endpoint

Copy

Request Example


    
💡 Note: these examples are the direct REST call. You can build your own requests.

Response

If you skip the status check, the statusSat, statusCodeSat, isCancelable and statusCancelation fields return No Aplica. The original strings are trimmed with … in the examples. The API texts (message, messageDetail, status values) are returned in Spanish, so the examples show them as you will receive them.


    

📋 Possible response values

In the successful response (200), the detail fields can return the following values.

Field
Possible values
detail[].section
CFDI40 - Validacion de Estructura Validations for the structure.
CFDI40 - Validaciones Proveedor Comprobante ( CFDI40 ) Validations for the CFDI.
CFDI40 - Validaciones Proveedor ComplementoConcepto Validations for the concepto complements.
CFDI40 - Validaciones Proveedor Complemento pago20:Pagos Optional: it only appears if the XML has a complement. In this case, a CFDI with a payments complement, and this section holds the validations for that complement.
detail[].detail[].type
0 Error.
1 Information.
2 Warning.
detail[].detail[].typeValue
Information Everything is correct.
Error There is a structure error or a validation error.
Warning There is an observation that does not invalidate the CFDI. For example, an XML stamped with a CSD that was valid at the time of stamping but is no longer valid today.
detail[].detail[].message
OK Everything is correct.
If there is an error, it returns the validation code.
detail[].detail[].messageDetail
If the section validation is correct, it says so. If there is an error, it returns a more detailed description.

The SAT status fields come from the SAT Status Query service, and their values are returned as they are in this response.

Field
Possible values
statusCodeSat
S - Comprobante obtenido satisfactoriamente
N - 602 Invoice not found. This response code appears when the UUID of the invoice is not found in the SAT database.
statusSat
VigenteCanceladoNo Encontrado
isCancelable
Cancelable con aceptaciónCancelable sin aceptaciónNo cancelable
statusCancelation
(null)En procesoPlazo vencidoSolicitud rechazadaCancelado sin aceptaciónCancelado con aceptación

In SW® we strive to be the best for You, wich is why your opinion is very important. Please help us by rating this article and leaving your comments.

How useful was this post?

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Updated on octubre 29, 2026

Related Articles