Reference number (número de referencia): how to file your Renta with an NIE

In short. The reference number (número de referencia) is a 6-character code with which the tax office (AEAT) lets you into Renta WEB and other Renta campaign services without a digital certificate or Cl@ve. With an NIE, to get it you enter the support number (número de soporte) from your TIE card — the letter E and 8 digits — and the amount from casilla 505 of the previous year's return (currently, the return for 2024), and if you did not file one, the last five characters of the IBAN of a Spanish account (art. 8.1 Orden HAC/277/2026). The number is shown on screen straight away; only the most recent one you obtained is valid, and only in its own campaign: the previous campaign's numbers stopped working on 11 March 2026. If your details are not accepted, the number is issued after logging in with Cl@ve or a certificate, or at an AEAT office by appointment. Checked on 11 November 2026.

This is a task we handle

IRPF — annual tax return Message us on WhatsApp

A specialist will reply within 15 minutes

Related services:

You can file your IRPF return online even without a digital certificate or Cl@ve. For this, the tax office (AEAT) has a separate way of logging in — the reference number (número de referencia): six characters that are issued online based on the details of your document and your previous return or bank account. The general rules — who counts as a tax resident and how Modelo 100 works — are gathered in the article on IRPF and taxes in Spain, and whether you are required to file a return is covered in the article on the €22,000 threshold.

Below: what the number gives you, what details the form will ask for if you have an NIE, where to find them and what to do if the system does not accept them. We checked the procedure on 11 November 2026 against the Spanish Ministry of Finance's order on the Renta 2025 campaign and AEAT guidance.

We look into your situation and prepare the data, while the calculation and filing are done by our tax specialist: more on the IRPF annual tax return page.

In this article
What the reference number gives youWhat details the form asks for if you have an NIEHow to get the number and file your return: step by stepHow long the number is validIf your details are not acceptedReference number, Cl@ve and certificate: what is the differenceIf a specialist files your returnSources (checked on 11 November 2026)Frequently asked questions

What the reference number gives you

For filing IRPF online, the campaign order allows four ways of logging in: an electronic certificate (including the one in the DNIe), Cl@ve Móvil, the reference number and eIDAS for EU citizens (art. 8.1 Orden HAC/277/2026). The number is the tax office's own system: under art. 2.c of Orden HAP/2194/2013, it is used to file two returns, IRPF (Modelo 100) and wealth tax (Modelo 714). With the number you:

  • get your tax data (datos fiscales) and a draft, complete them and file the return in Renta WEB, whether it shows a refund or an amount to pay;
  • view the returns you have filed and the status of your refund;
  • file your return for 2024 if you are late with it: according to AEAT guidance, the Renta 2024 service accepts the current campaign's number;
  • change your tax address (domicilio fiscal) and request an IRPF certificate (certificado tributario);
  • give it to an AEAT officer when your return is prepared by phone (the “Le Llamamos” plan): this requires the number or Cl@ve Móvil (art. 6.2.b of the order).

There is a limitation when paying. Having the tax debited from your account straight from Renta WEB (cargo en cuenta) is only possible after logging in with a certificate, DNIe or Cl@ve. With the number, you are left with a direct debit order to your bank (domiciliación; in 2026, until 25 June, art. 12.3 of the order), a card or Bizum, an NRC code from your bank and a form for paying at the bank.

What details the form asks for if you have an NIE

With an NIE, instead of the date that DNI holders are asked for, the form asks for the support number (número de soporte) — the number of the card itself. Where to find it is explained in AEAT guidance:

Document Where the support number is How to enter it
TIE card or residence permit (permiso de residencia) On the front The letter E and 8 digits, for example E87654321
EU citizen certificate in card format On the back The letter C and 8 digits; if there are fewer digits, zeros are added in front: C09999999

On older EU certificates printed on a sheet of paper, the number is on the front, in the top right corner. If your NIF begins with K, L or M, instead of the document date or support number you will be asked for your date of birth.

Next, the system itself checks whether you filed a return for the previous year, individually or jointly with your spouse. If you did, it asks for the amount from casilla 505 “Base liquidable general sometida a gravamen”, that is, the general taxable base. AEAT specifically warns that this is not the final amount to be refunded or paid. The line can be seen in the copy of that return or draft, in the “Documento de ingreso o devolución”. Enter the euros in digits only and the cents after a comma: 18350,25.

If you did not file a return for that year or casilla 505 shows zero, you will be asked for the last five characters of your IBAN. Under the Renta 2025 campaign order, this is a Spanish bank account that you held on 31 December 2025; a foreign account will not do.

Which return to use now. At present the number is issued on the basis of casilla 505 of the return for 2024 (filed in 2025), not for 2025: this is what AEAT guidance says. If the procedure does not change, numbers will start being issued afresh for the 2027 campaign, and you will be asked for the amount from the return for 2025. If a specialist filed it for you, ask for a copy in advance.

How to get the number and file your return: step by step

1. Open the form
On sede.agenciatributaria.gob.es, in the Renta section, click “Obtén tu número de referencia” and choose “Número de DNI/NIE y casilla del ejercicio”. Another way is to open “Servicio tramitación de borrador / declaración”, choose the “Número de referencia” login and click “No tengo Referencia”.
2. Enter your details
Your NIE and support number, then “Continuar”. At the next step, the amount from casilla 505 or the five characters of your IBAN, and “Obtener referencia”.
3. Write down the number
The six characters will appear on screen straight away. Save them: you will need the number every time you log in to the Renta services.
4. Log in to Renta WEB
In “Servicio tramitación de borrador / declaración”, enter your NIE and the number, and in the “Servicios disponibles” section open “Borrador/Declaración (Renta WEB)”. The draft is put together from the data the tax office holds at that moment; whatever is missing from it, you add yourself.
5. Check and submit
“Validar”, then “Presentar declaración”, choosing the refund or payment method, ticking “Conforme” and “Firmar y enviar”. Save the PDF with the CSV code: it is your proof of filing.

How long the number is valid

A number serves one campaign: on 11 March 2026 numbers for the Renta 2025 campaign began to be issued, and the previous campaign's numbers stopped working. Returns for 2025 were accepted from 8 April to 30 June 2026 (art. 7.1 Orden HAC/277/2026), but a number obtained from 11 March is still valid now, for example for a late return. If the procedure does not change, it will stop working when numbers for the next campaign start being issued. What happens if you file late is covered in the article on filing your tax return late.

Only the most recent number you obtained is valid: each new one cancels the previous one, including one issued in the AEAT app, and you can get a number up to 10 times a day. The AEAT app holds up to 20 users, each with their own number; the owner is verified through Cl@ve, a certificate or DNIe, and in a new campaign the app offers to renew the number using your document details.

If your details are not accepted

  • Support number. Check the letter before the digits: E from a TIE card; C from an EU citizen certificate, and if it has fewer than eight digits, zeros on the left.
  • Casilla 505. Check the amount against a copy of the return. If you have no copy, the “Consulta de declaraciones presentadas” service shows the returns you have filed, including by the CSV code from the proof of filing.
  • The form has no casilla option. Issuing by casilla 505 may have been disabled: this is done if the return's data could have been seen by third parties. In that case the number is obtained through Cl@ve, a certificate or DNIe, and issuing can be re-enabled with Cl@ve Móvil, a certificate, DNIe or at an AEAT office.
  • Nothing works. The number is issued without casilla 505 after logging in with Cl@ve, a certificate or DNIe (art. 8.1 of the order) or at an AEAT office by appointment.

How to register with Cl@ve with an NIE is covered in the article on Cl@ve for foreigners. The FNMT certificate is also issued on the basis of the NIE assignment document together with your passport; where to verify your identity for it is explained in the article on identity verification for the certificado digital.

Reference number, Cl@ve and certificate: what is the difference

Method Where it works How to get it How long it is valid
Reference number Renta services and certain AEAT services Online, straight away: document details plus casilla 505 or IBAN One campaign; the most recent number obtained is the one that works
Cl@ve AEAT and other public authorities that accept Cl@ve Registration: a letter to your tax address, a certificate or a visit to an office One-off registration; logins are confirmed in the app or with an SMS code
FNMT certificate Government portals that accept an electronic signature; it is also used to sign documents Online request, document check at an office, download Until the date in the certificate itself; for those issued now, until 31 December 2028

If a specialist files your return

For a representative, AEAT guidance describes two routes. With a power of attorney registered with the tax office (apoderamiento) — general or for Modelo 100 — they open your return with their own Cl@ve Móvil, certificate or DNIe. A colaborador social (a specialist or organisation with a collaboration agreement with the tax office) files returns with the taxpayer's permission (art. 92 LGT): they log in with their own signature and your valid reference number. And AEAT does not allow third parties to log in with your Cl@ve codes, even with your consent.

We look into your situation and prepare the data, while the calculation and filing are done by our tax specialist. We will tell you before we start what access to your return they need in your case and what you need to do for that, and we will remind you about the next campaign in advance.

Sources (checked on 11 November 2026)

Frequently asked questions

I have an NIE and a TIE card but no digital certificate. Can I file my Renta with a reference number?
Yes. The reference number is one of the login methods that the campaign order allows for filing IRPF online (art. 8.1 Orden HAC/277/2026). With an NIE, to get it you enter the support number from the front of your TIE — the letter E and 8 digits — and the amount from casilla 505 of your return for 2024 (AEAT currently issues numbers on the basis of this return), and if you did not file it or it shows zero, the last five characters of the IBAN of a Spanish account. The number is shown on screen straight away, and you use it to log in to Renta WEB.
This is my first year in Spain and I have never filed a return before. What do I enter instead of casilla 505?
The last five characters of the IBAN of a Spanish bank account that you held on 31 December of the previous year: in the Renta 2025 campaign order, on 31 December 2025. A foreign account will not do for this. If you did not have a Spanish account, the number is issued after logging in with Cl@ve or a certificate, and also at an AEAT office by appointment.
I got a reference number last year. Does it still work?
If you got it before 11 March 2026, no: a number serves one campaign, and the previous campaign's numbers stopped working on 11 March, when new ones began to be issued. A number obtained from 11 March 2026 is still valid now, unless you have obtained another one after it: only the most recent number you obtained works. If the procedure does not change, it will stop working when numbers for the next campaign start being issued.
The form says my details are wrong. What should I check?
The letter in the support number (E from a TIE card; C from an EU citizen certificate, with zeros on the left if there are fewer than eight digits) and the amount itself: casilla 505 is the general taxable base, not the final amount to be refunded or paid. If you did not file a return for 2024 or casilla 505 shows zero, you need the IBAN of a Spanish account. When nothing works, the number is issued after logging in with Cl@ve, a certificate or DNIe, and also at an AEAT office by appointment.
My husband and I file a joint return. Do we need one number or two?
Two: each spouse has their own reference number. For a joint return you will need your spouse's NIF and their reference number or Cl@ve Móvil (art. 8.1 Orden HAC/277/2026). If you do not have your spouse's details, in Renta WEB you can choose to calculate only your individual return.
I am late with my return. Can I file it with a reference number?
Yes. A number obtained from 11 March 2026 is valid in the Renta 2025 services, where the return for 2025 is also filed. For the return for 2024, according to AEAT guidance, the Renta 2024 service accepts the current campaign's number, as well as Cl@ve, a certificate and eIDAS. How much extra you will have to pay for filing late is covered in the article on filing your tax return late.
Our tax specialist will file your IRPF return
Tell us whether you have filed a tax return in previous years and where your income comes from — Spain or other countries. We will tell you whether you need a return for 2026 and what we will need from you for it, and give you the timeframe and cost before we start.
Message us on WhatsApp

A specialist will reply within 15 minutes

This is a task we handle IRPF — annual tax return