AstroBaaS

Tax & compliance

EU VAT Compliance & IOSS/OSS Automation

Paid pluginsize Lplanned, not built

Indicative price, not an offer: $29-99/mo per country; anchor: EAS freemium, competitor $25-50/mo entry

Generated from docs/plan/paid/eu-vat-compliance-ioss-oss-automation/PLAN.md in the AstroBaaS repository. Nothing described below is implemented — it is the written plan for it.

Paid module (EUR 29–99/mo per country or bundled) that automates EU VAT rules: IOSS registration, OSS reporting, reverse-charge logic, intra-community acquisitions, and per-country VAT rates. Handles VAT recalculation on checkout, real-time tax filing integrations (Vertex, Avalara, country-specific APIs), and compliance audit logs. Merchants in the EU or selling to the EU must navigate changing VAT rules monthly; this module enforces them.

The problem

EU VAT rules (IOSS, OSS, reverse charge, triangulation) change monthly and vary by country. I cannot track them manually. Shipping the wrong VAT to a customer or failing to file OSS returns risks EUR 100,000+ fines and reputational damage. No single system handles all permutations.

What it does

  • IOSS (Import One-Stop Shop) registration and number storage per shop; automatic application when selling B2C to EU from outside EU
  • OSS (One-Stop Shop) enrollment per country; automatic VAT rate application and reporting obligation tracking
  • Reverse-charge logic: B2B sales within EU where customer has valid VAT ID are VAT-exempt (system validates ID via VIES before charging)
  • Intra-community acquisition tracking: goods purchased from EU seller by EU business (VAT applies in destination country, not origin)
  • Per-country VAT rate tables (standard, reduced, super-reduced) fetched from upstream source (Vertex, TaxJar, or manual) and cached
  • Real-time VAT recalculation on checkout: applies correct rate based on customer location, B2B/B2C status, and registration scheme
  • Tax filing integrations: quarterly OSS returns (CSV export or API push to Vertex/Avalara/country portal) with invoice-level detail
  • Compliance audit log: every VAT decision (rate applied, scheme chosen, VIES check result) is recorded with timestamp and invoice number

What it deliberately does NOT do

Each boundary carries its reason. A boundary without a reason gets crossed by the next person who reads this.

  • No country-by-country fiscal representation — each country has unique rules (Poland, Hungary, etc.); the module handles the most common EU VAT scenarios (reason: truly universal VAT is impossible; merchants in non-standard countries hire accountants)
  • No real-time filing to every country’s tax authority — filing is a human-reviewed upload or API call per country (reason: countries have different APIs; merchants must approve filings before submission)
  • No VAT reclaim/credit tracking — input VAT is the merchant’s problem (reason: reclaim is a business accounting problem, not an API problem)

Data model

Settings gain: vat_ioss_number (text), vat_oss_enabled (boolean), vat_oss_countries (array of country codes), vat_rates (key-value store of country → category → rate %). New AuditLog entries: vat_decision {order_id, rule_applied (IOSS|OSS|B2B|domestic), rate_applied, calculated_amount, reason}. One-time migration to populate vat_rates.

API

  • GET /api/vat/rates?country=DE (fetch current rates for a country)
  • POST /api/vat/calculate { line_items, customer_country, customer_vat_id, is_b2b } → { total_tax, rate_applied, scheme_used }
  • POST /api/vat/vies-validate { vat_id, country } → { valid: boolean, company_name, country }
  • GET /api/vat/audit-log (paginated log of VAT decisions)
  • POST /api/vat/oss-export { quarter, year } → CSV attachment (for country filing)

Every route added here must also appear in src/pages/openapi.json.ts — a test fails the build if it does not.

Admin

Settings → Tax → EU VAT: input IOSS number, select OSS countries (checkboxes), configure VAT rates per country/category. Dashboard shows OSS compliance status (are we filing on time?) and audit log excerpt (latest VAT decisions). Tax report page allows export of quarterly OSS returns as CSV (merchant then uploads to country portal or via Vertex API).

The seam — why this is paid

Paid module owns IOSS/OSS logic, rate tables, VIES integration, and filing templates. Core owns order storage and checkout flow (checkout calls paid module to calculate tax if installed). Merchant owns IOSS registration and OSS enrollment with tax authorities (module only enforces rules and tracks proof).

Paid module owns per-country VAT rate tables, IOSS/OSS scheme enrollment, tax filing API integrations, and compliance audit logs; fiscal status = commercial + per-country (SEAM rule)

Dependencies

  • Order entity (core)
  • Checkout flow (core)
  • Settings (core)
  • Audit logging (core)
  • Third-party integrations (Vertex, Avalara, VIES API) or static rate tables

Acceptance checks

Each of these must be able to fail. Before claiming this is done, break the code deliberately and watch each one go red.

  • B2C sale from outside EU to Germany: checkout applies IOSS rate (19%) instead of standard rate if IOSS is registered
  • B2B sale to customer with valid VAT ID (checked via VIES): checkout applies 0% VAT and logs ‘reverse charge applied’
  • OSS sale within EU: quarterly export shows invoice-level detail (invoice #, customer country, VAT rate, amount) ready for country filing
  • VIES check of invalid VAT ID returns {valid: false}; checkout rejects the B2B claim and applies B2C tax
  • Audit log shows every VAT decision with reason, timestamp, and associated order

Risks

VIES API goes down; VIES check times out on checkout (need fallback to ‘assume valid if not reachable’). Rate tables become stale; need automated refresh daily. Merchant does not file OSS returns on time; AstroBaaS only tracks and exports, not enforces filing. Reverse-charge edge cases (triangulation, physical goods vs. services) are not handled; accountant review required.

Commercial context

Suggested price$29-99/mo per country; anchor: EAS freemium, competitor $25-50/mo entry
Rival anchor7 apps (Empact free at launch, EAS, SimpleVAT, OO, Taxify, Exemptify); freemium with paid $25-99/mo for filing integration

The anchor is what the nearest equivalent charges on Shopify or Magento today. It is context for a pricing decision, not the decision.


Generated from the commerce plan. See docs/COMMERCE-PLAN.md for the full catalogue and ../../AI-GUIDE.md for how to work on this repository.