tax id validation rules

The Ultimate Guide to tax id validation rules for Autónomos in Spain

You did the hard work. You landed a new client, delivered the project, and now it is time for the best part: getting paid. But then you realize your client is based in Germany, or maybe the USA, and the cold sweats begin. Do I charge them IVA? What ID document do I ask for? And what is Hacienda going to say?

Being an autónomo is a challenge; dealing with bureaucracy shouldn’t be. With strict new regulations like Verifactu coming into play, issuing a factura with the wrong client data can lead to serious headaches. To keep your business 100% Hacienda-friendly, you need to master the exact tax id validation rules for every type of customer. In this guide, we break down how the Spanish census works, what VIES actually is, and what to do when you bill outside of Spain.

The Document Maze: Who is your client?

For an invoice to be perfectly legal, Hacienda needs to know exactly who you are selling to. Depending on where your client lives and whether they are a company (persona jurídica) or an individual consumer (persona física), the verification process changes completely.

Here is the exact map of the tax id validation rules you must follow:

1. Clients Resident in Spain (The Censo)

If your client lives in Spain, the process is straightforward but very strict.

  • Residente jurídica (Company): Must be validated against the Spanish census.
  • Residente física (Individual): Must also be validated against the Spanish census.

In both cases, their data must be cross-checked against the Hacienda database. If the NIF doesn’t match the name registered with the tax agency, your factura will trigger an error.

2. European Union Clients (VIES vs. Type 04)

This is where things get interesting and where most freelancers make mistakes with their tax id validation rules.

  • UE jurídica (EU Company): You must perform a VIES validation. VIES (VAT Information Exchange System) is a European database. For a B2B invoice to go without IVA, the system verifies both the Spanish seller (you) and the EU buyer.
  • UE física (EU Individual): Pay attention here! As our tax experts always point out, if you sell to a European consumer (físico), applying VIES validation makes absolutely no sense. For electronic invoicing purposes, this is classified as “Type 04”. You do not perform a VIES check, and you do not cross-check the Spanish census. You just need their local ID document.

3. Foreign Clients (Outside the EU)

If you land a client in the USA, Mexico, or Japan, forget about complex databases.

  • Extranjero jurídica (Foreign Company): Classified as Type 04.
  • Extranjero física (Foreign Individual): Classified as Type 04.

Under the current tax id validation rules, there is no VIES validation and no census cross-check for these clients. In fact, for Type 04 validations, the system does not even take the physical address into account for the backend validation. You simply use their country’s ID document.

TaxOlé does the dirty work for you

Manually checking if a client is in the census or running a VIES check on the European Commission’s website every single time you issue a factura is a massive waste of time. Worse, making a mistake will leave you exposed to fines.

Our platform is designed to take this weight off your shoulders. When you enter your client’s data in TaxOlé, our system automatically applies the correct tax id validation rules. We detect if they need a census check, a VIES validation, or if they are a Type 04 document. We run the checks in milliseconds so you just have to click “Emitir.” Stop stressing over the paperwork, keep your dinero safe, and invoice sin líos.

PREGUNTAS FRECUENTES (FAQs)

1. What exactly happens during a VIES validation? Under the official tax id validation rules, a VIES validation checks if a company within the European Union is officially registered to perform intra-community operations. If you (the Spanish seller) have an EU buyer, the system checks both parties to ensure the transaction can be legally exempt from IVA.

2. Do I need to do a VIES check if I sell to an individual in France? No. If you sell to a persona física in another EU country, their document is classified as “Type 04” and does not need to be verified in the VIES database.

3. What is a “Type 04” document? In the context of Spanish electronic invoicing and Verifactu, “Type 04” is a technical category assigned to foreign IDs (EU individuals or any non-EU client) that cannot and should not be validated against the Spanish census or the VIES system.

4. Does my current invoicing software automate these tax id validation rules? If you are using Excel templates or uncertified software, absolutely not. That is why it is vital to upgrade to a certified platform like TaxOlé, which automates all these backend checks so your facturas are always 100% legal with Hacienda.

Scroll to Top