Skip to main content

Manage country-specific configurations for Mexico

Zuora

Manage country-specific configurations for Mexico

Configure e-invoicing in Avalara for Mexico

To configure e-invoicing for invoice clearance in Mexico, you must activate Avalara E-Invoicing and Live Reporting product for Mexico in Avalara:

  1. Set up an Avalara E-Invoicing and Live Reporting account, and generate API key and secret. For more information, see Generate an API token
  2. Get RFC number from Mexico tax authority.
  3. Activate the Avalara E-Invoicing and Live Reporting product for Mexico. The Avalara activation workflow is initiated when you onboard or add a new company. For more information, see Activation for Mexico
  4. Select a mandate and create users. For more information, see Select the mandate, platform, and network for your business. For Mexico, select the following:
    1. Mexico Comprobantes Fiscal Digital por Internet (CFDI) - B2B
    2. Mexico Comprobantes Fiscal Digital por Internet (CFDI) - B2C 

RFC number

RFC stands for "Registro Federal de Contribuyentes" in Spanish, which translates to "Federal Taxpayer Registry" in English. It is a unique tax identification number assigned by the Mexican tax authority (SAT) to individuals and companies that are required to pay taxes in Mexico.

  • Format for individuals, for example, GARC850912H89
    • First four letters: Derived from the name (for example, the first two letters of the last name, the first letter of the second last name, and the first letter of the first name).
    • Six digits: Date of birth in YYMMDD format.
    • Three alphanumeric characters: Assigned to avoid duplicates.
  • Format for businesses, for example, ABC9905019F3
    • First three letters: Derived from the company's name or corporate entity.
    • Six digits: Date of registration or establishment in YYMMDD format.
    • Three alphanumeric characters: Assigned to avoid duplicates.

The RFC number is used to configure E-Invoice business regions in Zuora.

Manage field mapping for e-invoice file templates

In the e-invoicing Clearance process in Mexico, ensure that the field mapping for e-invoice file templates is complete and correct.

The following fields are used in the default e-invoice file template. Remember that you might have to customize the default e-invoice file template if the default field mapping does not align with your business requirements. You can get the details of field descriptions and sample payload from Avalara websiste: https://developer.avalara.com/elr-usecases/

Configure e-invoicing business regions for Mexico

In the e-invoicing clearance process in Mexico, you must configure business regions according to Mexico-specific requirements.

The business region objects can be looked up according to the country and state, and their related fields can be mapped accordingly within the e-invoicing template. You must configure e-invoicing business regions for Mexico according to Mexico-specific requirements. 

The following table lists the business region settings you must configure in the Add Business Region dialog.

UI section

UI field

API field

Required

Description

Basic Info

Country

country

Yes

From the Country list, select a country or region where you must comply with e-invoicing requirements.

Legal Business Name

businessName

Yes

In the Legal Business Name field, specify the full official name that the Seller is registered with the relevant legal authority.

For Mexico, it’s an attribute required to register the name, denomination, or business name of the taxpayer registered in the RFC.

Legal Business Number

businessNumber

Yes

In the Legal Business Number field, specify the unique identifier number of the legal entity or person that you do business with.

For Mexico, the value is the RFC Number, you need to retrieve this number from the Mexico tax authority. It’s an attribute required to register the Issuer's RFC key. For example,  IIA040805DZ4

Business Number Schema Id

businessNumberSchemeId

Yes

In the Business Number Schema Id field, specify the identification scheme identifier that an official registrar issues to identify the Seller as a legal entity or person.

For Mexico, it’s 9930 typically.

Trade Name

tradeName

No

In the Trade Name field, specify the name that the Seller is known as, other than the legal business name.

Tax Register Number

taxRegisterNumber

Yes

In the Tax Register Number field, specify the Seller's VAT identifier (also known as Seller VAT identification number) or the local identification (defined by the Seller’s address) of the Seller for tax purposes, or a reference that enables the Seller to state the registered tax status.

For Mexico, it’s the RFC number.

E-Invoice Destination Code

endpointId

No

In the E-Invoice Destination Code field, specify the Seller's electronic address, to which the application-level response to the e-invoice file might be delivered.

E-Invoice Destination Code Schema Id

endpointSchemeId

No

In the E-Invoice Destination Code Schema Id field, specify the identification scheme identifier of the Seller’s electronic address.

Business Address

Address 1

addressLine1

Yes

In the Address 1 field, specify the first line of the Seller’s address, which is often a street address or business name.

It’s required for the Credit Memo.

Address 2

addressLine2

No

In the Address 2 field, specify the second line of the Seller’s address, which is often the name of a building.

Postal Code

postalCode

Yes

In the Postal Code field, specify the short code that can identify the business address. Seller postcode: The identifier for an addressable group of properties according to the relevant postal service.

City

city

Yes

In the City field, specify the name of the city where the business is located.

It’s required for the Credit Memo.

State/Province

state

No

In the State/Province field, specify the name of the state or province where the business is located.

Contact Info

Contact Name

contactName

No

In the Contact Name field, specify the name of the Seller contact to receive e-invoicing data.

Email

email

No

In the Email field, specify the email address of the Seller contact to receive e-invoicing data.

Business Phone Number

phoneNumber

No

In the Business Phone Number field, specify the business phone number of the Seller contact to receive e-invoicing data.

Service Provider

Provider

serviceProviderId

Yes

From the Provider list, select your e-invoicing service provider.

For Mexico, if the service provider is Avalara, the E-Invoice Process automatically changes to Clearances.

Billing Document Type

  • Invoice
  • Credit Memo
  • Debit Memo
  • invoiceEnabled
  • creditMemoEnabled
  • debitMemoEnabled

Yes

Select one or more of the following billing document types to be supported:

  • Invoice
  • Credit Memo
  • Debit Memo

These document types are selected by default.

Configure e-invoicing profiles for accounts in Mexico

According to Mexico-specific requirements, you must configure e-invoicing profiles for customer accounts involved in the e-invoicing business.

The following table lists the e-invoicing profile settings to configure for a customer account in Mexico.

UI field

API field

Required

Description

Generate E-Invoice for Customer

enabled

Yes

Enable the e-invoicing profile for the customer account. 

If the following conditions are met, all billing documents for one account can be submitted to an e-invoicing service provider to be generated in electronic format:

  • The account must be configured to generate e-invoice files for billing documents.
  • The billing document must be in Posted status.
  • A business region must be created for the billing country contact, and be linked to an e-invoicing service provider.

Business Category

BusinessCategory

Yes

The following three options are available:

  • B2B (Business to Business)
  • B2C (Business to Consumer)
  • B2G (Business to Government)

Mexico uses mandates B2B or B2C.

Legal Business Name

businessName

Yes

In the Legal Business Name field, specify the full official name that the Buyer is registered with the relevant legal authority.

For Mexico, It’s an attribute required to register the name(s), first surname, second surname, as appropriate, denomination or business name of the taxpayer.

Legal Business Number

businessNumber

Yes

In the Legal Business Number field, specify the unique identifier number of the legal entity or person that you do business with.

For Mexico, it’s the Buyer identifier. It’s an attribute required to register the RFC key of the Receiver.

Business Number Schema Id

businessNumberSchemeId

Yes

In the Business Number Schema Id field, specify the identification scheme identifier that an official registrar issues to identify the Buyer as a legal entity or person.

Tax Register Number

taxRegisterNumber

No

In the Tax Register Number field, specify the Buyer's VAT identifier (also known as the Buyer's VAT identification number) or the local identification (defined by the Buyer’s address) of the Buyer for tax purposes, or a reference that enables the Buyer to state the registered tax status.

E-Invoice Destination Code

endpointId

No

In the E-Invoice Destination Code field, specify the Buyer's electronic address, to which the application-level response to the invoice/billing document might be delivered.

E-Invoice Destination Code Schema Id

endpointSchemeId

No

In the E-Invoice Destination Code Schema Id field, specify the identification scheme identifier of the Buyer’s electronic address.

Configure sold-to contacts for e-invoicing

UI field

API field

Required

Description

Country

country

Yes

From the Country list, select Mexico.

Address 1

addressLine1

Yes

In the Address 1 field, specify the first line of the Buyer’s address, which is often a street address or business name. 

It’s required for the Credit Memo.

Address 2

addressLine2

No

In the Address 2 field, specify the second line of the Buyer’s address, which is often the name of a building. 

Postal Code

postalCode

Yes

In the Postal Code field, specify the short code that can identify the business address.

For Mexico, it’s an attribute required to register the postal code of the tax domicile of the recipient of the receipt.

City

city

Yes

In the City field, specify the name of the city where the business is located. 

It’s required for the Credit Memo.

State/Province

state

No

In the State/Province field, specify the name of the state or province where the business is located.

References for e-invoice file templates

Invoice type code and ProjectReference

Invoice type code

Invoice/cbc:InvoiceTypeCode

A code specifying the functional type of the Invoice, including the following values:

  • 380: invoice
  • 381: credit note
  • 383: debit not

The following examples list how these values are used for credit and debit memos: 

  • For credit memos, it uses CreditNote/cbc:CreditNoteTypeCode. Example: <cbc:CreditNoteTypeCode>381</cbc:CreditNoteTypeCode>
  • For debit memos, it uses Invoice/cbc:InvoiceTypeCode. Example: <cbc:InvoiceTypeCode>383</cbc:InvoiceTypeCode>

ProjectReference

Invoice/cac:ProjectReference/cbc:ID

An attribute required to express the key of the effect of the tax receipt for the issuing taxpayer, including the following values:

  • I: Ingreso
  • E: Egreso
  • T: Traslado
  • P: Pago
  • N: Nómina

The default value in the the Zuora e-invoice file template is I.

Item standard identifier and Item classification identifier

Item standard identifier

Invoice/cac:InvoiceLine/cac:Item/cac:StandardItemIdentification/cbc:ID

An item identifier based on a registered scheme. An attribute required to express the number of the request that covers the import of the good. For example, 21  24  3719  1000404

The item standard identifier maps to a custom field on ProductRatePlanCharge.ProductRatePlanCharge.ItemCode__c

Item classification identifier

Invoice/cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode

A code for classifying the item by its type or nature.

The item classification identifier use 02 as the default value. You need to modify it according to your own business.

c_ObjetoImp Descripción Fecha inicio de vigencia
01 No objeto de impuesto. 1/1/2022
02 Sí objeto de impuesto. 1/1/2022
03 Sí objeto del impuesto y no obligado al desglose. 1/1/2022
04 Sí objeto del impuesto y no causa impuesto. 10/7/2022
05 Sí objeto del impuesto, IVA crédito PODEBI. 12/6/2023

Tax Code

Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:TaxLevelCode

An attribute required to incorporate the key of the issuing taxpayer regime to which the fiscal effect of this receipt will apply, for example, 601.
 

c_RegimenFiscal

Descripción

Física

Moral

Fecha de inicio de vigencia

Fecha de fin de vigencia

601

General de Ley Personas Morales

No

1/1/2022

603

Personas Morales con Fines no Lucrativos

No

1/1/2022

605

Sueldos y Salarios e Ingresos Asimilados a Salarios

No

1/1/2022

606

Arrendamiento

No

1/1/2022

607

Régimen de Enajenación o Adquisición de Bienes

No

1/1/2022

608

Demás ingresos

No

1/1/2022

610

Residentes en el Extranjero sin Establecimiento Permanente en México

1/1/2022

611

Ingresos por Dividendos (socios y accionistas)

No

1/1/2022

612

Personas Físicas con Actividades Empresariales y Profesionales

No

1/1/2022

614

Ingresos por intereses

No

1/1/2022

615

Régimen de los ingresos por obtención de premios

No

1/1/2022

616

Sin obligaciones fiscales

No

1/1/2022

620

Sociedades Cooperativas de Producción que optan por diferir sus ingresos

No

1/1/2022

621

Incorporación Fiscal

No

1/1/2022

622

Actividades Agrícolas, Ganaderas, Silvícolas y Pesqueras

No

1/1/2022

623

Opcional para Grupos de Sociedades

No

1/1/2022

624

Coordinados

No

1/1/2022

625

Régimen de las Actividades Empresariales con ingresos a través de Plataformas Tecnológicas

No

1/1/2022

626

Régimen Simplificado de Confianza

1/1/2022

Payment means type code

Invoice/cac:PaymentMeans/cbc:PaymentMeansCode

A conditional attribute to express the key of the form of payment of the goods or services covered by the receipt, for example, 01.

Zuora e-invoice file templates use 99 as the default value.
 

c_FormaPago

Descripción

01

Efectivo

02

Cheque nominativo

03

Transferencia electrónica de fondos

04

Tarjeta de crédito

05

Monedero electrónico

06

Dinero electrónico

08

Vales de despensa

12

Dación en pago

13

Pago por subrogación

14

Pago por consignación

15

Condonación

17

Compensación

23

Novación

24

Confusión

25

Remisión de deuda

26

Prescripción o caducidad

27

A satisfacción del acreedor

28

Tarjeta de débito

29

Tarjeta de servicios

30

Aplicación de anticipos

31

Intermediario pagos

99

Por definir

Tax Category

Tax category name

Invoice/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:Name

A conditional attribute to indicate the value of the rate or quota of the tax that is transferred for this concept. It is required when the tag TipoFactor attribute has a key that corresponds to the tag TasaOCuota

Total Transfer/TipoFactor include the following values:

  • S: Tasa
  • E: Exento
  • O: Cuota

Zuora templates use S as the default value.

Tax category ID

Invoice/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID

A attribute required to indicate the key of the transferred tax type applicable to this Concepto.

Zuora templates use IVA as the default value.

Testing recommendations

Zuora has tested e-invoicing on various billing document types and operations with the default e-invoice file templates.
The following table lists the test cases for your reference. 

Billing document type

Document source

Case category

Description

Invoice

Subscription

One charge

Create a subscription containing one rate plan charge with taxation, generate a draft invoice from the subscription, and then post the invoice.

Credit Memo

Invoice

One charge

Create a credit memo from the invoice, and post the credit memo.

Debit Memo

Invoice

One charge

Create a debit memo from the invoice, and post the debit memo.

Credit Memo

Invoice

One charge

Generate an invoice from the subscription, and reverse the invoice to create a credit memo from the invoice.

Credit Memo

Invoice

One charge

Generate an invoice from the subscription, and write off the invoice to create a credit memo from the invoice.

Credit Memo

Subscription

One charge

Generate a credit memo from the subscription cancellation, and post the credit memo.

Debit Memo

Credit Memo

One charge

Reverse the credit memo to create a debit memo from the invoice.

Invoice

Subscription

Multiple charges

Create a subscription containing multiple charges with taxation, generate a draft invoice from the subscription, and then post the invoice.

Credit Memo

Invoice

Multiple charges

Create a credit memo from the invoice, and post the credit memo.

Debit Memo

Invoice

Multiple charges

Create a debit memo from the invoice, and post the debit memo.

Credit Memo

Invoice

Multiple charges

Generate an invoice from the subscription, and reverse the invoice to create a credit memo from the invoice.

Credit Memo

Invoice

Multiple charges

Generate an invoice from the subscription, and write off the invoice to create a credit memo from the invoice.

Credit Memo

Subscription

Multiple charges

Generate a credit memo from the subscription cancellation, and post the credit memo.

Debit Memo

Credit Memo

Multiple charges

Reverse the credit memo to create a debit memo from the invoice.

Invoice

Standalone

Multiple charges

Create a standalone invoice containing multiple items from product rate plan charges, and post the invoice.

Credit Memo

Standalone

Multiple charges

Create a standalone credit memo containing multiple items from product rate plan charges, and post the credit memo.

Debit Memo

Standalone

Multiple charges

Create a standalone debit memo containing multiple items from product rate plan charges, and post the debit memo.

Zuora has not tested Mexico with a RFC number as Zuora can’t apply for the RFC from the Mexican tax authority (SAT). RFC is a unique tax identification number assigned by the Mexican tax authority (SAT) to individuals and companies that are required to pay taxes in Mexico.
 

Retrieve e-invoicing results

You can use the Retrieve e-invoicing results operation to retrieve e-invoice results according to the ID of a billing document. The document ID can be the ID of an invoice, a credit memo, or a debit memo.

The e-invoicing result fields might be different by country.

The e-invoicing result fields on EInvoiceData include the following fields for Mexico:

  • QrCode: This field is empty for Mexico by default 
  • ReferenceNumber: This field is empty for Mexico by default
  • DocumentId: This field stores the ID of the billing document, for which the e-invoice file is generated.
  • DocumentType: This field indicates the type of the billing document, for which the e-invoice file is generated.

If you define the response field mapping for Mexico, you can access those fields via EInvoiceData. See details about E-invoicing response field mapping for Avalara.

The eInvoiceFileId field on the Invoice object stores the ID of the e-invoice file that is returned by tax authority.