CryptoSys Home > FirmaSAT > Notes on CFDi v3.3

Notes on CFDi v3.3


  1. The attribute names in CFD v3.3 all begin with capital letters, so sello in v3.2 becomes Sello in v3.3. Be careful to change the attribute argument in any calls to GetXMLAttribute.
    FirmaSAT ATTRIBUTE -d -a sello -e Comprobante -i cfdv33-signed-tfd.xml
    Attribute=[sello] Element=[Comprobante]
    Error code -21: Match not found/No se pudo encontrar datos coincidente
    
    FirmaSAT ATTRIBUTE -d -a Sello -e Comprobante -i cfdv33-signed-tfd.xml
    Nm+AyKSlay8Lg5Z++uSHQNLC6FUGB9KInjk9cm0I+n4Jwxwp2SwdEaRP6hTH+f2veoqm6Z
    ...aFplBE3LQrPda+DjM2296Mje0mvoX+KtQpHAUOZoCg==
    
  2. The TimbreFiscalDigital element is required to be version 1.1 for CFD v3.3. The data for the QR image is different, too.
  3. The hash algorithm in a v3.3 signature is required to be SHA-256 (the signature algorithm is sha256WithRSAEncryption also known as RSA-SHA256). In FirmaSAT, the hash algorithm used to form digests and signatures is chosen automatically. So SHA-256 is used automatically for v3.3 signatures, and SHA-1 is used for v3.2. Do not use the options to force a particular hash algorithm.
  4. The NoCertificado node is now included in the pipe string (cadena original) and must be completed before computing the digest or signing the document. This must match the actual certificate used for signing. In v3.2 you could use 00000000000000000000 as a placeholder: this no longer applies with v3.3.
  5. The ValidateXMLDocument (XMLOK) functions do not attempt to lookup exact matches in the ridiculously huge catCFDI.xsd catalog. The XMLOK functions will check that the XML is well-formed, has a valid XML structure, and that the data types and patterns are approximately valid. This may give false negatives compared to a strict XSD parser. It will check that, say, a c_ClaveProdServ type consists of exactly 8 digits (i.e. the regex pattern [0-9]{8}) and will give an error if the value is not of that form. However, it does not check that, say, 01010101 is in the catalog list and 01010111 is not. There are about 53,000 items in that particular list!
  6. FirmaSAT is designed to produce digital signatures and analyze XML documents for correct structure and missing attributes. It does not carry out any further checks such as those in the guidelines Guia_comple_pagos.pdf or GuíaAnexo20.pdf. You must carry out any other checks independently.
  7. We have made some example CFDi v3.3 XML documents​ according to what we consider to be the correct form. The values in them have been chosen at random solely to test the XML structure and formation of the correct pipe string (cadena original). If you think we have made a mistake, please contact us.
  8. Coping with CFDi v3.3:

    Coping

Contact us

For more information or to comment on this page please send us a message.

This page last updated 10 September 2025