Connector XML 3.3
File
The SAT has released the new documentation for the CFDI version 3.3, which will become mandatory as of
December 2017.
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 v3.3 document through a XML file.
This XML file must comply with the standards for an XMl file,
providing the invoice data.
Structure
The file structure must comply with the XSD (XML Schema Definition) which provides the specification needed so it can be considered a valid format. You can find the XSD in ComprobanteFiscal.xsd.
Fields
The definition for each tag is described below.
Some tags only need to have certain attributes providing the data:
Others required to have content within the tag:
If your business requires additional fields, they can be easily registered as "custom fields"; you only need to ask Solución Factible®'s support area to registered this fields and provide them in the connector:
Data dictionary
- R= Required
- C= Conditional
- O= Optional
Type | Tag or Tag attributes | Description |
---|---|---|
R | Tag: ComprobanteFiscal | All data is stored within this tag, the remaining tags go inside this one as a child |
Attributes | ||
O | Serie | Invoice series for internal records. Up to 25 alphabetical characters. |
O | Folio | Invoice number for internal records. Must be bigger than 0. |
O | Estatus | Invoice status. Vigente=active or Cancelado=canceled. |
R | Fecha | Invoice issuing date. Must indicate date and time in yyyy-MM-ddThh:mm:ss format in compliance with ISO-8601. |
C | formaDePago | Payment form ID (cash=01, credit card=04, etc) according to the payment form catalogue (c_FormaPago). |
C | condicionesDePago | terms of payment for this invoice (3 months, etc). Up to 1000 characters. |
R | subTotal | Sum of all product amounts before discounts and taxes. Negative values are not permitted. |
C | descuento | Total of invoice discounts before taxes. Negative amounts are not permitted. Must appear if the this invoice has any discounts. |
O | motivoDescuento | Reason for the discount if any. |
R | total | subtotal plus any additional contribution minus discounts and taxes. Negative values are not allowed. If this amount, in MXN, surpasses the limit specified in the invoice catalogue (c_TipoDeComprobante), a confirmation token must be specified in the attribute:confirmacionPAC. |
C | metodoDePago | Method of payment ID, either PUE (single payment) or PPD (payment in installments or deferred payment) as specified in the payment method catalogue (c_MetodoPago). |
O | numCtaPago | Last 4 digits of the account from where the payment for this invoice was issued. |
C | confirmacionPAC | Required when registering the confirmation token delivered by the Certification-Authorized Provider (PAC) for creating CFDI(s) with big amounts (>=100'000,000.00 MXN) or exchange rates different to the one established by the Bank of Mexico, or both. |
O | Tag: Divisa | Currency information |
Attributes | ||
O | codigoISO | currency id in compliance with ISO 4217. Ex. MXN (Mexican Peso), USD (U.S. Dollar), JPY (Yen). |
R | nombre | Name of currency |
R | tipoDeCambio | Currency's exchange rate to MXN (Mexican Peso), required when the currency is different to MXN |
O | Tag: Notas | Any additional notes for this CFDI |
O | Tag: cfdiRelacionados | Related CFDIs' data. For any CFDI, a tag must be specified. |
Attributes | ||
R | tipoRelacion | Relationship-type's Id between this CFDI and the related CFDI as specified in the relation type catalogue (c_TipoRelacion). |
R | Child-tag: cfdiRelacionado | Related CFDI's data (this tag may appear as many times as needed for every related CFDI) |
R | UUID | Fiscal "Folio" of the related CFDI. Ex: 1E1C4777-AB5E-4FBF-8F46-A993CE9EEC5D |
O | folio | The related CFDI's folio used for personal administration. Ex. 13425 |
O | serie | The related CFDI's series used for personal administration. Ex. "E" |
R | Tag: Receptor | CFDI's recipient |
Attributes | ||
R | rfc | Recipient's RFC. Ex: FUNK671228PH6 |
O | nombre | Recipient's name. Ex: PÚBLICO EN GENERAL |
O | Recipient's email. | |
R | usoCFDI | This CFDI usage code. Ex: I03 (Equipo de transporte/transport equipment), D04 (Donativos/donations), etc; as specified in the CFDI usage catalogue (c_UsoCFDI). |
O | Child-tag: Domicilio | Recipient's address |
O | Child-tag: Extranjero | Recipient's additional data if he/she lives abroad Mexico |
Extranjero's Attributes | ||
C | residenciaFiscal | 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 (CFDI country catalogue (c_Pais)). Required when the external commerce complement (comercio exterior) is included or the field NumRegIdTrib is registered. |
C | numRegIdTrib | 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. |
O | Tag: Embarque | Shipping address information |
Attributes | ||
R | rfc | Recipient's RFC. Ex: FUNK671228PH6 |
O | nombre | Recipient's name. Ex: PÚBLICO EN GENERAL |
O | Recipient's email. | |
R | Child-tag: Domicilio | Shipping address |
R | Tag: Conceptos | Products/Services information. |
R | Child-tag: Concepto | Product/service information. This tag may appear as many times as needed for every product/service. |
Concepto's Attributes | ||
R | cantidad | Quantity. Ex: 5 |
R | claveUnidad | Product's standardized unit of measurement applied to the product/service's quantity according to the product/service units catalogue (c_ClaveUnidad). The unit must correspond to the product's description. |
O | unidad | Customer's defined unit of sale. ex: PZA. The unit must correspond to the product's description. |
R | claveProdServ | Service/Product's code according to the products and services code catalog (c_ClaveProdServ). |
O | codigo | Product/service Code/SKU (Customer defined) |
R | concepto | Product/service's description |
R | valorUnitario | Unit price. Ex: 5.00 |
O | montoDescuentoUnitario | Discount amount per unit of product/service |
O | tasaDescuento | Discount rate scale from 0 to 100. ex: 20 |
O | importeDescuento | Discount amount |
R | importe | Unit price(valorUnitario) x quantity(cantidad). Ex: 25.00 |
O | comentario | Additional commentary for this product/service. |
C | cuentaPredial | "Predial" account number, needed only when creating a arrendamiento (lease) type CFDI. |
O | Concepto's child-tag: InformacionAduanera | Customs information if needed. |
O | Concepto's child-tag: Parte | Describes each of every part of this product/service. This tag may appear as many times as needed. |
Parte's Attributes | ||
R | claveProdServ | Service/product part's code according to the products and services code catalog (c_ClaveProdServ). |
O | noIdentificacion | Part's Code/SKU (Customer defined) |
R | cantidad | Part's quantity |
O | unidad | Customer's defined unit of sale for this part. ex: PZA. |
R | descripcion | Part's description |
O | valorUnitario | Part's unit price |
O | importe | Part's valorUnitario X Part's cantidad |
O | comentario | Additional notes regarding this part. |
O | Parte's Child-tag: InformacionAduanera | Customs information regarding this part if required. |
O | Concepto's child-tag: Impuestos | Taxes of this product/service. This tag must appear only once for a product/service and has no attributes but a child tag for every tax. |
O | Impuestos' Child-tag: Impuesto | An specific tax regarding this product/service. It may appear as many times as needed. |
Impuesto's Attributes | ||
R | tipo | Tax type (traslado or retencion). |
O | base | Tax calculation basis. Negative numbers are not permitted. |
R | impuesto | Name of this tax. |
O | tasa | Tax rate. If present, the tag "cuota" must be omitted. |
O | cuota | Tax fee. If present, the tag "tasa" must be omitted. |
O | exento | True if this product/service is taxed with his tax but it does not need to be payed (true or false). If true omit tags: "cuota" and "tasa". |
R | importe | This tax amount |
O | Concepto's child-tag: CamposPersonalizados | Any additional custom fields. This tag must appear only once for a product/service and has no attributes but a child tag for every custom field. |
O | CamposPersonalizados' Child-tag: CampoPersonalizado | An specific custom field regarding this product/service. It may appear as many times as needed. |
CampoPersonalizado's Attributes | ||
R | nombre | Custom field's name. |
O | valor | Custom field's value. |
O | Tag: Complemento | Additional CFDI complement's information. |
R | Tag: TotalImpuestos | Total taxes. This tag must have a child tag for the total amount of every tax specified. |
Attributes | ||
O | totalTraslados | Total amount of taxes of type "traslado". |
O | totalRetenciones | Total amount of taxes of type "retencion". |
O | TotalImpuestos' Child-tag: Impuesto | Detailed information for each tax specified. May appear as many times as needed. |
Impuesto's Attributes | ||
R | tipo | Tax type (traslado or retencion). |
R | impuesto | Tax name. |
O | tasa | Tax rate. If present, the tag "cuota" must be omitted. |
O | cuota | Tax fee. If present, the tag "tasa" must be omitted. |
O | exento | True if this product/service is taxed with his tax but it does not need to be payed (true or false). If true omit tags: "cuota" and "tasa". |
R | importe | Tax amount |
O | Tag CamposPersonalizados | Any additional custom fields. This tag has no attributes but a child tag for every custom field. |
O | CamposPersonalizados' Child-tag: CampoPersonalizado | An specific custom field regarding this CFDI. It may appear as many times as needed. |
CampoPersonalizado's Attributes | ||
R | nombre | Custom field's name. |
O | valor | Custom field's value. |
O | Tag: Addenda | Additional CFDI Addenda's information. |
O | Tag: AddendaAdicional | Extra CFDI Addendas' information. |
External links
- SAT's documentation Liga SAT
Example
Complement to incorporate to the invoice (CFDI), the information that covers concepts of income from salaries, provision of a subordinate personal service or concepts assimilated to salaries (Payroll). Complement structure is same that is specified by the SAT.