NewConnections and customer replies to invoices
BeeL
Get startedMulti-NIFVeriFactuRulesStripeAPI referenceChangelog
ErrorsAll codes

NIF_VALIDATION_INVALID

The NIF is not in the AEAT census or, for an individual, the legal name does not match


Category: General

HTTP status422 Unprocessable Content
RetryAfter fixing the cause

When it happens

AEAT does not identify the NIF: it is not in the census or, for an individual, the name sent does not match the one registered. AEAT gives the same answer in both cases, so they cannot be told apart. It is checked in the sandbox too, so a made-up NIF with a valid check digit is rejected.

How to fix it

Check the NIF and, for an individual, send the name exactly as it is registered with AEAT.

Retry

Not as is: the same request fails the same way. Fix the cause described above, then send the request again, under a new Idempotency-Key if the body changed.

Example response

When this error occurs, the API answers 422 Unprocessable Content with a JSON body of this shape:

{
  "type": "https://docs.beel.es/errors/NIF_VALIDATION_INVALID",
  "title": "NIF_VALIDATION_INVALID",
  "detail": "The NIF is not in the AEAT census or, for an individual, the legal name does not match",
  "instance": "/v1/<resource>",
  "errors": [],
  "success": false,
  "error": {
    "code": "NIF_VALIDATION_INVALID",
    "message": "The NIF is not in the AEAT census or, for an individual, the legal name does not match",
    "details": {}
  },
  "meta": {
    "timestamp": "2026-05-21T10:00:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}

The type URI is stable and always resolves to this page.

Message

The NIF is not in the AEAT census or, for an individual, the legal name does not match
El NIF no consta en el censo de la AEAT o, si es persona física, el nombre fiscal no coincide
El NIF no consta al cens de l'AEAT o, si és persona física, el nom fiscal no coincideix

Send the request with Accept-Language: <es|en|ca> to receive the message in your preferred language.

Other errors in this category

Keep exploring