Introduction | What's new? | Features | BUY NOW | Download Trial | How to get started | Read the Manual | Troubleshooting | FAQ

Licensed Users | Technical Details | Support | Error Codes | Manuals | Programming interfaces & examples | Java | Other interfaces | Command-line | Checking passwords | Known issues | Update contact details | FirmaSAT On-line Validator | Validador Sites | Legal Bits | Acknowledgments | References | Contact us | Revision History


FirmaSAT is a stand-alone product which enables you to create and read CFD and CFDi digital tax receipts (Comprobantes Fiscal Digital) as specified by the Servicio de Administración Tributaria* (SAT) in Mexico as per the regulations on 16 October 2014. For a brief description see Features. Note that FirmaSAT does not use OpenSSL in any form.

You can run FirmaSAT from the command-line, or call it using the "system" command of another program (for example, using ColdFusion or SQL Server), or call its underlying functions and methods using one of many programming language interfaces.

The supported programming language interfaces are VB2005+, C#, VB6/VBA and C/C++ and New Java interface Java. There is an (unsupported) interface for Delphi and a user-supplied interface to Clarion (thanks, Peter). See also Writing an interface in another programming language.

What's new?

New version 5.4.3: FirmaSAT for Windows, released 28 October 2014, includes support for new Complemento Vehículo Usado supplement. Includes the supplements added in version 5.4.2: See New in the Latest Version.
2014-10-27: Update released to Java interface for FirmaSAT for Windows. See Java interface to FirmaSAT.
FirmaSAT On-line Validator. Our FirmaSAT On-line Validator is an on-line check for Comprobante documents (CFD and CFDi) against the published specifications of the Servicio de Administración Tributaria (SAT). It is similar to the "official" SAT Validator sites, but we think we do it better! Try the FirmaSAT On-line Validator here.

2014-07-03: Logic explainedSee The logic behind the FirmaSAT On-line Validator which explains the logic behind the FirmaSAT On-line Validator and shows the function calls from the FirmaSAT library. Thanks to Rubén Ruvalcaba for the suggestion.

2014-06-12: Our FirmaSAT On-line Validator now produces a QR Code image as specified by SAT (Especificación técnica del código de barras bidimensional, pdf 75kB) and ISO/IEC 18004:2000.


Download the latest Trial Edition of FirmaSAT 5.4.2 for Windows now. Use one of

Either unzip the zip file and run the setup.exe program inside it, or download the exe program directly and run it.

Please note it is a breach of copyright to put a copy of these installation files on another server or to distribute them in any manner except by providing a link to this page.

The Trial Edition is fully-functional. You need administrator privileges to install the program. Please read the licence conditions for the Trial Edition. The trial period is 60 days from the date first installed on your system.

You can purchase a licensed version here. Existing licence holders can download the latest Developer Edition here.

How to get started

  1. Download and install FirmaSAT using the setup.exe file.
  2. Open a command-prompt window in the FirmaSAT directory by using the menu options Start > Programs > FirmaSAT > FirmaSAT-open.

    This opens in the directory %ALLUSERSPROFILE%\FirmaSAT, typically C:\ProgramData\FirmaSAT.

  3. Type FirmaSAT LIBINFO. If correctly installed, the output should be similar to:
    FirmaSAT.exe Version 5.3.0.[32] (32-bit) last updated Jan 26 2014 22:09:24.
    Library diFirmaSAT2:
      Version:  50300
      Module:   C:\Windows\system32\diFirmaSAT2.dll
      Platform: Win32
      Compiled: Jan 26 2014 22:08:23
      Licence:  T
    If you get an error message that says
    the application has failed to start because diFirmaSat2.dll was not found
    then the installation is not correct. Repeat from step 1 above.

    If you get an error message

    'FirmaSAT' is not recognized as an internal or external command, operable program or batch file.
    then you need to set the path to the program which is in the %ProgramFiles%\FirmaSAT directory (or %ProgramFiles(x86)%\FirmaSAT in 64-bit Windows).
    SET PATH=%ProgramFiles%\FirmaSAT;%PATH%
    See the batch file SetupForFirmaSAT.bat provided in the reference files. If you are not using the FirmaSAT-open menu option, then run this first in your command-prompt window to make sure the path is correct. (We find it easier to use the FirmaSAT-open menu option and then CD to the correct folder.)
  4. Run the batch file DoTests.bat. This runs a set of tests on the sample files provided. If these work correctly, then the installation is OK.
    FirmaSAT.exe Version 5.1.2.[33] (32-bit) last updated Sep 22 2012 17:32:09.
    diFirmaSAT2 DLL:
      Version:  512
      Module:   C:\Windows\system32\diFirmaSAT2.dll
      Platform: Win32
      Compiled: Jul 14 2012 14:00:25
      Licence:  T
    >FirmaSAT XMLOK Muestra_v22-signed2012.xml
    >FirmaSAT SIGNXML -s @ -k emisor.key -p 12345678a -c emisor.cer -i Muestra_v22-b
    ase2012.xml -o Muestra_v22-new_signed.xml
    STATUS: 0
    DATETIMECREATED: Tue Sep 25 13:30:00 2012
    >FirmaSAT VERIFYSIG Muestra_v22-new_signed.xml
    >FirmaSAT QUERYCERT -q serialNumber emisor.cer
    >FirmaSAT QUERYCERT -q serialNumber pac.cer
    >FirmaSAT QUERYCERT -q rfc emisor.cer
    >FirmaSAT QUERYCERT -q organizationName emisor.cer
    Servicio de Administración Tributaria

For a more detailed description of the command-line options in FirmaSAT, see the FirmaSAT command-line utility page.

Programming interfaces and examples

The following source code files are all included in the FirmaSAT 5 distribution.

diFirmaSat2.h - interface for C/C++ programmers (and reference for Delphi/FoxPro/Clarion, etc)
diFirmaSat2.h File Reference - a detailed reference to the C/C++ interface to the diFirmaSAT2.dll library (created by Doxygen)
TestFirmaSat.c - some tests using the FirmaSAT C/C++ interface
basFirmaSAT.bas - declaration statements, constants and wrapper functions for VB6/VBA interface
TestFirmaSat.bas - some tests using the FirmaSAT VB6/VBA interface
TestFirmaSat.vb - some tests using the FirmaSAT .NET interface in VB.NET/VB2005+
TestFirmaSat.cs - some tests using the FirmaSAT .NET interface in C#
See Java Interface to FirmaSAT for the latest Java interface and source code.

Interfaces to other programming languages

See Writing an interface in another programming language for advice and examples in how to use FirmaSAT with other programming languages.


You can browse the main manual on-line in HTML form. There is a more detailed table of contents and an index.

Dot-NET programmers using VB.NET or C# can browse the FirmaSAT Namespace manual (uses scripts and frames).

C/C++ programmers can use the C/C++ interface to the diFirmaSat2.dll library with descriptions of all C/C++ functions and constants.

Frequently Asked Questions

Why do strange characters like é appear in my output?
All output (except help and error messages) is in UTF-8. On the command-line console or in an old text editor that is not UTF-8-aware, the accented characters (áéíóúñ) will appear as two "funny" characters. For example, "México" will appear as "México". To fix, change the console font and code page, or output to a text file and use a text editor that can cope with UTF-8.
Why does my XML file not validate?
Probably because the input to the signature function is not correct. There are so many possible errors we cannot list them. Try following the suggestions under Troubleshooting.
How can I check that the password for my key file is valid?
See Checking the key password with FirmaSAT.
How did you create a signed TimbreFiscalDigital (TFD) node?
See How did you create a signed TimbreFiscalDigital (TFD) node? and also How to generate a UUID compliant with RFC 4122
How do you create a Cancelación?
We know of three different ways that a PAC might ask for a cancellation:
  1. Submit a PFX file, which contains your encrypted private key, along with your password! You can create this (at your own risk) with FirmaSAT. See Make a PFX file.
  2. Insert a `llaveCertificado` element in a `Cancelacion` XML document (which is your unencrypted private key!). You can use the GETKEYSTRING command in FirmaSAT to create this (at your own risk). See Get Private Key as a String.
  3. Just released Create a digitally-signed XML-DSIG Cancelacion document. You can do this with the CryptoSys PKI Toolkit. See How to create a SAT Cancelacion document using the CryptoSys PKI Toolkit.
Why is this in English? Why is your Spanish so bad?
Sorry, we're Australian and not Spanish speakers. We have tried our best with what knowledge we have and the help of our trusty assistant, Miss Google Translate. Please provide us with feedback if you think our Spanish is wrong. And, yes, the Monty Python quote in the Help was a deliberate joke (see Monty Python - Dirty Hungarian Phrasebook).

Validador Sites

There are two SAT validator sites for CFD documents:

See the results of uploading some of our test files created with FirmaSAT to the SAT Validador Site.

2014-01-08: The SAT site now works for nomina:Nomina elements. See the result of uploading our test file Muestra_nomina_tfd.xml to the SAT validator site here.

Just released Try our own FirmaSAT On-line Validator which uses the code behind FirmaSAT to provide an independent on-line test of your CFD and CFDi documents.

Updated 2014-06-12: The FirmaSAT On-line Validator now produces a QR image.

Legal Bits and Disclaimer



  1. Modificación al Anexo 20 de la Resolución Miscelánea Fiscal para 2006, Servicio de Administración Tributaria, Mexico, 22 June 2006, <ftp-link-original>.
  2. Modificación al Anexo 20 de la Resolución Miscelánea Fiscal para 2009, Servicio de Administración Tributaria, Mexico (PDF document created 2009-06-11), <ftp-link-original>.
  3. Anteproyecto de Modificación al Anexo 20 de la Resolución Miscelánea Fiscal para 2010. Draft Amendment to Annex 20 of the Omnibus 2010 Tax, dated 27 July 2010, released 3 September 2010, <ftp-link-original>.
  4. Anexo_Folio_3-2.pdf. Modificación al Anexo 20 de la Resolución Miscelánea Fiscal para 2011, (draft PDF document created 2011-11-18).
  5. Ajustes-Anexo-20.pdf. Proyecto de reforma al CFF. Impactos al Anexo 20: Estándar del CFDI/CFD, (PDF document created 2011-11-03).
  6. ANEXO 20 de la Resolución Miscelánea Fiscal para 2012 (PDF 1.21 MB), publicada el 28 de diciembre de 2011.

Contact us

For more information about FirmaSAT, please send us a message.

Revision History

This page last updated 29 October 2014