# CFDI40158

Source: https://xmlvalid.com/rules/CFDI40158

> La clave del campo RegimenFiscalR debe corresponder con el tipo de persona (física o moral) (…, RFC …).

- Level: error
- Rule sets: SAT validations of CFDI 4.0 and Pagos 2.0 Matrices of 25 March 2026 and Pagos 2.0 rev. B
- Context: `/cfdi:Comprobante/cfdi:Receptor`
- Test: `mx:regime(@RegimenFiscalReceptor, $rfc)`

In English: The receiver's RegimenFiscalReceptor must be a regime for its kind of person: 12 characters of RFC is a company (601, 603, 610, 620, 622, 623, 624, 626), 13 a person (605 to 616, 621, 625, 626).

## Why it fails

- The regime of the issuer copied to the receiver.
- A company written with regime 612 or 616, which are for people.

## How to fix it

- Take the regime from the receiver's Constancia de Situación Fiscal, where SAT lists it with the RFC, name and postal code.

Validate a document against these rules: https://xmlvalid.com/validate
