Skip to content

Fiskaly Validate TIN

This module allows validating a tax identification number (TIN - Tax Identification Number) using the Fiskaly API. It accepts Spanish NIF, CIF and NIE formats, as well as tax numbers from other countries by configuring the country_code.

Validation is performed via a POST to the Fiskaly API that verifies the structure and validity of the provided tax number. The result indicates whether the number is valid or not, along with additional details.

The module is of type hidden (hidden in the main interface).

ParameterTypeRequiredDescription
credentials_idcredentialsYesFiskaly credential
tintextYesTax identification number to validate (NIF/CIF/NIE)
country_codetextNoISO country code (default: ES)

Requires Fiskaly type credentials with:

  • api_key: Fiskaly API Key
  • api_secret: Fiskaly API Secret
{
"nextModule": "siguiente_modulo",
"data": {
"success": true,
"valid": true,
"tin": "B12345678",
"details": { "...detalles de la validacion..." },
"message": "NIF/CIF B12345678 es valido"
}
}

If not valid:

{
"nextModule": "siguiente_modulo",
"data": {
"success": true,
"valid": false,
"tin": "XINVALIDO",
"details": { "...detalles del error..." },
"message": "NIF/CIF XINVALIDO no es valido"
}
}
{
"credentials_id": "mi-fiskaly",
"tin": "B12345678",
"country_code": "ES"
}
  • Fiskaly SIGN ES API - POST /validation/tin
  • The default country code is ES (Spain)
  • Supports NIF (individuals), CIF (legal entities) and NIE (foreigners)
  • Useful as a preliminary step before creating a taxpayer or client to ensure correct data
  • A valid: true result does not guarantee that the NIF is active with the AEAT, it only validates the format