1. What does a Spanish VAT number reveal?
A Spanish VAT number identifies a taxpayer, but it does not by itself prove that the supplier is trading, solvent or authorized for intra-EU transactions. For a legal entity, its nine-character NIF can indicate the entity category, while the corresponding EU VAT identifier generally adds the ES country prefix.
The Spanish Tax Agency, or AEAT, states that the first character identifies the legal form or class of entity: for example, A denotes a public limited company and B a private limited company. N identifies a foreign entity, while W identifies a permanent establishment of a non-resident entity, according to the AEAT’s NIF guidance. That classification is useful for detecting contradictions, such as a supplier claiming to be an S.L. while presenting an NIF beginning with a letter assigned to another entity type. Treat it as a routing signal, not a complete Spanish company tax ID verification.
A reliable onboarding decision therefore needs several independent outcomes rather than one “VAT valid” flag.
How should teams interpret the seven check results?
Each result should be recorded as pass, review or fail, with the source and retrieval time attached. A supplier can pass one layer and still require investigation at another.
| Check | A pass establishes | A pass does not establish |
|---|---|---|
| NIF format and checksum | The identifier is internally plausible | That the entity exists |
| VIES | The VAT ID is currently recognized for intra-EU use | Domestic trading status or solvency |
| Name match | The submitted name corresponds to the tax identity | That the representative is authorized |
| Mercantile Registry | Registered identity and disclosed legal status | Absence of every operational risk |
| BORME | Relevant published corporate events | A complete real-time registry record |
2. Does the NIF format and checksum pass validation?
Normalize the value to uppercase, remove permitted separators, require nine local characters and validate the entity key, seven-digit body and final control character. Spain’s consolidated Order EHA/451/2008 defines that structure, but a checksum pass establishes only internal consistency—not that AEAT issued or currently recognizes the number.
The official order published by the BOE describes the middle seven digits as a random number under the current system. Teams should therefore avoid treating them as a dependable province code, even though older identifiers historically embedded provincial information. Reject impossible lengths, unsupported entity keys and incorrect control characters before paying for external data calls. Because official legislation specifies a control character without documenting the calculation in operational detail, test any validation library against known cases and AEAT responses rather than trusting its package name alone.
Record the raw input and normalized NIF separately. That preserves an audit trail while preventing spaces, lowercase letters or an ES prefix from producing false mismatches.
3. Is the Spanish VAT ID active in VIES?
Query VIES when the relationship involves intra-EU supplies, because a valid domestic NIF is not automatically an active intra-EU VAT registration. The European Commission’s VIES result shows whether VAT information exists in the relevant national database at the time of the request.
The Commission’s VIES guidance explains that an invalid result can mean the number has not been activated for intra-EU transactions or that registration is not yet complete. It is therefore a review trigger, not automatic proof of a fictitious company. Ask the supplier to resolve the status with its tax authority before applying intra-EU VAT treatment. Store the queried country, identifier, result, timestamp and any consultation reference so the decision can be reconstructed later.
VIES is also not a company-status database. A positive response must remain separate from registry, representative and risk checks.
4. Does the company name match the tax ID?
Compare the supplier’s legal name—not merely its brand—with the name associated with the NIF in authoritative tax or registry data. This catches copied VAT numbers, subsidiary-parent confusion and invoices issued under an outdated or unrelated entity name while allowing explainable differences in punctuation, accents and legal-form abbreviations.
AEAT provides a “Comprobación de un NIF de terceros a efectos censales” service that accepts the NIF together with the person’s name or company name. The AEAT instructions say the service is intended to clean identification data before filing declarations. Normalize common variations such as Sociedad Limitada and S.L., but do not silently accept a different substantive name. Send material mismatches to review and request a tax certificate, registry extract or corrected onboarding record.
The matched name should then become the canonical supplier name used across contracts, invoices and screening systems.
5. Is the legal entity active and consistent with the registration record?
Retrieve current Mercantile Registry information and compare the NIF, legal name, registered office, legal form, incorporation details and disclosed representatives with the supplier’s application. This establishes whether the claimed counterparty corresponds to the registered entity and exposes special situations that a syntactically valid NIF or positive VIES result cannot show.
Spain’s Colegio de Registradores says a mercantile information note can contain general company data, capital, directors and attorneys, published acts, filed accounts and legalized books. Its Mercantile Registry service also identifies special situations such as a closed registry sheet or provisional removal from the tax census when available. Use formal registry certification when the evidentiary standard requires an authoritative certificate rather than an informational extract. If the supplier’s signer or sales contact claims authority, continue with separate Spanish company director checks for KYB.
A missing recent accounts filing is not the same as dissolution, but it can justify enhanced review. Financial assessment should remain a distinct control; the Spanish company financial data API guide explains the separate role of annual-accounts data.
6. Does the NIF align with published BORME records?
Search BORME using both the NIF and normalized legal name, then reconcile the resulting corporate events with the onboarding record and Mercantile Registry evidence. BORME can reveal published changes involving the company’s name, registered office, capital, directors, powers, transformation, merger, dissolution or other registered acts.
The Spanish Official State Gazette explains that BORME’s first section covers registered business acts and other acts published by Mercantile Registries. Its BORME help page also provides access to electronically signed original documents through their verification codes. Build a dated event timeline instead of treating every historical result as current; an appointment may later have been revoked, for example. Resolve conflicting names or addresses against the newest authoritative record and preserve the underlying notice as evidence.
Absence from a narrow BORME search is not proof that an entity does not exist. Search-quality limitations, older publications and name variants make the registry record the stronger source for current legal identity.
7. Can VAT and supplier checks be automated continuously?
Automate deterministic NIF validation at data entry, authoritative lookups during onboarding and event-driven rechecks after approval. A useful Spain NIF validation API should return separate source-level results, timestamps and reason codes rather than collapsing format, VIES, tax-name matching, registry status and BORME evidence into one opaque score.
AEAT’s technical manuals list a bulk identification-data-quality web service supporting simultaneous queries from one to 20,000 records. The BOE also documents a REST API for BORME daily summaries, which can support publication monitoring when paired with entity matching and document retrieval. Apply retries and an “unavailable” state so a source outage does not become a false rejection. Preserve the request, normalized identifiers, response, source version and decision rule for every automated check.
Recheck before material contract renewals, changes to legal identity or high-value transactions, and when an official source publishes a relevant event. Teams designing a wider evidence model can consult Forma’s guides to Spanish public company data for adjacent registry and risk checks.
What else should teams know about Spanish VAT verification?
These practical distinctions prevent a technically correct result from being used for the wrong compliance decision.
Is a Spanish NIF the same as a VAT number?
The NIF is Spain’s domestic tax identifier. For intra-EU VAT verification, the identifier normally appears with the ES prefix and must be recognized for cross-border transactions in VIES; a valid NIF can therefore be absent from VIES.
Does a valid VIES result prove that a Spanish company is active?
No. VIES confirms VAT-registration information for intra-EU purposes, while current legal existence, status and representation must be checked through Mercantile Registry evidence and relevant BORME publications.
Can a checksum replace an AEAT or registry lookup?
No. A checksum can reject mistyped or internally impossible values, but it cannot establish that the NIF was issued, belongs to the submitted company or remains associated with the claimed legal identity.
How often should an approved supplier be rechecked?
Use a risk-based schedule and event triggers. At minimum, recheck when legal names or tax details change, before important renewals or transactions, and when registry or BORME monitoring detects a relevant corporate event.