NewTell a voided invoice from a totally rectified one, without a second call
BeeL
Get StartedMulti-NIFVeriFactuStripeAPI ReferenceChangelog
ErrorsAll codes

ENV_MISMATCH

API key does not match NIF environment: use a live key for production NIFs and a test key for sandbox NIFs


Category: VeriFactu

Example response

When this error occurs, the API returns a JSON response with the following shape:

{
  "type": "https://docs.beel.es/errors/ENV_MISMATCH",
  "title": "ENV_MISMATCH",
  "detail": "API key does not match NIF environment: use a live key for production NIFs and a test key for sandbox NIFs",
  "instance": "/v1/<resource>",
  "errors": [],
  "success": false,
  "error": {
    "code": "ENV_MISMATCH",
    "message": "API key does not match NIF environment: use a live key for production NIFs and a test key for sandbox NIFs",
    "details": {}
  },
  "meta": {
    "timestamp": "2026-05-21T10:00:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}

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

Message

API key does not match NIF environment: use a live key for production NIFs and a test key for sandbox NIFs
La API key no coincide con el entorno del NIF: usa una key de producción para NIFs reales y una key de test para NIFs de pruebas
La clau d''API no coincideix amb l''entorn del NIF: utilitza una clau de producció per a NIFs reals i una clau de test per a NIFs de proves

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

Other errors in this category

Keep exploring