User:Jbrolland1980/sandbox

Situation
Today in Mexico, all economic entities, including individuals, must log all costs and revenues to the administration central data repository. The consequence is that the Mexican tax administration archives about five billion invoices per month. Invoices are retained for five years, and are accessible within the tax administration portal for all that time. Whenever the invoice is paid, the tax administration must be notified. If the invoice is changed or cancelled, the tax administration must also be notified.

Timeline
The implementation of electronic invoicing in Mexico goes back to 1997. That year, a group of companies decided to create an Electronic Invoicing Committee and, after performing all necessary tests, came up with a model that would serve to create the legal framework on which would govern electronic invoicing in the country. Since then, the Mexican government through its Tax Authority (SAT) has been one of the pioneers in the implementation and development of electronic invoicing at a global level, serving as an example to countries around the world that are in full phase of implementation of its own system.

Mexico was the second country on the American continent in developing a mandatory, comprehensive and government-specified model of electronic invoicing, behind Chile. By all measures, Mexico, along with countries such as Brazil or Chile, is the world leader in electronic invoicing.

Mexico was also the first country to introduce the figure of an Authorized Certification Provider (PAC), whose function is to validate the tax documents, prior to archiving to the Tax Authority. The Mexican government constantly evolves its electronic invoicing scheme to improve it and get a model efficient for both the taxpayer and the tax authority. The objective of these changes is, on the one hand, to improve user experience for both taxpayers parties while using the electronic invoice and, on the other, to correct some of the inefficiencies that became apparent over the years.

The CFDI standard
The acronym CFDI stands for Comprobante Fiscal Digitalizado en el Internet (Digital Tax Receipt over the Internet), a billing scheme whose mandatory in Mexico became effective on January 1, 2014. As of today, it is mandatory for all Mexican companies The CFDI model is not new, but dates back to January 2011 when it replaced the previous scheme CFD (Digital Tax Receipt) that was retired as of December 31, 2013.

The main difference between these two schemes was the incorporation of the figure of the PAC which is in charge of validating the invoices before they are sent to the tax authority.

Interesting features of the CFDI standard
Double entry. As shown in Figure 3 First of the 11 required XML schema as specified by the SAT, the SAT XML record includes both the tax ID (RFC) of the buyer and the supplier. As the amount specified in the invoice is the only valid before the SAT, the double entry system in essence nullifies any attempt at tax fraud.





The hash. As the invoice is emitted, an encoded hash is generated and stored, assigning it a unique reference that gives validity to the invoice. That way, the information contained in a CFDI cannot be manipulated or modified without being detected. The CFDI issuer cannot deny having generated it. The CFDI recipient cannot deny having received it. Each CFDI has a registered unique identifier granted by a PAC which makes it unique and binding to its recipient and to the tax administration. This number is called the UUID. The UUID number becomes extremely important in subsequent steps as it is the one that enables the various derived data models.



Validation. The CFDI model simplifies the process of issuance of tax receipts to the taxpayer, since it is a third party that is in charge to validate the documents and report them to the SAT. The PAC reviews the invoice and validates it if it meets all requirements. The identity of the issuer of the hash and of the PAC can be verified by reading the hash. The validation performed by the PAC becomes binding.

The PACs. The PAC certifies and records the hash stamped on the invoices, before the issuer sends the invoice to the SAT and its customer. In 2010, Edicom became the first PAC authorized by the SAT, in charge of validating and managing electronic invoices, withholdings and payroll. In essence, a PAC assumes the tasks that the SAT portal should, but with additional features and improved user experience.

It is absolutely possible to hash invoices directly in the SAT portal for free. So why would tax payers accept to sum up the PAC fee? They have high levels of information security and data encryption, as well as processes that guarantee absolute traceability and availability of the processed information through robust and redundant infrastructure, which the SAT portal needs not have. They provide CFDI services to taxpayers, such as archiving, search, classifications, etc. They team up with tax specialists, accountants and technologists. They bring together the mass of specialists in regulatory and technical issues and they often add as an advocacy group when the SAT misbehaves.

Among the obligations that every PAC must guarantee:

●       They must keep confidential the information of the CFDI

●       Return to the taxpayer the previously validated CFDI, with assigned folio and with the digital stamp of the SAT.

●       Send to SAT immediately a copy of the CFDI once they have been certified.

●       Have at the disposal of the SAT at all times, the possibility of it making remote or local access to the databases where the information and copies of the CFDI that have been certified in the last three months are protected.

●       Provide the issuing taxpayer with a tool to consult the details of their certified CFDI, which complies with the specifications established by the SAT.

●       Keep the certified CFDIs, for a term of three months, in an electronic, optical or any other technology medium, even when the legal relationship under which the CFDI was certified does not subsist.

●       Manage, control and safeguard, through its CFDI certification system, the digital seal certificates provided by the SAT to perform their function.

●       Communicate in writing via email to their clients in the event that they temporarily suspend their services.

The PCRDD. The figure of the PCRDD (Provider of Certification of Receipt of Digital Documents) was first introduced in the Resolution Fiscal Miscellany for 2015. That year, the SAT appointed Edicom the first PCRDD. The PCRDD is an external provider responsible for validating digital documents, certifying them and sending them in a safe way to the SAT. One of the differences with PACs is the obligation to validate not only the syntax but also the content. The main objective of this status above PAC is to offer more advanced solutions for companies and, eventually, simplify electronic communication procedures of taxpayers with the tax administration that currently require a tedious manual process.

With this initiative, it is therefore possible to distribute the burden on third parties who act as "Electronic windows", unifying in one single solution all the procedures to be carried out with the tax administration. Thus, the service availability, but it is also given to companies the possibility of having most advanced technological solutions, customizable or integrated with the company’s systems.

Imposed data model. The issuance of electronic invoices requires the generation of a specific XML, whose construction and emission are subject to a series of steps and obligations to which every company or individual must adhere. Even the description of the product or service has to follow the classification defined by the government. This means that the Mexican government defined what an invoice should be.

cfdi:Concepto ClaveProdServ="01010101" ClaveUnidad="C81" NoIdentificacion="00001" Cantidad="1.5"

  Unidad="TONELADA" Descripcion="ACERO" ValorUnitario="1500000" Importe="2250000">

Payment method. The CFDI standard also includes the form of payment of the goods, which is fundamental for the SAT to track cash flows.

Payment date. The CFDI standard includes the expected payment date. This information becomes fundamental for the different business models induced from the electronic invoicing. First, it allows financing institutions to know when the invoice will be due. Second, it allows risk managers at the very same institution to analyze payments delays and potentially limit or cancel their credit lines.

   Version="3.3" Serie="A" Folio="123ABC" Fecha="2017-05-01T01:23:59" Vencimiento="2017-05-31T01:23:59"   Moneda="MXN" SubTotal="1000" Total="1500" 

Payment confirmation. The Complemento de Pago is an add-on to the invoice that the supplier must issue when payments come, whether payment is made in installments or deferred, or when it is paid in a single payment.· In addition, the issuer of the invoice must issue the payment confirmation no later than the 10th calendar day of the following month in which the payment was received. A payment confirmation can be issued for each payment received or one for all payments received in a month, as long as they are made by the same recipient.

RFC. It is necessary for the issuer to have a Registry Federal Taxpayers (RFC), obtaining it by registering with the Tax Authority Mexican (SAT).

FIEL. Advanced electronic signature is essential to carry out any procedure related to the SAT. These are files (private key and key public) used to sign documents electronically. Its function is to unquestionably identify the issuer of the message, with the same validity as a handwritten signature. It allows to fully identify the issuer of the electronic invoicing, guaranteeing integrity, authenticity, uniqueness and non-repudiation of the invoice.

Validation API. This API is part of the services offered by the SAT to allow anyone with a UUID number to check whether the invoice exists and is still valid.

Extraction API. This API allows to massively extract all invoices of a company, assuming the company gives its authorization.

Retention of invoices. The nature of documents with fiscal and legal validity granted to invoices requires certain conservation criteria to respect by the issuer and the recipient of these, which specified, among others, in the establishment of a period minimum time (5 years in Mexico) for its conservation. This forces companies to allocate resources and time to store, classify and manage a large number of invoices.