Website accessibility
Show or hide the menu bar
Barcelona Village

Electronic certificates and tax and IVA

You can make online declarations for things like IVA via the website. BUT you have to have a digital certificate (certificados electronico). Unfortunately there are glitches and technical problems particularly if you're using Firefox (and for bigger forms a bunch of really weak implementations).

A digital certificate (certificado electronico) is simply an electronic means of verifying who is sending a piece of information to the tax office. To be able to file anything online to the Spanish tax office or Hacienda you need to get one. It's free and it's not that hard, but like most things with the AET, it will take a few goes to get it right with plenty of dead ends on the way (if the AET was an operating system it would be Unix - out of date, no help to anyone but experts, no prompts or help and with no idea of how to make things easy).

To get a digital certificate go to Agencia Tributaria website ( From here find the section on 'Certificados Electronicos'.

Go to 'Como obtener un certificado electronico' and then go to the list of organisations that are permitted to issue certificates ('Entitades emisoras de certificados electronicos').

There are many organisations with no immediately obvious difference between any of them. The certificate is free so I chose the first one in the list (FNMT) which seems fine.

For FNMT go to 'Obtenga el Certificado de Usuario'. This is the instructions page. Basically, you're going to request a certificate (Solicitud del certificado in the left hand links). You enter your NIE/NIF and out pops a code 9 numbers long. Print this out.

For the next step you have to be physically confirmed as the right person which means going and visiting one of the approving offices in person - this could be your tax office, or another public building/institution. Take the print out with your 9 digit code on it and your ID.

This office verifies your identity to FNMT. Once this is done (usually immediately but might take a day to process), you can download the certificate 'Descarga del certificado' from the website.

Now the Firefox problems start. To use the certificate, you need to configure a few things in Firefox first (extremely annoying otherwise). Firstly, if you haven't already, you need to go to Tools -> Options -> Security and make sure the box 'Use a master password' is ticked. You will be asked for a password which will then manage your digital certificate - you'll be asked for it when you submit the electronic modelos. If you don't have the 'Use a master password' ticked then when you come to submit, you'll still be asked for a password and blank won't be accepted (this is a Firefox not AET quirk), so you must have it set up.

Secondly, you need to ensure that the issuing authority (in this case FNMT) is registered in Firefox as being a valid certificate provider - big glitch this one since otherwise you get the message Su certificado no ha permitido realizar una firma válida when you try to submit with no obvious reason as to what's going on. To get round this, in Firefox go to Tools -> Options -> Advanced. Then click 'View Certificates'. Go to the tab 'Authorities' find FNMT (or the certificate provider if it's someone else). Here I have FNMT Clase 2 CA - FNMT. Click on this and then the 'Edit...' button at the bottom. There are three boxes for 'trust settings' - just tick them all and OK.

Now you are ready and can actually use it.


For larger forms (eg the end of year IVA declaration Modelo 390 (and Informativas 349), the implementation by the AET is extremely clunky (and doesn't feel particularly secure). You have to download a program (very very clunky and 1980s feel to it!) which creates a datafile. THEN modify a Firefox security setting to upload the data to the AET.


AET have simplified the system, so now you download an installer which correctly updates the master certificates so they are accepted without all the bugs and errors.

They now require you to download a Java applet for the completion of forms - this means you will need to have Java running - many people turn it off because of security concerns about Java). In principle using an applet should help reduce mistakes, but infuriatingly it only checks the content at submission after it has switched to a new page, with the effect that if you make an error you may lose all the numbers you've entered.


The AET Java applet requires the use of the latest Java RTE. So for anyone using Linux, the applet only works if you have the proprietary Oracle Java RTE installed. The open source version of Java breaks the applet and you can't complete the form correctly.

(Why they do not use simple https:// and forms with Javascript crossing checking is beyond me - they could also use much simpler page-by-page questionnaire to generate the form data. Way easier to set up, test, implement and modify - look at how the UK works...).

Previous article: Fine for non-submission of VAT form Next article: The lack of state-citizen trust in Spain

More details

Go to Notanant menuWebsite accessibility

Access level: public

This site uses cookies. By continuing to use this site you agree to our use of cookies: OK