- Servicio de Administración Tributaria (SAT) Mexico
- Comprobantes Fiscal Digital (CFD) versions 2.0 and 2.2
- Comprobante Fiscal Digital por Internet (CFDI) versions 3.0 and 3.2
- Timbre Fiscal Digital
- FirmaSAT utility
What's new? |
BUY NOW |
Download Trial |
How to get started |
Read the Manual |
Licensed Users |
Technical Details |
Error Codes |
Programming interfaces & examples |
Other interfaces |
Checking passwords |
Known issues |
Update contact details |
SAT Validador Site |
Legal Bits |
Contact us |
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 for January 2014.
For a brief description see Features.
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
There is an (unsupported) interface for Delphi and a
user-supplied interface to Clarion (thanks, Peter).
Writing an interface in another programming language.
New version 5.3: FirmaSAT
released 28 January 2014, is an upgrade to FirmaSAT
It includes support for new 2014 supplements nomina
New in the Latest Version
Licensed users of version 5.2 can download the latest
5.3 for free from the Licensed users page
using their existing Licence ID.
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
Download the latest Trial Edition of FirmaSAT 5.3 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
Download and install FirmaSAT using the setup.exe file.
- Open a command-prompt window in the FirmaSAT directory by using the menu options
Start > Programs > FirmaSAT > FirmaSAT-open.
This opens in the directory
- If you are using Windows 8 with its "wonderful" user-friendly interface and no Start button, then
double-click on the FirmaSAT desktop icon instead and then click on FirmaSAT-open.
FirmaSAT LIBINFO. If correctly installed,
the output should be similar to:
If you get an error message that says
FirmaSAT.exe Version 5.3.0. (32-bit) last updated Jan 26 2014 22:09:24.
Compiled: Jan 26 2014 22:08:23
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(x86)%\FirmaSAT in 64-bit Windows).
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.)
- 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.
DOING TESTS WITH FIRMASAT...
FirmaSAT.exe Version 5.1.2. (32-bit) last updated Sep 22 2012 17:32:09.
Compiled: Jul 14 2012 14:00:25
CHECK THAT XML STRUCTURE IS OK...
>FirmaSAT XMLOK Muestra_v22-signed2012.xml
SIGN AN XML FILE...
>FirmaSAT SIGNXML -s @ -k emisor.key -p 12345678a -c emisor.cer -i Muestra_v22-b
ase2012.xml -o Muestra_v22-new_signed.xml
DATETIMECREATED: Tue Sep 25 13:30:00 2012
VERIFY THAT THE SIGNATURE IN THE NEW SIGNED FILE WE CREATED IS OK...
>FirmaSAT VERIFYSIG Muestra_v22-new_signed.xml
USE QUERYCERT COMMAND...
>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#
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".
The solution is always to 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:
- 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.
- 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.
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).
SAT Validador Site
There are two validator sites for CFD documents:
See the results of uploading some of our test files created with FirmaSAT to the
SAT Validador Site.
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.
Try our own FirmaSAT On-line Validator
which uses the code behind
to provide an independent on-line test of your CFD and CFDi documents.
SAT Validador Site Java Security problems
When you go to the SAT validator site and Java starts up, you get this "Unknown publisher" error.
Running applications by UNKNOWN publishers will be blocked in a future release because it is potentially unsafe and a security risk.
If you know someone in the technical department at SAT, please tell them to fix it.
Legal Bits and Disclaimer
We provide our FirmaSAT software as an independent third party
to users in Mexico and elsewhere who wish to create digitally-signed CFD and CFDi documents according to the published specifications of the
Servicio de Administración Tributaria (SAT).
We have no connection whatsoever with or any endorsement from the Servicio de Administración Tributaria in Mexico.
We are not a Proveedor Autorizado de Certificación (PAC).
We just provide software that works.
Use FirmaSAT at your own risk.
Please make your own checks to ensure it does what you expect before purchase.
It is provided 'as is' with no warranties.
If you do not accept the licence conditions, then do not use it.
We do not offer to provide a free upgrade if the S.A.T. specifications change.
FirmaSAT uses code from 'Parsifal XML Parser'
copyright (c) 2002-2005 Toni Uusitalo released to the public domain 2002-11-15
Thanks to Toni for making his excellent software available and for his help in helping us use it properly.
Thanks to the guys at NullSoft for their
Nullsoft Scriptable Install System.
Thanks in particular to Guillermo Dewey, Alvaro Cervantes, Victor Ibarra, Jesús Vargas, Firmo Lopez,
Marco Osorio, Gustavo Acosta, Jason Jones and Alonso Cervantes Farfán for their feedback and help on this project.
Modificación al Anexo 20 de la
Resolución Miscelánea Fiscal para 2006,
Servicio de Administración Tributaria, Mexico, 22 June 2006,
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),
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,
Modificación al Anexo 20 de la Resolución Miscelánea Fiscal para 2011,
(draft PDF document created 2011-11-18).
Proyecto de reforma al CFF. Impactos al Anexo 20: Estándar del CFDI/CFD,
(PDF document created 2011-11-03).
- ANEXO 20 de la Resolución Miscelánea Fiscal para 2012 (PDF 1.21 MB),
publicada el 28 de diciembre de 2011.
For more information about FirmaSAT,
please send us a message.
If you have a problem with your purchase from Kagi, or a question on payment methods, please contact
This page last updated 3 February 2014
- 27 January 2014: Released
FirmaSAT version 5.3.
- 4 January 2014: Released
FirmaSAT version 5.2.2 with support for the latest supplement for the
sale of vehicles (
- 29 December 2013: Released
FirmaSAT version 5.2.1 with update for recent changes (as published 2013-12-18 by SAT) for payroll
- 13 December 2013: Released
FirmaSAT version 5.2 for Windows with support for payroll
- 17 September 2013: Released FirmaSAT version 5.1.4.
A recompilation of all Windows executables with minor fixes for obscure XML issues.
- 22 July 2013: Released
a version of
- 20 July 2013: Released
a version of
FirmaSAT for the
- 25 September 2012: Released FirmaSAT version 5.1.2a
with minor update to the FirmaSAT.exe command-line utility to fix occasional problem displaying Windows OEM characters with -w option;
updates to manual; and revised programming tests to use latest test files from SAT.
- 14 July 2012: Released FirmaSAT version 5.1.2
to fix error with
XMLOK/SAT_ValidateXml function for Complemento Concepto VentaVehiculos.
- 11 May 2012: Released FirmaSAT version 5.1.1
with fix for Comprobante/@SerieFolioFiscalOrig node in SAT version 3.2, erronously omitted in preliminary regulations issued by SAT.
- 23 March 2012: Released FirmaSAT version 5.1
with new features.
- 7 January 2012: Released FirmaSAT version 5.0.1
with fix for Emisor/@Nombre node in new versions 2.2 and 3.2.
- 29 December 2011: Released FirmaSAT version 5.0.0.
- 14 July 2011: Released FirmaSAT version 4.1 with fix for
UTF-8 byte-order mark.
- 5 July 2011: Released FirmaSAT version 4.0.0.
This is now a self-contained stand-alone program no longer dependent on CryptoSys PKI.
- 5 January 2011: Updated .NET interface library
diFirmaSatNet.dll to fix display problems with UTF-8 characters
Sat.GetXmlAttribute when using VB.NET and C#.
No changes were made to the core DLL or EXE files dated 22/23 December 2010. Signatures are not affected by this update.
Updated test XML files with 2011 dates.
- 25 December 2010: Released FirmaSAT version 3.0.0.
- 2 November 2010: Released FirmaSAT version 2.1.0
with the option to use the SHA-1 algorithm in signatures.
- 12 August 2010: Added 64-bit executables to setup program and improved installation process.
- 20 May 2010: Upgraded to FirmaSAT version 2.0.2 with various fixes.
- 13 January 2010: Released FirmaSAT version 2.0.0.
- 8 August 2007: Minor fixes to version 1.0.
- 6 August 2007: First published FirmaSAT version 1.0.0.