2022 update for CFDI
Starting January 1st, 2022 some modifications were introduced by the SAT regarding CFDI creation.:- Major version 4.0 is mandatory on May 1st 2022. (updated from 3.3)
- Recipient name and address are mandatory.
- If the operation is related to exports, new fields are needed.
- Identification of base amount and base tax on a per product basis is needed.
- Global invoice parameters and new rules for generic rfc usage.
- As of 2022, it is necessary to include the reason for cancelling a document.e The possible values are listed in the SAT catalogue.
- If using 01 as reason (see above), a new field for linking documents must be used.
Conector-txt v6.0 / CFDI
Solución Factible®'s goal is to provided an easy way adoption on the costumer's side for the emission of electronic invoices. With this in mind, the CFDI connector has been developed to deliver the easiness of creating a CFDI document through a TXT file.
Specification
The current 6.0 version on the txt-connector file divides data between new lines (CR, LF o CR+LF.). Each line contains business data according to the CFDI(s) to create.
The file contains identifiers at the start of each line indicating the data's type being used. It is a sequential file read top to bottom and is based on the order of the CFDI's nodes, however this can be modified to your needs. Multiple CFDI(s) can be appended to a single file.
Each field of every section (identifier) is separated by the pipe character (|, ASCII 124) and are extracted on the right to left ordering, however field position can be configured to change parsing ordering.
If you require a different separating character it must be specified to Solución Factible®'s support personnel. Although it is suggested not to choose common characters such as "comma" or "semicolon" because they can interfere with the proper reading of the conector if your information contains data with such characters.
File encoding can be either ISO88591 (default) or UTF8.
Comprobante|1|A|true|||
Generales|06/11/2016 17:45:00|01|Contado|PUE|601||notas del comprobante|45070|
ComprobanteRelacionado|714E4B22-9620-499E-9659-01E0D19F719C|04|58670|F|
Divisa|Peso Mexicano|MXN|1|
Receptor|OSCAR KALA HAAK|KAHO641101B39||oscar@dominioempresa.com.mx|||G01|
DireccionFiscal|México|Jalisco......|
The TXT file must contain, SFERP|6.0|, as the initial line. It is a unique and mandatory line which identifies the conector's version being used. Afterwards the CFDI data will be specified. All lines must start with their proper identifiers, all being marked in bold in the examples.
Identifiers and fields
Each identifier represents the start of a section that contains an specific number of fields. The different identifiers and their fields are shown next.
Some identifiers and their fields can repeat across lines within the file since business data might call for it. For instance multiple "Concepto" identifiers might exists to accommodate a CFDI that contains many products/services.
- SFERP|6.0|
- Comprobante|folioComprobante|serieComprobante|statusComprobante|ClaveConfirmacionPAC|sectorPrimario|
- Cancelacion|reason|uuidSubstitution|folioSubstitution|serieSubstitution|internaldescription|
- Generales|fechaHora|formaPago|condicionesPago|metodoPago|RegimenFiscal|motivoDescuento|notas|LugarExpedicion|
- ComprobanteRelacionado|UUIDComprobanteRelacionado|TipoRelacion|folioRelacionado|serieRelacionado|
- Divisa|moneda|monedaSimbolo|tipoCambio|
- Receptor|Nombre|RFC|CURP|email|ResidenciaFiscal|NumRegIdTrib|UsoCFDI|RegimenFiscalReceptor
- DireccionFiscal|pais|estado|municipio|ciudad|calle|numExterior|numInterior|colonia|cp|
- DireccionEmbarque|nombre|rfc|pais|estado|municipio|ciudad|calle|numExterior|numInterior|colonia|cp|
- Concepto|codigo|descripcion|unidad|cantidad|valorUnitario|comentario|importe|tasaDescuento|importeDescuento|
cuentaPredial|ClaveProdServSAT|ClaveUnidadSAT|- ImpuestosConcepto|TipoImpuesto|NombreImpuesto|ImporteImpuesto|TasaOCuotaImpuesto|TipoFactor|
BaseImpuesto| - AduanaConcepto|pedimentoAduana|
- ParteConcepto|cantidad|descripcion|noIdentificacion|importe|unidad|valorUnitario|ClaveProdServSAT|
- AduanaParte|pedimentoAduana|
- ComplementoConcepto|nombre|ComplementoDatos|
- CamposDinamicosConcepto|CAMPO_1|CAMPO_2|CAMPO_3|....|
- ImpuestosConcepto|TipoImpuesto|NombreImpuesto|ImporteImpuesto|TasaOCuotaImpuesto|TipoFactor|
- ImpuestosComprobante|TipoImpuesto|NombreImpuesto|ImporteImpuesto|TasaOCuotaImpuesto|TipoFactor|
- Totales|subtotal|totalTraslados|totalRetenciones|totalDescuentos|totalComprobante|
- CamposDinamicos|CAMPO_1|CAMPO_2|CAMPO_3|....|
- Complemento|IdentificadorComplemento|
- available complements (complementos):
- Addenda|nombre|
- Addenda data...
External links
- SAT's documentation Liga SAT
Examples
Download more examples
Simple CFDI, one product.
Comprobante|6|FTVN|true|||
Generales|12052017|01||PUE||622||Notas del comprobante|45070|
ComprobanteRelacionado|714E4B22-9620-499E-9659-01E0D19F719C|04|58670|F|
Divisa|Peso Mexicano|MXN|1|
Receptor|OSCAR KALA HAAK|KAHO641101B39||oscar@dominioempresa.com.mx|||G01|
Concepto|123456|Bicicletas de motor de importacion.|PZA|1|10000|Producto importado|10000||||25101800|EA|
ImpuestosConcepto|T|IVA|1600|16|Tasa|10000|
AduanaConcepto|15 19 3710 5025673|
ImpuestosComprobante|T|IVA|1600|16|Tasa|
Totales|10000|1600|0.00|0.00|11600|
Simple CFDI, many products.
Comprobante|6|FTVN|true|||
Generales|12052017|01||PUE||622||Notas del comprobante|45070|
ComprobanteRelacionado|714E4B22-9620-499E-9659-01E0D19F719C|04|58670|F|
Divisa|Peso Mexicano|MXN|1|
Receptor|OSCAR KALA HAAK|KAHO641101B39||empresa@dominioempresa.com.mx|||G01|
Concepto|123456|Bicicletas de motor de importacion.|PZA|1|10000|Producto importado|10000||||25101800|EA|
ImpuestosConcepto|T|IVA|1600|16|Tasa|10000|
AduanaConcepto|15 19 3710 5025673|
Concepto|124578|Alimento vivo para aves|PZA|1|10000|Producto importado|||||10121601|29|
ImpuestosConcepto|T|IVA|1600|16|Tasa|10000|
AduanaConcepto|15 19 3710 5025673|
ImpuestosComprobante|T|IVA|1600|16|Tasa|
Totales|20000|3200|0.00|0.00|23200|
Multiple CFDIs per file
Comprobante|6|FTVN|true|||
Generales|05012011:09:40:10|01||PUE||622||Notas del comprobante|45070|
Divisa|Peso Mexicano|MXN|1|
Receptor|OSCAR KALA HAAK|KAHO641101B39||empresa@dominioempresa.com.mx|||G01|
Concepto|123456|Bicicletas de motor de importacion.|PZA|1|10000|Producto importado|10000||||25101800|EA|
ImpuestosConcepto|T|IVA|1600|16|Tasa|10000|
AduanaConcepto|15 19 3710 5025673|
ImpuestosComprobante|T|IVA|1600|16|Tasa|
Totales|10000|1600|0.00|0.00|11600|
Comprobante|2|A|true|
Generales|05012011:11:40:10|01||PUE||622||Notas del comprobante|45070|
Divisa|Peso Mexicano|MXN|1|
Receptor|OSCAR KALA HAAK|KAHO641101B39||empresa@dominioempresa.com.mx|||G01|
Concepto|124578|Alimento vivo para aves|PZA|1|10000|Producto importado|||||10121601|29|
ImpuestosConcepto|T|IVA|1600|16|Tasa|10000|
AduanaConcepto|14 23 8712 5025673|
ImpuestosComprobante|T|IVA|1600|16|Tasa|
Totales|10000|1600|0.00|0.00|11600|
With different currency
Comprobante|41|FTVN|true|||
Generales|17052017|01||PUE||622||notas del comprobante|45079|
Divisa|Yen|JPY|0.166123|
Receptor|OSCAR KALA HAAK|KAHO641101B39||empresa@dominioempresa.com.mx|||G01|
DireccionFiscal|MEX|Jalisco|Zapopan|Zapopan|FRANCISCO I. MADERO|123||Centro|45900|
Concepto|23534855|Concepto con divisa JPY|PZA|1|10000|Producto importado|10000||||25101800|EA|
ImpuestosConcepto|T|IVA|1600|16|Tasa|10000|
ImpuestosComprobante|T|IVA|1600|16|Tasa|
Totales|10000.01|1600|0.00|0.00|11600|
Products with customs' information
Comprobante|23|FTVN|true|||
Generales|14052017|01||PUE||622||Notas del comprobante|45070|
Divisa|Peso Mexicano|MXN|1|
Receptor|OSCAR KALA HAAK|KAHO641101B39||cliente@consumidor.com.mx|||G01|
Concepto|23534855|Concepto con aduanera|PZA|1|10000|Producto importado|10000||||25101800|EA|
ParteConcepto|1|Descripcion|979854|1000|1|1000|01010101|
AduanaParte|10 47 3807 8002932|
ParteConcepto|1|Otra Descripcion|132156465|1000|1|1000|10101500|
ImpuestosConcepto|T|IVA|1600|16|Tasa|10000|
Concepto|23534856|Otro concepto con aduanera|PZA|1|10000|Producto importado|10000||||25101800|EA|
ParteConcepto|1|Más Descripciones|979854|1000|1|1000|10101501|
ParteConcepto|1|Otra más|132156465|1000|1|1000|10101502|
ImpuestosConcepto|T|IVA|1600|16|Tasa|10000|
ImpuestosComprobante|T|IVA|3200|16|Tasa|
Totales|20000|3200|0.00|0.00|23200|
With IEPS taxes
Comprobante|33|FTVN|true|||
Generales|15052017|01||PUE||622||notas del comprobante|45079|
Divisa|Peso Mexicano|MXN|1|
Receptor|OSCAR KALA HAAK|KAHO641101B39||oscar@dominioempresa.com.mx|||G01|
DireccionFiscal|MEX|Jalisco|Zapopan|Zapopan|FRANCISCO I. MADERO|123||Centro|45900|
Concepto|23534855|Concepto con IEPS|PZA|1|10000|Producto importado|10000|||132132132156654|25101800|EA|
ImpuestosConcepto|T|IEPS|1600|16|Cuota|10000|
ImpuestosComprobante|T|IEPS|1600|16|Cuota|
Totales|10000|1600|0.00|0.00|11600|
Concepto con ClaveProdServ 78111500
Comprobante|35|FTVN|true|||
Generales|15052017|01||PUE||622||notas del comprobante|45079|
Divisa|Peso Mexicano|MXN|1|
Receptor|OSCAR KALA HAAK|KAHO641101B39||oscar@dominioempresa.com.mx|||G01|
DireccionFiscal|MEX|Jalisco|Zapopan|Zapopan|FRANCISCO I. MADERO|123||Centro|45900|
Concepto|23534855|Concepto con ClaveProdServ 78111500|PZA|1|10000|Producto importado|10000||||78111500|EA|
ImpuestosConcepto|T|IVA|1600|16|Tasa|10000|
ImpuestosComprobante|T|IVA|1600|16|Tasa|
Totales|10000|1600|0.00|0.00|11600|
With predial account
Comprobante|32|FTVN|true|||
Generales|15052017|01||PUE||622||notas del comprobante|45079|
ComprobanteRelacionado|714E4B22-9620-499E-9659-01E0D19F719C|04|58670|F|
Divisa|Peso Mexicano|MXN|1|
Receptor|OSCAR KALA HAAK|KAHO641101B39||oscar@dominioempresa.com.mx|||G01|
DireccionFiscal|MEX|Jalisco|Zapopan|Zapopan|FRANCISCO I. MADERO|123||Centro|45900|
Concepto|23534855|Concepto con cuenta predial|PZA|1|10000|Producto importado|10000|||132132132156654|25101800|EA|
ImpuestosConcepto|T|IVA|1600|16|Tasa|10000|
AduanaConcepto|15 19 3710 5025673|
ImpuestosComprobante|T|IVA|1600|16|Tasa|
Totales|10000|1600|0.00|0.00|11600|
Data Dictionary
Download this table as a spreadsheet.
If this field is specified, fields "folioRelacionado" and "serieRelacionado" must be left unspecified.
If not used, the default moneda/currency will be Mexican Pesos "MXN"
- R= Required
- C= Conditional
- O= Optional
Interpreter (Intérprete)
If you would like to identify the values of your configuration chain for the TXT conector v6.0 click here.