Inicio  |  Emisión  |  Connector  |  Types of connectors  |  Conector-TXT 5.1 for XML 4.0
La LCO fue actualizada por última vez el 18/jul/2024

Conector-TXT 5.1 for XML 4.0

File

The end of line (EOL), new line or linebreak can be any one used in common operative systems: CR, LF or CR+LF.

Field separation

The default character used to separate each field is "pipe" (|, ASCII 124), if you need another character, it needs to be specified in your implementation´s configuration. However we suggest not to choose simple characters like comma "," or semicolon ";" because this may interfere with the field's data extraction if the data contains such characters.

File structure

There is no line containing the column's definition. Any line contains an invoice's information. The file can have as many lines as desired and therefore as many invoices as needed.

The file does not need any actual invoice order, invoices can be ordered in any way needed.

Fields are extracted from left to right and in the specified order, however the field order can be modified according to your needs in your implementation's configuration.

Txt 5.1 structure for XML 4.0

|FOLIO|SERIE|RAZON_SOCIAL|RFC|STATUS|USO_CFDI|PAIS_FISCAL|ESTADO_FISCAL|MUNICIPIO_FISCAL|CIUDAD_FISCAL|CALLE_FISCAL|NUMERO_EXT_FISCAL|NUMERO_INT_FISCAL|COLONIA_FISCAL|CP_FISCAL|RESIDENCIA_FISCAL_CLIENTE|NUM_REG_ID_TRIB_CLIENTE|FECHA|CLAVE_PROD_SERV|CLAVE_UNIDAD|CODIGO|UNIDAD|CANTIDAD|PRECIO|CONCEPTO|TASA_DESCUENTO|MONTO_DESCUENTO|NOTAS|MONEDA_NOMBRE|MONEDA_SIMBOLO|TIPO_CAMBIO|FORMA_PAGO|CONDICIONES_PAGO|METODO_PAGO|NUM_CTA_PAGO|LUGAR_EXPEDICION|REGIMEN|TASA_IVA|BASE_IVA|MONTO_IVA|TASA_IEPS|CUOTA_IEPS|BASE_IEPS|MONTO_IEPS|TASA_RET_IVA|BASE_RET_IVA|MONTO_RET_IVA|TASA_RET_ISR|BASE_RET_ISR|MONTO_RET_ISR|SUBTOTAL_FACTURA|IMPORTE_TOTAL_FACTURA|CLAVE_TIPO_RELACION|UUID_FACTURAS_RELACIONADAS|

Example

1007|CFDI4.0|YADIRA MAGALY MONTAÑEZ FELIX|MOFY900516NL1|true|S01|México|Jalisco|Guadalajara|Guadalajara|Calle|2153||Colonia|91779|18042022|01010101|EA|CDGO A|PZA|1|100|Concepto A|||Notas del CFDI|Pesos|MXN||01|condiciones de pago|PUE||45070|603|16|100|16|||||||||||100|116|||01|616|||||||||02

CFDI XML result

Field dictionary

Type
Fields for CFDI issuing
Description
"Comprobante" identifier's fields
Mandatory identifier
R
FOLIO
Invoice's commercial number. Ex: 525
R
SERIE
Invoice's commerical series. Ex: E, NC, etc
R
STATUS
Invoice's status (1=active; 0=Canceled or void; TRUE=active; FALSE=Canceled or void)
"Generales" identifier's fields
Mandatory identifier
R
FECHA
Cfdi creation date-time. (ddMMyyyy:HHmmss) Ex: 25052018:09:40:10
C
FORMA_PAGO
Payment form code, according to the SAT catalogues CFDI (xls), Ex: 01 (cash), 02 (check), 04 (credit card), 28 (debit card), etc.
O
CONDICIONES_PAGO
Payment conditions. Ex: CONTADO
C
METODO_PAGO
Method of payment. Ex: PUE (Single payment) or PPD (payment in installments or deferred payment).
R
REGIMEN
Regime of this invoice issuer. Ex: 612 (Personas físicas), 606 (Arrendamiento), 601 (Personas morales), etc.
O
NOTAS
Invoice's additional notes
O
LUGAR_EXPEDICION
Zip code of the location from where this invoice was issued.
R
IMPORTE_TOTAL_FACTURA
Invoice total amount.
R
SUBTOTAL_FACTURA
Invoice subtotal amount before taxes and discounts.
O
EXPORTACION
Export codes.
"ComprobanteRelacionado" identifier's fields
Optional identifier
R
UUID_FACTURAS_RELACIONADAS
Fiscal number of an invoice related to THIS invoice. Ex: "0001Z001-001Z-1XYZ-01X1-A01B01012121". Used in cases like:
  • The related invoice is used to register any merchandise's movement.
  • This invoice is a credit note of the related invoice.
  • This invoice acts as a refund for the related invoice.
  • This invoice substitues a canceled invoice.
R
CLAVE_TIPO_RELACION
The relationship's code between this invoice and the related one, according to the SAT catalogues CFDI (xls). Ex: 04 (Sustitución de los CFDI previos/previous CFDI(s) replacement), etc.
"Divisa" identifier's fields
Optional identifier
If omitted, the currency will be "MXN" (Mexican Pesos)
O
MONEDA_NOMBRE
Currency's name: Ex: Peso Mexicano, Amercian dollar, etc.
R
MONEDA_SIMBOLO
Currency in ISO4217 format. Ex USD, MXN.
C
TIPO_CAMBIO
Exchange rate, required if the currency is different from MXN or XXX Ex: 15.00
"Receptor" identifier field's
Mandatory identifier
O
RAZON_SOCIAL
Recipient's name
R
RFC
Recipient's RFC, Ex: XAXX010101000
R
USO_CFDI
This Invoice usage code, according to the SAT catalogues CFDI (xls). Ex: I03 (Equipo de transporte/transport equipment), D04 (Donativos/donations), etc.
O
REGIMEN_RECEPTOR
Regime of this invoice recipient. Ex: 612 (Personas físicas), 606 (Arrendamiento), 601 (Personas morales), etc.
"DireccionFiscal" identifier field's
Optional identifier
R
PAIS_FISCAL
Recipient address' country. Ex: MÉXICO
O
ESTADO_FISCAL
Recipient address' state.
O
MUNICIPIO_FISCAL
Recipient address' county.
O
CIUDAD_FISCAL
Recipient address' city.
O
CALLE_FISCAL
Recipient address' street.
O
NUMERO_EXT_FISCAL
Recipient address' street external number.
O
NUMERO_INT_FISCAL
Recipient address' street inner number.
O
COLONIA_FISCAL
Recipient address' township
O
CP_FISCAL
Recipient address' zip code.
C
RESIDENCIA_FISCAL_CLIENTE
For registering the recipient's country of residence code for tax effects, when he/she is an alien, and is in conformity with ISO 3166 alpha-3. Required when the external commerce complement (comercio exterior) is included or the field NUM_REG_ID_TRIB_CLIENTE is registered.
O
NUM_REG_ID_TRIB_CLIENTE
For registering the recipient's fiscal identity's registry number when the recipient lives abroad. Required when the external commerce complement (comercio exterior) is included.
"Concepto" identifier's fields
Mandatory identifier
O
CODIGO
Product/service Code/SKU (Customer defined)
R
CONCEPTO
Product/service description
O
UNIDAD
Customer's defined unit of sale. ex: PZA
R
CANTIDAD
Quantity. Ex: 5
R
PRECIO
Unit price. Ex: 5.00
O
TASA_DESCUENTO
Discount rate in a scale from 0 to 100. ex: 20
O
MONTO_DESCUENTO
Discount in case of not using a percentage. Ex: 34.00. Must be lesser or equal to (quantity * unit price), negatives values are not permitted.
R
CLAVE_PROD_SERV
Product/service's code according to the SAT catalogues CFDI (xls).
R
CLAVE_UNIDAD
Product/service's standardized unit of measurement applied to the product/service's quantity according to the SAT catalogues CFDI (xls). The unit must correspond to the product's description.
O
OBJETO_IMP
The code that defines if taxes applies or not is calculated through the product/service.
"ImpuestosConcepto" identifier's fields
Conditional Identifier
Must be included when the invoices has taxes.
C
TASA_IVA
IVA (Valued added tax) rate, required when this type of tax is present.
C
BASE_IVA
Required for stating the IVA tax calculation basis. Negative numbers are not permitted. Required when this type of tax is present.
C
MONTO_IVA
IVA tax amount. Required when this type of tax is present.
C
TIPO_FACTOR_IVA
Code of the type of factor applied to the IVA tax. Ex: "Tasa" (rate), "Cuota" (fee) or "Exento" (exempt). Required when this type of tax is present. If the value is "Exento", the fields TASA_IVA and MONTO_IVA must be left in blank.
C
TASA_IEPS
IEPS (Special tax over production and services) rate, required when this type of tax is present.
C
CUOTA_IEPS
The product/service's IEPS tax fee, required when this type of tax is present.
C
BASE_IEPS
Required for stating the IEPS tax calculation basis. Negative numbers are not permitted. Required when this type of tax is present.
C
MONTO_IEPS
IEPS tax amount. Required when this type of tax is present.
C
TIPO_FACTOR_IEPS
Code of the type of factor applied to the IEPS tax. Ex: "Tasa" (rate), "Cuota" (fee) or "Exento" (exempt). Required when this type of tax is present. If the value is "Exento", the fields CUOTA_IEPS, TASA_IEPS, and MONTO_IEPS must be left in blank.
C
TASA_RET_IVA
IVA (Value added tax) withholding rate, required when this type of tax is present.
C
BASE_RET_IVA
Required for stating the IVA tax withholding calculation basis. Negative numbers are not permitted. Required when this type of tax is present.
C
MONTO_RET_IVA
IVA tax withholding amount. Required when this type of tax is present.
C
TASA_RET_ISR
ISR (income tax) rate, required when this type of tax is present.
C
BASE_RET_ISR
Required for stating the ISR tax calculation basis. Negative numbers are not permitted. Required when this type of tax is present.
C
MONTO_RET_ISR
ISR tax amount. Required when this type of tax is present.
"InformacionGlobal" identifier's fields
Conditional Identifier
Must be included when any field has value.
C
PERIOCIDAD_GLOBAL
Periodicity.
C
MESES_GLOBAL
Current month.
C
AÑO_GLOBAL
Current year.
"Cancelacion" identifier's fields
Conditional Identifier
Must be included when "STATUS" field is false, these fields are required to cancel invoice from connector.
C
MOTIVO_CANCELACION
Cancellation reason code.
C
UUID_SUSTITUCION
Invoice's fiscal number (UUID) to replace.
C
FOLIO_SUSTITUCION
Invoice's commercial number to replace. Ex: 525.
C
SERIE_SUSTITUCION
Invoice's commercial series to replace. Ex: 525.
C
TEXTO_MOTIVO_CANCELACION
Reason to cancel invoice.
"ACuentaTerceros" identifier's fields
Conditional Identifier
Must be included when any field has value.
C
RFC_A_CUENTA_TERCEROS
Third-party account RFC. Ex: XAXX010101000.
C
NOMBRE_A_CUENTA_TERCEROS
Third-party account name.
C
REGIMEN_FISCAL_A_CUENTA_TERCEROS
Third-party account regime code.
C
DOMICILIO_FISCAL_A_CUENTA_TERCEROS
Third-party account zip code.
  • R= Required
  • C= Conditional
  • O= Optional
Datos de contacto
comments powered by Disqus