Errors on the SAT validator site


We have found two errors on the Servicio de Administración Tributaria (SAT) Mexico validator site for Comprobante Fiscal Digital (CFD) documents. We claim that results from the SAT validator sites for certain XML inputs are wrong according to their own government-approved regulations.

SAT Validador Sites

There are two validator sites for CFD documents:

Both problems involve the SAT validator site wrongly inserting extra pipe "|" symbols into the cadena original that should not be there.

Error Number 1

We have already shown one example of an error on our troubleshooting page. If you include an optional attribute with an empty value, for example, aduana="" in the InformacionAduanera element, it will cause an error on the SAT validator site. The SAT validator will include an incorrect pair of pipe symbols "||" inside the piped string (cadena original). For example,

...2010-09-15||1.00|CILINDRO HIDRAULICO|62003.09|62003.09...

We say that this is wrong and contravenes their own regulations. This will lead to valid signatures being shown incorrectly as invalid.

But at least you can overcome this problem by deleting the field entirely in your XML file. This is not the case for error number 2.

Error Number 2

This sample version 3.0 CFDI document jla1v3.xml [zipped] contains a detallista element inside the Complemento element and has a valid XML structure.

The SAT validator site says that the signature (sello) is invalid, but then displays what it thinks should be the cadena original [text].

cadena original is wrong

Look at the extra pipe symbols at the end. These are wrong. There should be exactly two symbols to denote the end of string. The extra three symbols are wrong.

...|22.07|AMC8.1|4500536101|0000000000000|||||
                                         ^^^

And if the cadena original is wrong, then the sello will also be wrong. So if you follow the rules correctly to create the cadena original and the sello, then the validator site will show incorrectly that your signature is invalid.

We say that our construction of the cadena original is correct and that our sello in the XML file is also correct, according to the official SAT regulations.

Even worse, we are aware of at least one PAC who seems to be making the same mistake and generating signatures that show as valid on the SAT validator but are incorrect according to the SAT's own regulations. As any lawyer will tell you, if there is a difference between the results according to government-approved regulations and an "advisory" program on a web site, the government-approved regulations always win.

More technical details

There are 9 nodes from the detallista element that need to be included in the cadena original, in the following order:
 Parent nodeChild nodeOptional?Value in this example
1detallistadocumentStructureVersionNo"AMC8.1"
2 orderIdentification referenceIdentificationYes"4500536101"
3 orderIdentification ReferenceDateYes-
4 buyer glnYes"0000000000000"
5 seller glnYes-
6 seller alternatePartyIdentificationYes-
7 totalAmount AmountYes-
8 TotalAllowanceCharge specialServicesTypeYes-
9 TotalAllowanceCharge AmountYes-
Reference: Page 71 of Complemento Detallista [Detallista.pdf, 668 kB | pp70-72 only, 47 kB | <ftp-link-original>].

All of these nodes are optional except for the first. If the optional node is missing or empty then the rule (from p.70) is

6. Los datos opcionales, cuando no existan, no aparecerán expresados en la cadena original y no tendrán delimitador alguno.

which translates roughly to English as "Optional data, where none exists, will not appear in the chain expressed original and will not have any delimiter".

So we say that the cadena original should end as follows:
...|22.07|AMC8.1|4500536101|0000000000000||
and that the SAT validator site is wrong.

Somehow the validator software is incorrectly adding three empty nodes out of the 6 missing optional nodes in the above XML document. It's not even being consistent and adding all six!

Unlike the first error above, this problem cannot be avoided by adjusting your XML file. Admittedly, the information in this particular detallista element is not very useful, but its structure is valid according to the XSD. It nevertheless shows that the software behind the SAT validator site is wrong.

Remember this is a site that had an invalid security certificate for over a year, and this is an organization that released only one sample test file for its new CFDI format and it was full of errors.

Update January 2012

SAT seems to have solved its problems with the new versions 2.2 and 3.2 introduced in January 2012 and which will replace versions 2.0 and 3.0 in June 2012. They have solved this by not issuing any example files and by not producing a validation site. At least they can't be proved wrong!

Contact

To contact us please send us a message.

This page first published by DI Management 5 June 2011. Last updated 25 January 2012.