Guides/Hacienda

Hacienda & Agencia Tributaria

Your complete guide to navigating Spain's tax office - from getting your Cl@ve PIN to filing online.

8 min readPractical guide

What is "Hacienda"?

Hacienda is the colloquial name Spaniards use for the tax authorities - like saying "the IRS" in the US or "HMRC" in the UK. The official name is Agencia Estatal de Administración Tributaria (AEAT), commonly shortened to Agencia Tributaria. When someone says "I have to deal with Hacienda," they mean they're doing something tax-related.

What does the Agencia Tributaria do?

The Agencia Tributaria is responsible for:

Collecting taxes

IRPF (income tax), IVA (VAT), corporate tax, import duties, and other national taxes.

Processing tax returns

Receiving and reviewing your Declaración de la Renta, issuing refunds, and handling amendments.

Fighting tax fraud

Investigating tax evasion, conducting audits, and ensuring compliance.

International cooperation

Exchanging information with other countries through CRS and tax treaties.

Accessing Hacienda online (Sede Electrónica)

Most tax matters in Spain can be handled online through the Sede Electrónica (electronic headquarters). To access it, you need one of these authentication methods:

Choose Your Access Method

Cl@ve PIN

Easiest to use
SMS verification
Requires registration
Best for occasional use

Certificado Digital

Full access to all services
Install on computer
In-person verification
Best for frequent use

DNIe / NIE Card

Uses your ID card
Needs card reader
Not all NIEs work
Spanish citizens mainly

🔑 Expat tip: Start with Cl@ve PIN - it's the easiest to set up

Cl@ve PIN

A temporary access code sent to your phone. Easiest for occasional use.

How to get it:

  1. 1. Register at clave.gob.es (requires video call or in-person registration)
  2. 2. Set up your phone number
  3. 3. Request a PIN each time you need access (sent via SMS)

Certificado Digital (FNMT)

A digital certificate installed on your computer. Best for frequent use.

How to get it:

  1. 1. Request at sede.fnmt.gob.es
  2. 2. Verify identity in person (Hacienda office, Social Security, town hall)
  3. 3. Download and install the certificate

DNIe / NIE Electrónico

Use your electronic ID card with a card reader. Requires compatible DNI/NIE.

Note: Not all NIE cards have electronic functionality.

For expats and non-residents

Getting Cl@ve or a certificado digital as a foreigner can be tricky. Many people use a gestoría (tax agency) to file on their behalf, which is what we offer at dotaxspain - no digital certificate needed from you.

What is Renta Web?

Renta Web is the online platform where you file your Declaración de la Renta. It's part of the Sede Electrónica and opens each year during tax season (April-June).

What you can do on Renta Web:

  • Access your borrador (draft declaration)
  • View pre-filled data from employers, banks, and property registry
  • Add missing income or deductions
  • Submit your declaration and choose payment method
  • Track refund status

Making an appointment with Hacienda

You can get help from Hacienda by phone or in person, but you'll need an appointment:

Plan "Le Llamamos" (We Call You)

Book a time slot and a Hacienda agent will call you to help file your return over the phone. Available during tax season.

Note: Service is in Spanish only.

In-person appointment (Cita Previa)

Visit a local Hacienda office. Book via phone (901 200 351) or online at the Sede Electrónica.

Bring: NIE/DNI, reference number (número de referencia), supporting documents.

Useful phone numbers

  • 901 33 55 33 - General tax information
  • 901 200 351 - Book appointments
  • 91 554 87 70 - From abroad (regular number)

Common tasks at Hacienda

Get your Número de Referencia

A code to access your tax data. Get it online with your NIE + mobile or previous year's tax amount.

Request a Certificado de Estar al Corriente

Certificate proving you have no outstanding tax debts. Often needed for government contracts or grants.

Obtain Datos Fiscales

Download all the income data Hacienda has on file about you. Useful for checking your records.

File a Declaración Complementaria

Submit a correction if you made an error on a previous year's declaration.

Request a Devolución (Refund)

Check status of pending refunds or report missing refunds.

Tips for dealing with Hacienda

Keep records of all submissions and communications for at least 4 years.

Save the "justificante" (receipt) after every online submission - it's your proof of filing.

Don't ignore letters from Hacienda - respond within the stated deadline to avoid penalties.

Use Chrome for the Sede Electrónica - some features don't work well in other browsers.

If in doubt, ask a professional - errors can be costly to fix later.

Skip the hassle - let us handle Hacienda

We deal with the Agencia Tributaria so you don't have to. Professional tax filing in English.

Get Started