CryptoSys Home > FirmaSAT > CFD v3.3 Examples

CFD v3.3 Examples


Here are some example XML documents for Anexo 20 Versión 3.3​ (CFDi v3.3) as specified by the Servicio de Administración Tributaria (SAT) in Mexico. The analysis and signing was carried out using FirmaSAT. UpdatedUpdated 2017-06-07 to reflect latest specifications as amended by SAT in May 2017.

All the XML documents below have been validated against the XSD files published by SAT. The values used for the attributes are nonsense ones picked at random just for testing purposes, but they are still valid XML. (For example, we have not used any of the guidelines in GuíaAnexo20.pdf or Guia_comple_pagos.pdf, but that does not matter for the purposes of creating the cadena original and the sello.)

We assert that each pipe-string (cadena original) provided here is correct according to the Secuencia de Formación in the PDF specification files published by SAT.

DocumentCadena originalSHA-256 digest of cadena originalComments
cfdv33-base.xml cfdv33-base-cadena.txt 0fc5c2312270ad4e5e12b757faa3934dc223cd83292d2d52d96fced494ec7c85  
cfdv33-min.xml cfdv33-min-cadena.txt 260f75ca87b417b75f9edda28742f9e65abc02e85ed91edb0450434fe9ded8c7 Just the minimum required fields, ma'am
cfdv33-signed-tfd.xml cfdv33-signed-tfd-cadena.txt 0fc5c2312270ad4e5e12b757faa3934dc223cd83292d2d52d96fced494ec7c85 With tfd:TimbreFiscalDigitalv11
cfdv33-pagos10.xml cfdv33-pagos10-cadena.txt 67ce4748deba81a716da88b860ed601f24183741f96562d54685b3d6af98b581 Example of complemento Pagos10. See Note 4 and Note 5.
cfdv33-pagos10-minok.xml cfdv33-pagos10-minok-cadena.txt e5028916cf4206f2583b0a048cff80f9428fb64a7ddfda0070798eb7a78a042e Minimum fields required for a complemento Pagos10. See Note 6
cfdv33-cce11.xml cfdv33-cce11-cadena.txt 987a565981162ae4d0c6bddcb970b43fb7c8035767926081a980f393e61429c7 Example of complemento ComercioExterior11
cfdv33-cce11-min.xml cfdv33-cce11-min-cadena.txt 392a4d6fc8fc6e5541278c6fc4a005c7c80e1a1ddfad3ef7099b8ac811edd03a Minimum fields required for ComercioExterior11
cfdv33-nomina12.xml cfdv33-nomina12-cadena.txt 9ad440359cca4de1939c8ecb78af390a9c31f995edf27c3ab3b671e65f1b0cca Example of complemento nomina12
cfdv33-detallista.xml cfdv33-detallista-cadena.txt 8c07cad30e00e8cbeaf3ab4dd94bb5a90059ac415ba704d0dd343e85256b0b70 Example of complemento detallista. See Note 7.
cfdv33-detallista-min.xml cfdv33-detallista-min-cadena.txt ab6b054e406c84942dab8b7e3f49019a2bc7bc6485c2a9f4bd50ba58a88ed022 Minimum fields required for detallista
cfdv33-iedu.xml cfdv33-iedu-cadena.txt 974cd994940811bac1d239833b5e2157a9d73bf8dc9130489bf886be62337b07 Example of complemento concepto iedu

If you think there is an error here, please send us a message, preferably showing what you consider the correct cadena original should be.

For a detailed explanation, see How to compose the cadena original for a CFD v3.3 document.

Notes

  1. The file cfdv33-signed-tfd.xml is the file cfdv33-base.xml signed by the holder of the certificate with serial number 40001000000300000337. The corresponding private key has password 12345678a.
  2. The TimbreFiscalDigital element in the file cfdv33-signed-tfd.xml has been signed by the holder of the certificate with serial number 20001000000100005761. The cadena original de un timbre (pipe-string) has digest value 32e6e39ab862e1445cb5dcd3418f16d79308680734ff6e87642a44f60a402f97. You can extract the pipe-string using
    FirmaSAT PIPESTRING -f cfdv33-signed-tfd.xml
    
    and compute its digest value with
    FirmaSAT FORMDIGEST -f cfdv33-signed-tfd.xml
    
  3. There were errors in the XSLT file cadenaoriginal_3_3.xslt which were quietly fixed on 19 May 2017. The latest XSLT file (May 2017) now produces an identical cadena original to ours, which matches the Secuencia de Formación in cfdv33.pdf.
  4. The problem with Pagos10 was fixed on 31 May 2017 when a new version of Pagos10.pdf was released with the Secuencia de Elementos a Integrar en la Cadena Original now matching the output from Pagos10.xslt. The result above for cfdv33-pagos10.xml has been amended to reflect this change.
  5. The Pagos10 example includes all possible nodes including the Impuestos because it is valid XML according to the XSD and we want to test that the cadena original is created correctly. Having defined this complicated node in the XSD specification, the guidelines then say "Nodo: Impuestos Este nodo no debe existir". Go figure! Thanks to Jacob Levine and all the others who have pointed this out.
  6. The minimal example for Pagos10 has the minimum required fields required for a valid CFDiv3.3 document with Pagos10. Thanks to Luis Barriga for constructing this example.
  7. 2017-07-14: We removed the examples with a detallista complemento. Apparently this is no longer used with CFDi v3.3.
    2017-09-30: No, it's back now and included for CFDiv3.3 as of 18 September 2017. See Complementos para Factura - Nota: Aplica para factura versión 3.2 y 3.3. No changes apparently to the detallista specification from 2009, so no changes required for FirmaSAT (we never actually removed the feature).

Reference documents

Links to published SAT documents:

Contact us

To contact us or comment on this page, please send us a message.

This page first published 2 May 2017. Last updated 10 September 2025.