Selling consulting, services or SaaS to clients in Spain from outside the EU
Your company sits in the US, Canada, the UK or the Gulf, and a client in Madrid or Barcelona pays for your consulting, development work or software. Unless a tax treaty applies, that client withholds 24% before paying you, for a service used in Spain as for a software royalty. The VERI*FACTU billing software rules reach you only through a Spanish establishment, and the new B2B e-invoicing decree does not yet say how it treats foreign suppliers.
What changes when your client is in Spain
Five Spanish rules, who carries each one and when it applies.
| Obligation | Rule | Who | When or how long | Official source |
|---|---|---|---|---|
| Withholding on services | Services used in Spain and paid by a resident are Spanish-source income, taxed at 24% for a provider outside the EU and EEA | The Spanish client withholds and pays it over | When it pays your fee | LIRNR art. 13, 25 and 31 |
| Withholding on royalties | Royalties paid by a resident, rights over computer programs included, at the same 24% | The Spanish client | When it pays the licence fee | LIRNR art. 13.1.f) 3º |
| Digital services tax | 3% on online advertising, online intermediation and the sale of data | Groups above EUR 750 million worldwide and EUR 3 million in Spain | Declared on form 490 | Law 4/2020 |
| VERI*FACTU billing software | Mandatory rules for invoicing software | A non-resident only if it has a permanent establishment in Spain | 1 January 2027 for corporate income taxpayers, 1 July 2027 for others | AEAT VERI*FACTU FAQ |
| B2B e-invoicing | Electronic invoices between businesses, adopted but not yet applicable | Businesses above EUR 8 million turnover first, then the others; suppliers not established in Spain not addressed | 12 or 24 months after Order HAC/1028/2026 | Royal Decree 238/2026 |
The rest of this page takes each line in turn. Rates and dates are those in the official sources as of 6 November 2026.
The 24% withholding on fees paid from Spain
Your client takes the tax at source, so it comes off what reaches your account.
Spain's Non-Residents Income Tax Law (LIRNR) treats two kinds of fee paid by a Spanish resident as Spanish-source income, even when your company has no office, staff or server in Spain.
Consulting, development, marketing
A service counts when it is used in Spain and paid for by a Spanish resident. Both conditions must be met (LIRNR art. 13.1.b) 2º).
Licences and royalties
Royalties paid by a Spanish resident count as well, and the law names rights over computer programs among them (LIRNR art. 13.1.f) 3º).
The duty to collect sits with the payer. A company resident in Spain, or a professional, that pays your fee withholds the tax and pays it over (LIRNR art. 31.1). You receive the fee minus the withholding, so write in the contract whether your price is before or after Spanish tax.
The 19% rate is for EU and EEA residents
Article 25.1.a) of the LIRNR gives two general rates for non-residents without a permanent establishment in Spain: 24%, and 19% for residents of the EU or EEA. A company resident in the US, the UK, Canada or the Gulf is taxed at 24%. If you priced a Spanish contract on the lower rate, every payment arrives short of what you expected (LIRNR art. 25.1.a)).
Treaty relief
The 24% is the rate when no tax treaty applies. A treaty between Spain and the country where your company is resident can lower it or bring it to zero, for service fees and for royalties, depending on that country. This guide does not cover the treaties or the Spanish procedure for applying them. Before you quote a net price that relies on a treaty, have a licensed adviser in Spain check the treaty with your country and what your client needs from you to apply it.
VERI*FACTU and B2B e-invoicing
Two Spanish reforms on how invoices are produced and exchanged. Neither puts a duty on a foreign seller without a Spanish establishment today.
VERI*FACTU from 2027
Spain's VERI*FACTU rules for invoicing software become mandatory on 1 January 2027 for corporate income taxpayers and on 1 July 2027 for other taxpayers. A non-resident is covered only if it has a permanent establishment in Spain (AEAT FAQ).
Electronic invoices between businesses
Royal Decree 238/2026, published in the BOE on 31 March 2026, makes electronic invoicing compulsory between businesses. It does not apply yet. It starts 12 months after Order HAC/1028/2026, published on 5 October 2026, for businesses with turnover above EUR 8 million, and 24 months after it for the others (AEAT information note).
For VERI*FACTU, the AEAT states the position of non-residents directly: no permanent establishment in Spain, no obligation. For B2B e-invoicing, we found no official text on how the decree treats suppliers not established in Spain (AEAT page on Royal Decree 238/2026).
A Spanish establishment changes the answer
The VERI*FACTU carve-out for non-residents holds only while you have no permanent establishment in Spain. If you plan to hire people or open an office there, have a licensed adviser in Spain check whether that creates one, and plan the change of billing software before the date that applies to you (AEAT FAQ).
The digital services tax and the EU VAT base
One Spanish tax aimed at very large groups, and the VAT rules Spain shares with the rest of the EU.
Digital services tax
Law 4/2020 taxes three digital services at 3%: online advertising, online intermediation and the sale of data. It applies only to groups with EUR 750 million of worldwide turnover and EUR 3 million in Spain, and the tax is declared on form 490 (Law 4/2020). A consulting firm or a SaaS company below those thresholds has nothing to file under it.
EU rules
VAT on cross-border services follows EU rules that work the same way in Spain as in other member states. If you also sell to private individuals, the non-Union One-Stop Shop lets a business established outside the EU register in one member state and declare the VAT due in all the others on a quarterly return (European Commission). From 1 January 2027 the scheme covers all services to non-business customers in the EU, wherever they live (Directive (EU) 2025/516). Our guide to selling services and SaaS in Europe compares these shared rules country by country.
From the first Spanish client to the invoicing reforms
In the order a non-EU provider usually meets them. Dates are the official ones.
Check where the service is used and who pays
A Spanish resident paying for a service used in Spain, or paying a software royalty, means 24% withholding unless a treaty applies. Price with that in mind.
Settle the treaty question and the price basis
Have the treaty with your country checked, and write in the contract whether your fee is before or after Spanish withholding.
Your client withholds and pays over the tax
The Spanish payer keeps the withholding from your fee and pays it over. Keep a record of each amount withheld.
Non-Union OSS return
Only for services to private individuals. From 1 January 2027 the scheme covers all non-business customers in the EU.
VERI*FACTU becomes mandatory
First for corporate income taxpayers, then for the others. It reaches a non-resident only through a permanent establishment in Spain.
B2B e-invoicing starts
First for businesses with turnover above EUR 8 million, then for the others. Check the AEAT position on suppliers not established in Spain before the first wave.
What official sources do not settle yet
We have not reviewed the tax treaties, so this page does not say which of them exempt service fees from the Spanish withholding or reduce the rate on royalties, nor what a Spanish payer needs before applying a treaty rate. We found no official text on how Royal Decree 238/2026 treats suppliers not established in Spain. An extract we found, but have not checked against the VAT law itself, says Spain's general rule on appointing a tax representative for a non-established business does not apply to a business that declares through the non-Union One-Stop Shop (AEAT, non-EU businesses). The sources we read also do not give the deadline or the form your client uses to pay over the withholding. Confirm each point with the Agencia Tributaria or a licensed adviser in Spain before the first invoice.
What Balt Partners coordinates
One contact in Riga for the Spanish side of your contracts.
Withholding map per Spanish client
Which of your fees count as Spanish-source income, the rate that applies to your company and the points to settle in the contract before the first invoice.
Treaty check by a licensed adviser in Spain
We bring in a licensed adviser in Spain to check the treaty with your country and what your client needs to apply it. A licensed local adviser handles any filing in Spain.
Invoicing dates on one calendar
VERI*FACTU, B2B e-invoicing and, if you sell to consumers, the quarterly OSS returns, with the dates that apply to your set-up.
A Latvian SIA when an EU base fits
A Latvian company with its bank account and accounting set-up. Spanish law applies 19% rather than 24% to a provider resident in the EU, and residence depends on where the company is really managed.
If you sell into several EU countries, our comparison of withholding and invoicing rules across Europe sets Spain against the others. If an EU company makes sense, our page on real management and substance in Latvia explains what makes a Latvian company resident in practice.
Questions from non-EU service and SaaS companies about Spain
Yes, when the service is used in Spain and paid by a Spanish resident, or when the payment is a royalty such as a software licence fee. The Spanish payer withholds the tax and pays it over. When no tax treaty applies, the rate is 24% for a provider outside the EU and EEA.
For a non-resident without a permanent establishment in Spain, the general rate is 24%. Residents of the EU or EEA are taxed at 19%. A company based in the US, the UK, Canada or the Gulf therefore falls under 24%, unless a tax treaty changes it.
Royalties paid by a Spanish resident, including rights over computer programs, are Spanish-source income, and so are services used in Spain and paid by a resident. Without a treaty, both are taxed at 24%. Ask a licensed adviser in Spain how your subscription is classified before you rely on a treaty.
It can. Spanish law sets 24% where no treaty applies, and a treaty with your country can lower or remove that charge. This guide does not cover the treaties or the Spanish procedure for applying them, so have a licensed adviser in Spain confirm the rate and what your client needs before the first invoice.
No. A non-resident is covered only if it has a permanent establishment in Spain. Where it applies, VERI*FACTU is mandatory from 1 January 2027 for corporate income taxpayers and from 1 July 2027 for other taxpayers.
Royal Decree 238/2026 makes it compulsory between businesses, but it does not apply yet. It starts 12 months after Order HAC/1028/2026, published on 5 October 2026, for businesses with turnover above EUR 8 million, and 24 months after it for the others. We found no official text on how it treats suppliers not established in Spain.
Not unless it belongs to a very large group. The 3% tax covers online advertising, online intermediation and the sale of data, and applies only to groups above EUR 750 million of worldwide turnover and EUR 3 million in Spain. It is declared on form 490.