Skip to content
Satya Legal - Abogados especializados en startups y derecho tecnológico en España

Ecommerce living outside Spain: VAT, tax residency and income tax

Running an ecommerce while living outside Spain - Complete guide on VAT, tax residency and IRPF for online sellers

📖 Reading time: 18 minutes

🎯 For: Founders, ecommerce, digital businesses and Spanish tax nomads/expats

✅ Includes: international VAT, tax residency, IRPF, interposed companies and practical cases

You live outside Spain but sell online to European customers. You have an ecommerce on Shopify, Amazon or your own platform, and every month you invoice more. But there is one question that keeps you awake at night: where and how do you pay taxes?

The answer is not simple. It depends on where you live, where your warehouse is, whether you sell B2B or B2C, and how your business is structured. A mistake can cost you thousands of euros in fines, interest and back-tax assessments.

In this practical guide updated for 2026, we explain everything you need to know about VAT (IVA) on international ecommerce, tax residency, Personal Income Tax (IRPF) and interposed companies when running an ecommerce while living outside Spain. With real examples, practical cases and a risk checklist.

💡 Summary in 5 key points:

  • VAT: If you sell B2C to the EU from outside, you need OSS/IOSS or local registrations. B2B is simpler but requires VAT number validation.
  • Tax residency: Determined by days (183+), centre of vital interests and centre of economic interests. "Living abroad" is not enough.
  • IRPF: If you are tax resident in Spain, you are taxed on worldwide income. If not, only on Spanish-source income (with withholdings).
  • Centre of economic interests: If your business is "managed" from Spain (server, bank account, warehouse), the Spanish Tax Agency (AEAT) may consider you a resident.
  • Interposed companies: Using a Spanish SL just to invoice while living abroad can be an anti-abuse risk if it lacks real substance.

1. International ecommerce VAT: OSS, IOSS and local registrations

VAT is the first hurdle when selling online from outside Spain. The rules change depending on whether you sell to individuals (B2C) or businesses (B2B), and where your customer is based.

1.1. B2C sales (to individuals) within the EU

If you sell to individuals in the EU from outside Spain, you have two main options:

Option 1: One Stop Shop (OSS) – The most practical

OSS lets you declare and pay VAT on all your B2C EU sales from a single country. If you live in Portugal, you register for Portuguese OSS and declare all your European sales there.

  • Threshold: There is no minimum threshold. You can use OSS from the very first euro.
  • Advantage: A single quarterly return instead of registering in every country.
  • Disadvantage: You pay VAT at the destination country's rate (21% in Spain, 23% in Portugal, etc.).

Example: You live in Lisbon, sell €10,000/month to Spanish customers (21% VAT) and €5,000/month to French customers (20% VAT). With OSS, you declare everything in Portugal: €2,100 + €1,000 = €3,100 in quarterly VAT.

Option 2: Local registration in each country

If you exceed the distance selling threshold in a country (typically €35,000/year or €100,000 depending on the country), you must register as an intra-community operator there.

  • Spain threshold: €35,000 annually in sales to Spanish individuals.
  • Process: Apply for a Spanish VAT number (NIF-IVA), file quarterly Modelo 369 returns.
  • When it makes sense: If you sell a lot in a single country and want to avoid OSS.

1.2. Import One Stop Shop (IOSS) for shipments from outside the EU

If you have a warehouse outside the EU (for example in the UK, UAE or China) and you ship small parcels (≤€150) to European individuals, you need IOSS. The marketplace (Amazon, eBay) can act as an IOSS intermediary, or you can register yourself.

📌 Important: Without IOSS, the customer pays VAT at customs and your buying experience deteriorates. In addition, you risk the Spanish Tax Agency (AEAT) claiming unpaid VAT from you.

1.3. B2B sales (to businesses) within the EU

B2B sales are simpler: you do not charge VAT if your customer has a valid EU VAT number in another EU country. The customer applies the reverse charge in their country.

Requirements:

  • Validate the customer's VAT number on the EU VIES system before invoicing.
  • Include on the invoice: "Operation exempt under reverse charge. Art. 84 LIVA".
  • Keep the VIES certificate as supporting evidence.

2. Tax residency: where do you actually pay tax?

Tax residency determines where you pay tax on your income. "Living abroad" is not the same as being a non-resident for tax purposes. The Spanish Tax Agency (AEAT) applies strict criteria.

2.1. Criteria for tax residency in Spain

Under article 9 of the Spanish Personal Income Tax Act, you are tax resident in Spain if you meet any of these criteria:

  • 183-day rule: You spend more than 183 days in Spain during the calendar year. Days are counted by physical presence, not by "intention".
  • Centre of vital interests: Your spouse or minor children habitually live in Spain, or you have your habitual residence here (home, school, doctor).
  • Centre of economic interests: The main base of your economic activities or your economic interests are in Spain (more than 50% of your income, main bank account, warehouse, server).

⚠️ Warning: If you meet any of these criteria, you are tax resident in Spain and pay tax on worldwide income (all your income, wherever it is generated). Holding an NIE from another country or being registered abroad is not enough.

2.2. Centre of economic interests: the most dangerous criterion

This is the criterion that causes the most problems for ecommerce operators living abroad. The Spanish Tax Agency (AEAT) may consider that your centre of economic interests is in Spain if:

  • Your web server is in Spain (or you use Spanish hosting).
  • Your main bank account is in Spain.
  • You have a warehouse or logistics in Spain.
  • More than 50% of your income comes from Spanish customers.
  • Your tax address or registered office is in Spain.
  • You contract professional services (lawyers, advisers) in Spain.

Practical example: You have lived in Lisbon since January, but your Shopify is hosted on Spanish servers, your revenue account is at BBVA Spain, and 70% of your sales go to Spanish customers. Even if you don't spend 183 days in Spain, the Spanish Tax Agency (AEAT) may consider you a tax resident on the basis of centre of economic interests.

3. IRPF: consequences of being resident vs non-resident

Your tax residency status determines how you are taxed on your ecommerce income.

3.1. If you are tax resident in Spain

You are taxed on worldwide income under IRPF:

  • You declare all your income (from Spain and abroad) in your tax return.
  • You can apply the direct estimation regime (simplified if you invoice <€600,000/year).
  • If you have paid tax abroad, you can apply the international double taxation deduction.
  • Progressive rates: from 19% up to 47% depending on your income.

3.2. If you are a non-resident (NR) in Spain

You are only taxed on income obtained in Spain:

  • If you have income from Spanish customers, you are taxed under IRNR (Non-Resident Income Tax).
  • Flat rate: 24% (19% if you are resident in the EU).
  • You file Modelo 210 quarterly or annually.
  • If you sell from abroad and have no permanent establishment (PE) in Spain, you normally do not pay tax here (unless the Spanish Tax Agency (AEAT) considers that you have a PE because of the warehouse/server).

📌 Special case: If you are a non-resident but you have a warehouse in Spain that handles your orders, the Spanish Tax Agency (AEAT) may consider that you have a "permanent establishment" and you would be taxed here as if you were a resident.

4. Interposed companies: when they make sense and when they're risky

Many ecommerce operators living abroad set up a Spanish limited company (SL) to invoice through, thinking it will "optimise" taxes. But this can be a costly mistake.

4.1. What is an interposed company?

An interposed company is a company used mainly to divert income or profits without genuine economic justification. The Spanish Tax Agency (AEAT) can disregard it if it considers it a "fraud of law" or "simulation".

4.2. When using a Spanish SL while living abroad makes sense

✅ Legitimate cases:

  • You have a real warehouse in Spain with employees or contractors managing the logistics.
  • Effective management of the company is in Spain (resident director, decisions taken here).
  • You have real economic substance: office, employees, contracts with Spanish suppliers.
  • The company has a legitimate commercial purpose beyond merely "issuing invoices".

4.3. When it becomes an anti-abuse risk

❌ Risk cases:

  • The SL exists only to invoice, with no real activity in Spain.
  • You live abroad, manage everything from overseas, and the SL is just a "shell".
  • You have no employees, office or economic substance in Spain.
  • Profits are distributed immediately without commercial justification.
  • The company has no real effective management (only a "virtual" tax address).

Consequences if the Spanish Tax Agency (AEAT) detects abuse:

  • It may treat the income as yours personally (not the company's).
  • It applies IRPF as if you were self-employed, with higher rates.
  • Fines and interest for incorrect filings.
  • Risk of tax offence if there is fraudulent intent.

5. Practical examples: real cases

Let's see how these rules apply in real situations:

Case 1: Spanish founder living in Portugal selling to the EU

Situation:

  • Has been living in Lisbon since March 2025 (more than 183 days outside Spain).
  • Sells €50,000/month on Shopify to Spanish, French and German customers (80% B2C, 20% B2B).
  • Server on AWS (Ireland), main bank account in Portugal.
  • No warehouse (dropshipping from China).

Solution:

  • VAT: Register for Portuguese OSS. Quarterly filing: €40,000/month B2C × 3 months = €120,000 × VAT rate per destination country.
  • Tax residency: Probably non-resident in Spain (does not spend 183 days, centre of interests in Portugal).
  • IRPF: Taxed in Portugal as a resident there. If there is some income from Spanish customers, may have to file under Spanish IRNR (but check the Double Tax Treaty (DTT)).
  • Company: If operating as self-employed in Portugal, fine. If setting up a Spanish SL with no substance, it's a risk.

Case 2: Ecommerce with warehouse in Spain and owner abroad

Situation:

  • Lives in Andorra since 2024.
  • Warehouse in Barcelona managed by a 3PL (third party).
  • Sells €80,000/month to European customers.
  • Bank account in Andorra, but the warehouse handles payments to Spanish suppliers.

Solution:

  • VAT: Since the warehouse is in Spain, probably needs a Spanish VAT number and to file here (or use OSS from Andorra if possible, but check).
  • Permanent establishment (PE): The warehouse may constitute a PE in Spain. If so, taxed here as if a resident.
  • IRPF: If the Spanish Tax Agency (AEAT) considers there is a PE, taxed in Spain. Otherwise, in Andorra (but check the Double Tax Treaty (DTT)).
  • Recommendation: Structure with a Spanish SL managing the warehouse, with real substance (contracts, employees/contractors).

Case 3: Shopify + 3PL logistics in another country

Situation:

  • Lives in the United Kingdom since 2023.
  • Sells on Shopify, 3PL warehouse in Poland.
  • Sells €30,000/month, 90% to Spanish B2C customers.
  • Server on Cloudflare (global), account at Revolut (UK).

Solution:

  • VAT: Since shipping from outside the EU (UK), IOSS is needed for parcels ≤€150. If using Amazon FBA or similar, they may handle IOSS.
  • Tax residency: Non-resident in Spain (lives in UK, warehouse in Poland).
  • IRPF: Taxed in the UK as a resident there. If some income is "obtained in Spain" (Spanish customers), may have an IRNR obligation, but check the treaty.
  • Centre of interests: As 90% of income comes from Spain, the Spanish Tax Agency (AEAT) could argue centre of economic interests. Document that you manage from the UK.

Case 4: Using a Spanish SL vs foreign company vs self-employed

Situation:

You live in the UAE, sell €100,000/year. Which structure to use?

Options:

  • Self-employed in UAE: Simple, but no limitation of liability. If something goes wrong, you respond with your personal assets.
  • Spanish SL without substance: Anti-abuse risk. The Spanish Tax Agency (AEAT) may treat it as interposed.
  • Spanish SL with substance: If you have a warehouse/employees in Spain, it can make sense. But you are taxed here.
  • Company in the UAE: If operating from there and you have no PE in Spain, it can be legitimate. But check the Double Tax Treaty (DTT).
  • Recommendation: It depends on where your real activity is. If everything is in the UAE, set up there. If you have operations in Spain, a Spanish SL with substance.

6. Risk and decision checklist

Use this checklist to assess your situation and avoid problems:

✅ Tax residency checklist:

  • Do you spend more than 183 days a year in Spain? → Probably tax resident.
  • Does your spouse/children live in Spain? → Risk of centre of vital interests.
  • Is your main bank account in Spain? → Risk of centre of economic interests.
  • Is your server/warehouse in Spain? → Risk of centre of economic interests or PE.
  • More than 50% of income from Spanish customers? → Risk of centre of economic interests.

✅ VAT checklist:

  • Selling B2C to the EU? → You need OSS or local registration.
  • Selling from outside the EU to individuals? → You need IOSS for parcels ≤€150.
  • Selling B2B? → Validate the customer's VAT number on VIES before invoicing.
  • Exceed €35,000/year in one country? → Review local registration thresholds.
  • Using a marketplace? → Check whether they handle VAT (Amazon, eBay usually do).

✅ Company checklist:

  • Does your SL have employees/contractors in Spain? → Good sign of substance.
  • Do you have a real office/warehouse in Spain? → Good sign of substance.
  • Is effective management in Spain? → You need a resident director here.
  • Does the SL only invoice without real activity? → Anti-abuse risk.
  • Do you live abroad and manage everything from overseas? → Risk if the SL is in Spain without substance.

7. Common mistakes to avoid

These are the most costly mistakes we see among ecommerce operators living abroad:

  • Assuming "living abroad" = non-resident: Not so. The Spanish Tax Agency (AEAT) can consider you resident through centre of interests even if you don't spend 183 days here.
  • Not registering for VAT when selling B2C to the EU: Fines and interest. If you sell €50,000/year without VAT, you could owe €10,500 + penalties.
  • Creating a Spanish SL just to invoice: Anti-abuse risk. If it lacks substance, the Spanish Tax Agency (AEAT) can disregard it.
  • Not validating VAT numbers on B2B sales: If you invoice without VAT to a customer without a valid VAT number, you owe the VAT yourself.
  • Not declaring income in the country where you live: If you are tax resident in Portugal, you must also declare there (even with income from Spain).
  • Using a Spanish bank account while living abroad: A strong signal of centre of economic interests in Spain.
  • Not documenting where you manage the business from: If the Spanish Tax Agency (AEAT) audits you, you need proof that you manage from abroad (contracts, invoices, emails).

8. Frequently asked questions (FAQ)

Can I sell online from Portugal without paying taxes in Spain?

It depends. If you are tax resident in Portugal (you don't spend 183 days in Spain, your centre of interests is in Portugal), you pay tax there. But if you have Spanish customers and the Spanish Tax Agency (AEAT) considers your centre of economic interests is in Spain (server, account, warehouse), you may be considered a resident here. In addition, VAT on B2C sales to Spanish customers must be declared (via OSS or local registration).

Do I need to register for OSS if I sell less than €35,000/year?

It is not mandatory, but it is recommended. OSS has no minimum threshold, so you can use it from the very first euro. If you do not use OSS and you exceed €35,000 in one country, you must register locally there. Using OSS from the start simplifies everything.

Can I use a Spanish SL if I live in Andorra?

Yes, but with conditions. The SL must have real substance in Spain (employees, office, real activity). If you only use it to invoice while managing everything from Andorra, it is an anti-abuse risk. The Spanish Tax Agency (AEAT) can treat it as interposed and apply IRPF to you directly.

What if I have a warehouse in Spain but live abroad?

The warehouse may constitute a "permanent establishment" (PE) in Spain. If so, you are taxed here as if you were resident, even though you live abroad. To avoid this, structure with a Spanish SL that manages the warehouse, with real substance and effective management here.

How do I prove that my centre of economic interests is not in Spain?

Document everything: lease agreement in the country where you live, utility bills there, main bank account abroad, server abroad, contracts with suppliers in your country of residence. If the Spanish Tax Agency (AEAT) audits you, you need clear evidence that you manage the business from abroad.

Do I have to pay VAT if I sell from outside the EU to European customers?

Yes, for B2C sales. If you ship parcels ≤€150, you need IOSS. If they are >€150, the customer pays at customs, but you must ensure VAT is applied correctly. For B2B, you normally do not charge VAT (the customer handles it with reverse charge).

Can I be tax resident in two countries at the same time?

Technically no, but conflicts can arise. If both Spain and another country consider you resident, the Double Tax Treaty (DTT) applies to determine where you are taxed. Normally the country where you have your "permanent home" has priority, but it depends on the specific treaty.

What is the "effective management" of a company?

It is the place where the management and control decisions of the company are taken. If you live abroad but the SL is in Spain, you need a resident director here who takes real decisions, or to document that decisions are made from abroad (but this can be a risk if there is no substance in Spain).

Conclusion: structure your ecommerce correctly from the start

Running an ecommerce while living outside Spain is possible, but it requires careful tax planning. "Living abroad" or "setting up an SL" is not enough. You need to:

  • Understand where you are truly tax resident (not just where you live).
  • Register correctly for VAT (OSS, IOSS or local registrations depending on your case).
  • Structure your business with real substance if you use a company.
  • Document everything so you can justify your structure to the Spanish Tax Agency (AEAT).
  • Consult advisers specialised in international taxation.

A mistake can cost you thousands of euros in fines, interest and back-tax assessments. Better to do it right from the start.

Need help with your international tax structure?

At Satya Legal we are specialists in international taxation, tax residency and structures for ecommerce. We help you structure your business legally and efficiently, avoiding anti-abuse risks and fines from the Spanish Tax Agency (AEAT).

Contact us