As of July 1, 2017 the tax administration system (SAT) will ask to all of those business or persons that emit en electronic invoice use the new CFDI in it’s version 3.3 which should be filled according to the validation rules stipulated by the tax administration system in it’s documentation Anexo 20 de la Resolución Miscelánea Fiscal vigente.
The electronic invoice (CFDI) will continue keeping it’s format XML with UTF-8 encoding just as is handle nowadays. The main difference will be the data structure that is going yo be used to make the validation of the electronic invoice through the XML Schema definition (XSD) besides of the extra validations that its going to be applied according to the annex 20 of the current miscellaneous tax resolution.
New catalogs were added to the CFDI 3.3 which will be used to differents fields that are going to be available inside the electronic invoice.
The electronic invoice (CFDI) in Mexico es an digital tax receipt implemented by the fiscal authority in our country, attached to the standards defined by the tax administration system (SAT). The SAT defines which lineament are the suitable to emit those types of documents according to the needs that they think are indispensable for the correct handling of taxes.
The digital tax stamps are used to emit sw CFDI that are provided through certified business by the SAT commonly called authorized certification provider (PACs) just like us, SW Sapien.
The XML is an adaption of the SGML (Standard Generalized Markup Language), a language that allow us the organization and labelled of documents, in the electronic invoicing the XML are used as communication protocol by which the information to be invoiced is sent.
The issuing of an XML or the stamped is just use a digital signature that is generated given the information that our electronic invoice has to keep safe our information and make sure that can’t get modified after the creation of itself. To this process some algorithms of encryption are used to prevent the manipulation of our XML.
It is a function that transforms a message into a seemingly random illegible series, using an encryption key that might be reverted (it means to get the original message) just by those who know that key. through the encryption, the private information might be sent publicly in internet with no risk it all that others can access to it..
A hash function is a method to generate keys that represent unicollat to a document or data set. It is an mathematical operation that maker on this data set of any length and it’s exit is a fingerprint which size is fixed e independent of the dimension of the original documento. The content is illegible.
SHA-256 is a hash of 64 hexadecimals digits used to sign text documents or files which is almost unique and with a fixed size of 256 bits (32 bytes). A hash it’s calculated in one way and it cannot be decodified again that’s why it’s encryption is high..
New stamp CFDI 3.3
in this new version a new type of encryption (Hash) will be used to stamp inside the electronic invoice, SHA-2 256 encryption is going to be used because is more safer that its predecessor (SHA-1).
Structure of an CFDI 3.3
Some validations are made through it’s XML Schema Definition (XSD) and others are made according to the Anexo 20 de la Resolución Miscelánea Fiscal vigente.
How to make a valid CFDI 3.3?
To make a valid electronic invoiced must comply the following:
- the technical guidelines for the generation of XML files specified by the W3C consortium, established in www.w3.org
- The additional validation rules established in the Anexo 20 de la Resolución Miscelánea Fiscal vigente
- The additional validation rules established in each complement that is integrated in the XML file
- The particularly validation rules published in the Anexo 20 de la Resolución Miscelánea Fiscal vigente
The rules are applicable in the order mentioned before. If a rule has a redefinition in a subsequent rule, must comply just the last rule. Additionally the taxpayer must be subject to current tax provisions.
The XML document must be expressed under the UTF-8 coding standard and particularly must use escape sequences when the specified values inside of the file attributes exist some of the following special cases.
- In the case of & the sequence & must be used
- In the case of “ the sequence " must be used
- In the case of < the sequence < must be used
- In the case of > the sequence > must be used
- In the case of ‘ the sequence ' must be used
To represent nombre=“Juan & José & “Niño”” we will use nombre=”Juan & José &"Niño"”
To be validated, the electronic invoice must be referenced to the tax digital stamp namespace and make reference to the validation of itself to the path published by the SAT where the XSD schema object of this section is located.(http://www.sat.gob.mx/sitio_internet/cfd/3/cfdv33.xsd) the following way.
– Use of declaration must be used: : xmlns:cfdi=”http://www.sat.gob.mx/cfd/3“