FirmaSAT


Introduction | Features | BUY NOW | Download Trial | How to get started | Read the Manual | Troubleshooting | FAQ

Licensed Users | Technical Details | Error Codes | Manual index | Programming interfaces & examples | Other interfaces | Test certificates | Known issues | 2012 changes | SAT Validador Site | Legal Bits | Acknowledgments | References | Contact us | Revision History

Introduction

FirmaSAT 5 is a stand-alone product which enables you to create and read digital tax receipts (Comprobantes Fiscal Digital) as specified by the Servicio de Administración Tributaria* (SAT) in Mexico. FirmaSAT works with CFD versions 2.0 and 2.2 and CFDI versions 3.0 and 3.2 SAT XML files as per the regulations for January 2012. See New in the Latest Version.

29 December 2011: A new upgrade FirmaSAT 5 is now available. This includes the changes for CFD version 2.2 and CFDi version 3.2 plus the new supplements (complementos), ready for 2012. See New in the Latest Version.

We have sent out an email to all registered licence holders with a discount coupon. Please make sure we have your latest email address and that your spam filters are set to allow messages from the domain di-mgt.com.au to make sure you get your discount coupon.
Pricing for FirmaSAT 5
New purchasers:Full price of US$249
Purchasers of FirmaSAT 4 (cost US$199) after 1 November 2011: Upgrade for Free
Holders of FirmaSAT 4.xUpgrade for $149 ($100 discount)
Holders of FirmaSAT 3.xUpgrade for $199 ($50 discount)
Holders of FirmaSAT 2.xUpgrade for $229 ($20 discount)
Note that FirmaSAT 4 and 5 no longer require the CryptoSys PKI Toolkit.

7 January 2012: Update 5.0.1 released to fix bug with missing Emisor/@Nombre node for cadena original in new versions 2.2 and 3.2. Sorry.

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++. 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.

Download

Download the latest Trial Edition of FirmaSAT 5 now. Use 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 files on another server or to distribute in any other manner.

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 LIBINFO
    FirmaSAT Version 5.0.0 (32-bit) last updated Dec 29 2011 19:08:59.
    diFirmaSAT2 DLL:
      Version:  501
      Module:   C:\Windows\system32\diFirmaSAT2.dll
      Platform: Win32
      Compiled: Jan  7 2012 13:22:45
      Licence:  D
    
    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.
    C:\ProgramData\FirmaSAT>dotests
    
    DOING TESTS WITH FIRMASAT...
    
    >FirmaSAT LIBINFO
    ...
    >FirmaSAT ATTRIBUTE -d -a sello -e Comprobante -i Muestra_v2_signed2011.xml
    Attribute=[sello] Element=[Comprobante]
    kvR2+fcKKvkAeyI4m0bfew3qzlAfJO0IUXdi8VXU8WYUjFf7fw2p2l75nR31GlkCGsnlA58mxOlbTWeq
    JvvtiQvBcU40PGG2S+7dPd5X2RtyP3MLKy7vKawJgcisppeVFN/PQ06i/d+n1lpmBcsHRSjzds5byoI+
    +ENaPklwChA=
    
    >FirmaSAT NUMBERCERT Muestra_v2_signed2011.xml
    30001000000100000800
    
    >FirmaSAT DATENOTAFTER aaa010101aaa_CSD_01.cer
    2012-07-29T16:58:40Z
    
    >FirmaSAT DATENOTAFTER -b aaa010101aaa_CSD_01.cer
    2010-07-30T16:58:40Z
    ...
    SIGN A V3 (CFDI) DOCUMENT THEN VERIFY IT...
    
    >FirmaSAT SIGNXML -s @ -k aaa010101aaa_csd_01.key -p a0123456789 -c aaa010101aaa
    _csd_01.cer -i ejemplo_v3_base2011.xml -o ejemplo_v3-new_signed.xml
    STATUS: 0
    ERRORDESCRIPTION: OK
    DATETIMECREATED: Tue Jul 05 18:02:00 2011
    
    >FirmaSAT VERIFYSIG ejemplo_v3-new_signed.xml
    OK
    ...
    CREATE CADENA ORIGINAL DEL TIMBRE FISCAL DIGITAL...
    
    >FirmaSAT PIPESTRING -f ejemplo_v3_tfd.xml
    ||1.0|ad662d33-6934-459c-a128-bdf0393e0f44|2010-03-06T20:40:10|AyiGH1muK3mMdxL70
    5tSpShxswu0OyGkg9L4AP03HQ5yFSaKJToZ5qffr8Th4+u5t0TWbYsZtBWKaO+ZfT/nDPXe4qtFgi8o+
    YFQ7fqQwdRuxBZhWeuCfoB+PfmxIGTSh6Eo6EIo3kSnogNu/1FD7/Npdg5om/7fkuypsgHQ8lw=|3000
    1000000100000801||
    ALL DONE.
    

Programming interfaces and examples

These files are all included in the FirmaSAT 5 distribution.

C/C++
diFirmaSat2.h - interface for C/C++ programmers (and reference for Delphi/FoxPro/Clarion, etc)
TestFirmaSat.c - some tests using the FirmaSAT C/C++ interface
VB6/VBA
basFirmaSAT.bas - declaration statements, constants and wrapper functions for VB6/VBA interface
TestFirmaSat.bas - some tests using the FirmaSAT VB6/VBA interface
VB.NET/VB2005+
TestFirmaSat.vb - some tests using the FirmaSAT .NET interface in VB.NET/VB2005+
C#
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.

Test certificates

2010-08-23: SAT has issued some new test certificates and keys to replace the ones that expired 21 August 2010. These new certificates are valid until July 2012. You can also download via FTP from ftp://ftp2.sat.gob.mx/asistencia_ftp/publicaciones/solcedi/Cer_Sellos.zip (use FireFTP with Firefox).

NOTE: these will expire in July this year and then all the tests in the latest FirmaSAT 5 distribution will fail!

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.
But I bought CryptoSys PKI and downloaded FirmaSAT in 2007/8/9 - where is my licence?
Your licence for CryptoSys PKI is still valid. The Licence ID should be 12 characters long and begin with 'F'. This will enable you download the latest version of CryptoSys PKI, not FirmaSAT. We used to give away the earlier version 1 of FirmaSAT for free. That free version is superseded and out of date. You need to purchase a separate licence for the latest version of FirmaSAT.
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:

2012-01-01: There are still no official SAT validator sites for the new versions 2.2 and 3.2!

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

Please read our analysis of the sample v3 file ejemplo1 cfdv3.xml, dated 21 September 2010 provided by SAT and why we think it's wrong.

Known Issues

2012-01-07:
There was an error in the initial release version 5.0.0 of FirmaSAT with the Emisor/@nombre node in the cadena original for the new SAT templates 2.2 and 3.2. This has been fixed in version 5.0.1 released 7 January 2012.
2012-01-01:
FirmaSAT 5 introduces much stricter tests for XML validation, including checking that nodes are the correct data type and of permissible length. If you get an error like
Error code -28: XML restriction is violated/XML restricción es violada: 
Bad attribute/atributo mal [Comprobante/@noCertificado]: 
'' is too short/es demasiado corto, minimum length/longitud mínima=20
then see the page ValidateXml and XMLOK in FirmaSAT 5, which explains how to solve it.
2011-07-12:
SAT have updated both their CFD and CFDi validator sites with stricter requirements for UTF-8 files. If you do not have a UTF-8 byte-order mark (BOM) at the beginning of your XML file, you will get this error:
Resumen del análisis del XML

Se presentaron errores al leer el comprobante: xxxxxxxxx.xml
Error: CFD no codificado en: UTF-8.
Codificado en: ANSI (No Unicode).

More on this ridiculous requirement at UTF-8 byte-order mark problem .

Anyway, this has been addressed in FirmaSAT 4.1.0, released 14 July 2011. XML files created by the SignXML functions will now include this BOM. There are also new functions and methods provided to add the BOM to an existing file (any file, not just an XML document, provided it actually is UTF-8). See the SAT_FixBOM function, the Sat.FixBom Method, and the UTF8FIX command.

Thanks to Oscar Escamilla and Marco Osorio for bringing this to our attention.

2011-06-05:
There is a problem on the SAT validator site with missing, optional nodes in a detallista element. See Errors on the SAT validator site.

Changes in 2012 - Latest News

Information received 11 January 2012Rough translation to English

Cambios a realizar para CFD:

Los siguientes atributos han sido agregados y/o modificados al schema de facturación electrónica CFD:

version="2.2": Lleva ahora un valor fijo de "2.2" (y no 2.1 como se había propuesto originalmente).

TipoCambio="[TipoDeCambio]" y Moneda="[Moneda]": Dos nuevos atributos OPCIONALES para indicar que la factura está expresada en otra moneda distinta de Pesos Mexicanos. MUY IMPORTANTE: El uso de estos campos NO ES INFORMATIVO, es para efectos de cálculo, por lo que para efectos de impuestos el SAT tomará la cantidad expresada en el atributo TipoCambio y lo multiplicará por todas las cantidades numéricas que indiquen precio, subtotal, total e impuestos. Para efectos del informe mensual, este deberá ser expresado EN PESOS, es decir los importes expresado en el informe deben de ser multiplicados por la cantida expresada en el atributo TipoCambio.

metodoDePago="[MetodoDePago]": En la versión anterior este atributo estaba marcado como OPCIONAL, en la versión 2.2 este atributo es OBLIGATORIO.

LugarExpedicion="[LugarDeExpedicion]": Nuevo atributo OBLIGATORIO, es independiente del nodo ExpedidoEn de los datos del emisor. Este atributo tiene que llenarse por ejemplo con: "México, D.F.", "Guadalajara, Jalisco", etc.

NumCtaPago="[NumeroDeCuentaDePago]": Nuevo atributo OPCIONAL, para indicar POR LO MENOS los 4 últimos dígitos la cuenta bancaria (de cheques, ahorro, tarjeta de crédito o débito o por transferencia SPEI) de la cual se retiran los fondos para pagar el importe de la factura electrónica. El cliente deberá informar al emisor el número de cuenta de la cual se retiran los fondos para el pago de la factura. En caso de que el pago sea en efectivo o bien que no se pueda establecer el origen de los fondos se deberá poner la leyenda "No identificado".

Para pagos parciales se han incluido 4 atributos nuevos que son OPCIONALES: FolioFiscalOrig="[FolioFiscalOriginal]", SerieFolioFiscalOrig="[SerieFolioFiscalOriginal]", FechaFolioFiscalOrig="[FechaFolioFiscalOriginal]" y MontoFolioFiscalOrig="[MontoFolioFiscalOriginal]"

En nodo EMISOR, el nodo DomicilioFiscal ahora es opcional.

En el nodo EMISOR se agrega un nuevo nodo RegimenFiscal OBLIGATORIO para indicar el régimen fiscal en que cotiza el contribuyente puede repertirse tantas veces como regimenes fiscales tenga el contribuyente.

Finalmente dentro del nodo Concepto, el atributo unidad="[ConceptoUnidad]" ahora es OBLIGATORIO y deberá contener un valor para unidad de medida aplicable de acuerdo al Sistema General de Unidades de medida de la Ley Federal Sobre Metrología y Normalización y las demás aceptadas por la Secretaría de Economia.

Changes to be made for CFD:

The following attributes have been added and / or modified to electronic billing schema CFD:

version = "2.2" now takes a fixed value of "2.2" (not 2.1 as originally proposed).

TipoCambio = "[TipoDeCambio]" and Currency = "[Currency]": Two new optional attributes to indicate that the bill is expressed in a currency other than Mexican pesos. VERY IMPORTANT: The use of these fields are not informed, is for purposes of calculating, so for tax purposes the SAT take the amount specified in the attribute TipoCambio and all quantities multiplied by numbers indicating price, subtotal, total and taxes. For monthly reporting purposes, it must be expressed in pesos, ie the amounts stated in the report should be multiplied by the quantities expressed in the attribute TipoCambio.

metodoDePago = "[MetodoDePago]": In the previous version this attribute was marked as optional in version 2.2 this attribute is MANDATORY.

LugarExpedicion = "[LugarDeExpedicion]": new mandatory attribute is independent of node ExpedidoEn of data of the Emisor. This attribute must be filled for example with: "Mexico City", "Guadalajara, Jalisco", etc..

NumCtaPago = "[NumeroDeCuentaDePago]": New Attribute OPTIONAL, to indicate at least the last 4 digits of bank account (checking, savings, credit or debit card or by transfer SPEI) from which funds are withdrawn to pay the electronic invoice amount. The customer must notify the issuer of the account number where funds are withdrawn to pay the bill. If payment is in cash or may not establish the source of funds should put the words "not identified".

For partial payments have included 4 new attributes are OPTIONAL: FolioFiscalOrig = "[FolioFiscalOriginal]," SerieFolioFiscalOrig = "[SerieFolioFiscalOriginal]," FechaFolioFiscalOrig = "[FechaFolioFiscalOriginal]" and MontoFolioFiscalOrig = "[MontoFolioFiscalOriginal]"

In node EMISOR, the node DomicilioFiscal is now optional.

In the node EMISOR a new node is added to indicate MANDATORY RegimenFiscal tax that the taxpayer listed may be repeated as many times as the taxpayer has tax regimes.

Finally, within the Concepto node, the attribute unit = "[ConceptoUnidad]" is now mandatory and must contain a value for unit of measure applicable under the General System of Units of measurement of the Federal Law on Metrology and Standardization and the other accepted the Ministry of Economy.

Cambios a realizar para CFDI:

Los cambios a realizar para CFDI son similares a los de CFD:

version="3.2": Lleva ahora un valor fijo de "3.2" (y no 3.1 como se había propuesto originalmente).

metodoDePago="[MetodoDePago]": En la versión anterior este atributo estaba marcado como OPCIONAL, en la versión 2.2 este atributo es OBLIGATORIO.

LugarExpedicion="[LugarDeExpedicion]": Nuevo atributo OBLIGATORIO, es independiente del nodo ExpedidoEn de los datos del emisor. Este atributo tiene que llenarse por ejemplo con: "México, D.F.", "Guadalajara, Jalisco", etc.

NumCtaPago="[NumeroDeCuentaDePago]": Nuevo atributo OPCIONAL, para indicar POR LO MENOS los 4 últimos dígitos la cuenta bancaria (de cheques, ahorro, tarjeta de crédito o débito o por transferencia SPEI) de la cual se retiran los fondos para pagar el importe de la factura electrónica. El cliente deberá informar al emisor el número de cuenta de la cual se retiran los fondos para el pago de la factura. En caso de que el pago sea en efectivo o bien que no se pueda establecer el origen de los fondos se deberá por la leyenda "No identificado".

Para pagos parciales se han incluido 4 atributos nuevos que son OPCIONALES: FolioFiscalOrig="[FolioFiscalOriginal]", SerieFolioFiscalOrig="[SerieFolioFiscalOriginal]", FechaFolioFiscalOrig="[FechaFolioFiscalOriginal]" y MontoFolioFiscalOrig="[MontoFolioFiscalOriginal]"

En nodo EMISOR, el nodo DomicilioFiscal ahora es opcional.

En el nodo EMISOR se agrega un nuevo nodo RegimenFiscal OBLIGATORIO para indicar el régimen fiscal en que cotiza el contribuyente puede repertirse tantas veces como regimenes fiscales tenga el contribuyente.

Finalmente dentro del nodo Concepto, el atributo unidad="[ConceptoUnidad]" ahora es OBLIGATORIO y deberá contener un valor para unidad de medida aplicable de acuerdo al Sistema General de Unidades de medida de la Ley Federal Sobre Metrología y Normalización y las demás aceptadas por la Secretaría de Economia.

Changes to be made for CFDI:

The changes to make to CFDI are similar to those of CFD:

version = "3.2": Take now a fixed value of "3.2" (not 3.1 as originally proposed).

metodoDePago = "[MetodoDePago]": In the previous version this attribute was marked as optional in version 2.2 this attribute is MANDATORY.

LugarExpedicion = "[LugarDeExpedicion]": new mandatory attribute is independent of node ExpedidoEn of data of the Emisor. This attribute must be filled for example with: "Mexico City", "Guadalajara, Jalisco", etc..

NumCtaPago = "[NumeroDeCuentaDePago]": New Attribute OPTIONAL, to indicate at least the last 4 digits of bank account (checking, savings, credit or debit card or by transfer SPEI) from which funds are withdrawn to pay the electronic invoice amount. The customer must notify the issuer of the account number where funds are withdrawn to pay the bill. If payment is in cash or may not establish the origin of funds by the legend should be "unidentified".

For partial payments have included 4 new attributes are OPTIONAL: FolioFiscalOrig = "[FolioFiscalOriginal]," SerieFolioFiscalOrig = "[SerieFolioFiscalOriginal]," FechaFolioFiscalOrig = "[FechaFolioFiscalOriginal]" and MontoFolioFiscalOrig = "[MontoFolioFiscalOriginal]"

In node EMISOR, the node DomicilioFiscal is now optional.

In the node EMISOR a new node is added to indicate MANDATORY RegimenFiscal tax that the taxpayer listed may be repeated as many times as the taxpayer has tax regimes.

Finally, within the concept node, the attribute unit = "[ConceptoUnidad]" is now mandatory and must contain a value for unit of measure applicable under the General System of Units of measurement of the Federal Law on Metrology and Standardization and the other accepted the Ministry of Economy.

Legal Bits

Acknowledgments

References

  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.

If you have a problem with your purchase from Kagi, or a question on payment methods, please contact Kagi directly.

Revision History

This page last updated 25 January 2012