Mexico — CFDI Types & Testing Reference

This guide covers two things that don't fit into a single payload example: the CFDI 4.0 invoice type variants you'll encounter as a developer (Ingreso, Factura Global, Egreso, RFC Genérico, RFC Extranjero), and the SAT sandbox test data (test RFCs and certificates) available through Vertex's certification provider, Quadrum.

Full raw XML examples and certificate downloads live on Quadrum's wiki.


CFDI Invoice Type Variants

Ingreso, Factura Global, RFC Genérico, and RFC Extranjero are all issued through the same Vertex document — invoice_type: "debit", document_type: "invoice" — and differ only in specific fields. Egreso is its own document type (see below).

Ingreso

Standard income invoice. The most common type you'll issue.

Factura Global

Not a separate document type — it's an Ingreso with one addition: the <cfdi:InformacionGlobal> node (Año, Meses, Periodicidad), used to consolidate retail sales to the general public instead of billing each customer individually. Typically issued end-of-day or end-of-period.

To issue a Factura Global:

  • buyer.company.tax_registrations[].number = XAXX010101000 (RFC genérico)
  • buyer.company.name = PUBLICO EN GENERAL (exact string — this is what tells Vertex/SAT it's a global invoice, not a generic-RFC one-off sale)

Egreso (Credit Note)

Used to cancel or partially reduce a previously issued Ingreso. Unlike the variants above, this is its own Vertex document type:

  • invoice_type: "credit"
  • document_type: "credit note"

Must reference the original CFDI's UUID via CfdiRelacionados (SAT side).

RFC Genérico

For a buyer who is a member of the general public but is billed individually rather than folded into a Factura Global.

  • buyer.company.tax_registrations[].number = XAXX010101000 (same RFC as Global)
  • buyer.company.name = anything other than PUBLICO EN GENERAL — this is the field that distinguishes it from a Factura Global at the same RFC.

RFC Extranjero

For foreign buyers without a Mexican RFC.

  • buyer.company.tax_registrations[] needs two entries:
    • One with type: "RFC", number: "XEXX010101000", location: "MX"
    • A second entry with type: "tax_id", number: <foreign tax ID, maps to SAT NumRegIdTrib>, location: <foreign country code, ≠ "MX" — this is what maps to SAT ResidenciaFiscal>

Test Environment — RFCs & Certificates

Vertex's SAT sandbox testing runs through Quadrum's DEMO environment. These RFCs and certificates are test-only — never use them in production.

🔑

The private key password for all test certificates is 12345678a.

Test RFCs — Emisores (Suppliers)

Use these as supplier_company_id in test payloads. Each has a CSD (Certificado de Sello Digital) and FIEL (Firma Electrónica) pair.

RFCRazón SocialCPTipo de PersonaNo. Certificado CSD
EKU9003173C9ESCUELA KEMPER URGATE20928Moral30001000000500003416
IIA040805DZ4INDUSTRIA ILUMINADORA DE ALMACENES62964Moral30001000000500003433
IVD920810GU2INNOVACION VALOR Y DESARROLLO SA58000Moral30001000000500003434
MISC491214B86CECILIA MIRANDA SANCHEZ80290Física30001000000500003359
XIQB891116QE4BERENICE XIMO QUEZADA21855Física30001000000500003364

Certificate downloads (CSD + FIEL, per RFC) are on Quadrum's wiki — not redistributed here since they're binary files tied to Quadrum's sandbox: Quadrum — Archivos de Certificados.

Test RFCs — Receptores (Buyers)

Use these as buyer in test payloads. These do not have certificates — they're buyer-only.

RFCNombre / Razón SocialCPTipo de PersonaRegímenes Fiscales Disponibles
MASO451221PM4MARIA OLIVIA MARTINEZ SAGAZ80290Física605, 606, 607, 608, 610, 611, 612, 614, 615, 616, 621, 625, 626
AABF800614HI0FELIX MANUEL ANDRADE BALLADO86400Física605, 606, 607, 608, 610, 611, 612, 614, 615, 616, 621, 625, 626
CUSC850516316CESAR OSBALDO CRUZ SOLORZANO45638Física605, 606, 607, 608, 610, 611, 612, 614, 615, 616, 621, 625, 626
ICV060329BY0INMOBILIARIA CVA33826Moral601, 603, 610, 620, 622, 623, 624, 626
ABC970528UHAARENA BLANCA SCL DE CV80290Moral601, 603, 610, 620, 622, 623, 624, 626
CTE950627K46COMERCIALIZADORA TEODORIKAS57740Moral601, 603, 610, 620, 622, 623, 624, 626
AMO8905171T1ALBERCAS MONTAÑO22000Moral601, 603, 610, 620, 622, 623, 624, 626
GCA000415UX7GRUPO DE CONSTRUCCION ARQUITECTONICA NACIONAL11830Moral601, 603, 610, 620, 622, 623, 624, 626
HHN0507087N4HIDRO HORTICOLA DEL NOROESTE82198Moral601, 603, 610, 620, 622, 623, 624, 626

More test RFCs are listed on Quadrum's wiki if these don't cover your test case.

RegimenFiscal Mapping (SAT → Vertex)

Maps SAT catalog c_RegimenFiscal to the Vertex value expected in company.tax_registrations[].status (where type = "RFC").

SAT CodeSAT DescriptionVertex value
601General de Ley Personas MoralesRégimen general
603Personas Morales con Fines no LucrativosRégimen con fines no lucrativos
605Sueldos y Salarios e Ingresos Asimilados a SalariosRégimen de Asalariados
606ArrendamientoRégimen por Arrendamiento de Inmuebles
607Régimen de Enajenación o Adquisición de BienesRégimen por Enajenación de Bienes
608Demás ingresosOtros
610Residentes en el Extranjero sin Establecimiento Permanente en MéxicoResidente en el extranjero
611Ingresos por Dividendos (socios y accionistas)Ingresos Dividendos
612Personas Físicas con Actividades Empresariales y ProfesionalesRégimen de Actividades Profesionales
614Ingresos por interesesIngresos Intereses
615Régimen de los ingresos por obtención de premiosRégimen de los ingresos por obtención de premios
616Sin obligaciones fiscalesSin obligaciones fiscales
620Sociedades Cooperativas de Producción que optan por diferir sus ingresosSociedades Cooperativas de Producción que optan por diferir sus ingresos
621Incorporación FiscalRégimen de incorporación fiscal
622Actividades Agrícolas, Ganaderas, Silvícolas y PesquerasRégimen por Actividades Agrícolas, Ganaderas, Silvícolas y Pesqueras
623Opcional para Grupos de SociedadesOpcional para Grupos de Sociedades
624CoordinadosCoordinados
625Régimen de las Actividades Empresariales con ingresos a través de Plataformas TecnológicasRégimen de las Actividades Empresariales con ingresos a través de Plataformas Tecnológicas
626Régimen Simplificado de ConfianzaRégimen simplificado de confianza



Did this page help you?