[MX] RFC Validation

Before you issue a CFDI 4.0 to a customer, the RFC, legal name and postal code (domicilio fiscal) on the invoice must match exactly what SAT has registered. If they don't, SAT rejects the invoice. Validate the three together with validation_type: "RFC":

  • succeeded means all three match SAT's records.
  • failed means at least one of them doesn't. errors tells you which.
📚

New to tax ID validations? Start with the generic guide.


Request

A customer that isn't in Brinta yet

curl -X POST https://api.brinta.com/tax-id-validations/ \
  -H "Authorization: Bearer $BRINTA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "locations": ["MX"],
    "validation_type": "RFC",
    "company": {
      "type": "business",
      "legal_name": "ESCUELA KEMPER URGATE",
      "address": { "postal_code": "42501" },
      "tax_registration": {
        "number": "EKU9003173C9",
        "type": "RFC",
        "level": "country",
        "location": "MX"
      }
    }
  }'

A customer already in Brinta

curl -X POST https://api.brinta.com/tax-id-validations/ \
  -H "Authorization: Bearer $BRINTA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "locations": ["MX"],
    "validation_type": "RFC",
    "company_id": "2f0e5d75-959b-4791-a201-b88ada67b3f6",
    "update_company": true
  }'

Brinta validates the RFC, legal name and postal code stored on the company. With update_company: true, a successful validation also saves SAT's data on the company.

Required fields

FieldNotes
validation_type"RFC".
company.tax_registrationnumber is the RFC: 12 characters for a company (persona moral), 13 for an individual (persona física). Uppercase, no spaces or dashes. Also send type: "RFC" (for both companies and individuals), level: "country" and location: "MX".
company.legal_nameThe name exactly as it appears on the Constancia de Situación Fiscal.
company.address.postal_codeThe postal code of the domicilio fiscal, 5 digits.
company.typebusiness or person. Optional.

When you validate by company_id, the stored company must have all three. If any is missing, the request returns 400 before running, for example: MX: company.address.postal_code is required.

💡

Send the name as SAT has it. Since CFDI 4.0, SAT registers company names without the capital regime. Send ESCUELA KEMPER URGATE, not ESCUELA KEMPER URGATE, S.A. DE C.V.. Copy the name from the customer's Constancia de Situación Fiscal, in uppercase and with the same accents, spaces and punctuation.


Result

The POST answers right away with the validation id and status in_process. When the validation succeeds, Brinta notifies your validation webhook. Read the result with GET /tax-id-validations/{id}, and poll it every few seconds until status is succeeded or failed. The RFC check usually finishes in a few seconds.

Succeeded: all three match

{
  "id": "tiv2-7c6b5a49-3827-4161-a5f4-e3d2c1b0a998",
  "status": "succeeded",
  "data": [
    {
      "locationIsoCode": "MX",
      "status": "succeeded",
      "company": {
        "legal_name": "ESCUELA KEMPER URGATE",
        "tax_registrations": [
          { "number": "EKU9003173C9", "type": "RFC", "level": "country", "location": "MX" }
        ],
        "address": { "postal_code": "42501" }
      },
      "registry_lists": []
    }
  ]
}

You can issue the CFDI with these three values.

Failed: at least one doesn't match

{
  "id": "tiv2-1a2b3c4d-5e6f-4789-8abc-def012345678",
  "status": "failed",
  "data": [
    {
      "locationIsoCode": "MX",
      "status": "failed",
      "errors": ["legal_name does not match SAT records", "address.postal_code does not match SAT records"],
      "registry_lists": []
    }
  ]
}
Message in errorsWhat to do
tax_registration.number does not match SAT recordsThe RFC doesn't exist, or is cancelled. Check it with the customer.
legal_name does not match SAT recordsAsk for the Constancia de Situación Fiscal and copy the name exactly. Drop the capital regime (S.A. DE C.V.).
address.postal_code does not match SAT recordsThe customer's domicilio fiscal has a different postal code. Take it from the Constancia de Situación Fiscal.

Correct the data and send a new validation. Don't issue the CFDI until the validation succeeds.


Common mistakes

MistakeFix
Name with S.A. de C.V., S. de R.L. or similarSend the name without the capital regime.
Name in lowercase or without accentsCopy it exactly from the Constancia de Situación Fiscal.
Using the delivery or branch postal codeUse the postal code of the domicilio fiscal.
RFC with spaces, dashes or lowercase lettersSend 12 or 13 characters, uppercase, no separators.
"type": "RFC personas físicas" in tax_registrationUse "type": "RFC" for both companies and individuals.
Leaving out validation_typeSend "validation_type": "RFC".
Validating once and issuing for monthsCustomers change their domicilio fiscal. Validate again when SAT rejects an invoice, or periodically.

Did this page help you?