(ESP) About tax-exempt number validation

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Tax-exempt numbers are unique identifiers issued by the Agencia Estatal de Administración Tributaria (AEAT) to Spanish companies and individuals, and to foreign residents. These numbers must be included on all legal documents. To comply with validation requirements, some companies must change their tax-exempt numbers, and will post transactions using both their old and new tax-exempt numbers.

The three tax-exempt numbers are the Código de Identificación Fiscal (CIF), Número de Identificación Fiscal (NIF), and Número de Identificación de Extranjeros (NIE).

CIF tax-exempt number validation

The CIF is issued to Spanish companies. It consists of nine alphanumeric characters in the format TDDDDDDDC, where:

  • T – A letter that identifies the type of company.

  • D – A number from zero to nine.

  • C – A control element, which can be a number or a letter.

NIF tax-exempt number validation

The NIF is issued to individuals. It consists of nine alphanumeric characters in the format DDDDDDDDC, where:

  • D – A number from zero to nine.

  • C – A control element, which can be a number or a letter.

NIE tax-exempt number validation

The NIE is issued to foreign individuals who reside in Spain. It consists of nine alphanumeric in the format MDDDDDDDC, where:

  • M – A marker that can be the letter X, Y, or Z.

  • D – A number from zero to nine.

  • C – A control element, which is a letter.

See also

Tax exempt numbers (form)