Home / Validate VAT / Mexico
Validate Mexico Tax ID Numbers via API
When building B2B applications that serve Mexico (México), validating your customers' RFC (Registro Federal de Contribuyentes) is essential for B2B compliance and protecting your business from tax liability.
The TaxID API provides instant format validation and live lookup for Mexico RFC numbers via SAT (Servicio de Administración Tributaria). Every request returns the validation status with sub-100ms response times for cached results.Mexico applies a standard rate of 16% (RFC).
QUICK START
curl -H "Authorization: Bearer YOUR_API_KEY" \ http://localhost:3000/api/v1/validate/MX/XAXX010101000
Code examples
Choose your language. Every example validates a Mexico VAT number and returns the registration status with company details.
const res = await fetch('http://localhost:3000/api/v1/validate/MX/XAXX010101000', {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const data = await res.json();
// { valid: true, status: "active", company_name: "...", country_code: "MX", cached: false }
console.log(data);When to validate Mexico tax ID numbers
B2B invoicing and accounts payable
When issuing or receiving invoices from Mexico businesses, validating the RFC (Registro Federal de Contribuyentes) ensures the identifier is genuine before committing the transaction to your ERP. Invalid or fabricated tax IDs are a leading vector for invoice fraud and can result in rejected filings or audit penalties.
SaaS and e-commerce checkout
If your platform serves Mexico business customers, collecting and validating their RFC (Registro Federal de Contribuyentes) at checkout is required for accurate tax treatment, correct invoicing, and downstream reporting. An invalid tax ID at the point of sale creates a correction burden across your finance stack.
Supplier and marketplace onboarding
For procurement platforms and regulated marketplaces onboarding Mexico sellers or vendors, validating the RFC (Registro Federal de Contribuyentes) at registration prevents fraudulent or duplicate accounts from entering your ecosystem. Validate once at onboarding, then re-validate periodically to detect deregistrations or changes.
About Mexico VAT format (RFC)
Mexico's RFC is a 13-character tax ID for companies (12 for individuals). The first 4 characters are derived from the company name, the next 6 from the date of incorporation, and the last 3 are a homoclave assigned by SAT. Mexico applies a border-region reduced rate of 8% in some areas.
| Field | Value |
|---|---|
| Country code | MX |
| Local name | RFC (Registro Federal de Contribuyentes) |
| Format | 4 letters + 6-digit date + 3-character homoclave |
| Regex pattern | ^[A-Z]{4}[0-9]{6}[A-Z0-9]{3}$ |
| Example | XAXX010101000 |
| VIES supported | No |
VAT rates in Mexico
Mexico applies a standard RFC rate of 16%. Reduced rates of 0% apply to essential goods and services.
| Rate type | Percentage | Currency |
|---|---|---|
| Standard rate | 16% | MXN |
| Reduced rate | 0% | MXN |
Frequently asked questions
What is the Mexico tax ID number format?
Mexico tax ID numbers (RFC (Registro Federal de Contribuyentes)) follow the format: 4 letters + 6-digit date + 3-character homoclave. A valid example is XAXX010101000. The TaxID API validates the format locally and where possible checks against the SAT (Servicio de Administración Tributaria), ensuring you only accept properly registered businesses.
Should I validate RFC numbers when transacting with Mexico businesses?
Validating RFC numbers reduces fraud risk, prevents invalid identifiers from entering your accounting system, and is required by many B2B contracts and procurement platforms. While mandatory rules vary by jurisdiction, validating at onboarding is widely considered best practice — especially for SaaS, marketplace, and fintech platforms with global customer bases.
What is the standard tax rate in Mexico?
The standard tax rate in Mexico is 16% (RFC). Reduced rates of 0% apply to certain goods and services such as food, books, and medical supplies. The TaxID API's /rates endpoint returns all current rates for programmatic access.
How long does Mexico tax ID validation take with TaxID?
For cached results (previously validated in the last 24 hours), the TaxID API responds in under 10ms. Format validation is instantaneous. For uncached requests requiring a live lookup against SAT (Servicio de Administración Tributaria), response time is typically 100–500ms. Valid numbers are cached for 24 hours; invalid numbers are cached for 1 hour.
How does the TaxID API validate Mexico RFC numbers?
The TaxID API validates Mexico RFC numbers in two steps: first it checks the format against the official pattern (4 letters + 6-digit date + 3-character homoclave), then it queries SAT (Servicio de Administración Tributaria) where a live API is available. Mexico's RFC is a 13-character tax ID for companies (12 for individuals). The first 4 characters are derived from the company name, the next 6 from the date of incorporation, and the last 3 are a homoclave assigned by SAT. Mexico applies a border-region reduced rate of 8% in some areas.
Start validating Mexico VAT numbers
Free plan includes 100 validations/month. No credit card required.
Get free API keyDeveloper resources:
Also validate VAT in:
Concepts explained: