WooCommerce and Romania's e-Factura (ANAF): sending invoices to SPV automatically
How a WooCommerce order lands in ANAF's SPV automatically: which plugin to pick, how to avoid rejections, and the mistakes that cost you.
Since Romania's e-Factura became mandatory for sales to individuals too, every order in your shop means an invoice that has to reach ANAF's SPV, as XML, within 5 days of issuing it. Do that by hand, invoice by invoice, and you lose time — and worse, you forget exactly when orders pile up.
The good news: WooCommerce can connect to the ANAF system so that, the moment an order is paid, the invoice is generated and sent to SPV on its own. In this article I'll show you the real flow, which option to choose, how to set it up correctly, and the mistakes that get shops' invoices rejected by ANAF.
What "automatic" actually means — the real flow
"Automatic" isn't a magic button. It's a clear chain:
- A customer places and pays for an order in WooCommerce.
- The order triggers invoice creation (usually inside a connected billing app).
- The invoice is turned into XML in the format ANAF requires (RO_CIUS, based on UBL) and sent to SPV over a secure connection using an OAuth token.
- ANAF returns an upload index, checks the file, and if it's valid, applies its electronic seal. From that moment the invoice is officially in e-Factura.
In practice, you configure the link once, and from there each order runs the steps on its own. Your job becomes checking now and then that you have no rejected invoices — not uploading them by hand.
Your choice: a direct-to-ANAF plugin or via a billing app
You have two roads, and my recommendation is clear.
Option 1 — a WooCommerce plugin that connects directly to the ANAF API. It sounds clean, but you stay responsible for the token, its renewal, the XML's compliance and the errors. It's fragile if you don't have someone technical nearby.
Option 2 (recommended) — WooCommerce connects to a Romanian billing app (Oblio, SmartBill, FGO, Facturis and others), and that app forwards to SPV. The app handles the XML, the token and the ANAF communication, and keeps your accounting in one place too.
For most shops, the billing-app route is more stable, cheaper to maintain, and easier to fix when ANAF changes something.
Setup steps, in short
Order matters here, or you get stuck halfway:
- Qualified digital certificate — obtained from an accredited provider. It's the key that identifies you to ANAF.
- SPV enrollment — the certificate must be tied to your company's tax ID (CUI) in the Private Virtual Space.
- Connecting the billing app to ANAF — you generate the OAuth token (valid for a limited period, then auto-renewed).
- Linking WooCommerce to the app — install the connector/plugin and enter the API keys.
- Mapping products and VAT rates correctly — every product needs the right rate (standard, reduced or exempt), or the XML comes out wrong.
- Choosing the trigger: invoice on payment or on order completion. Test with a real order before you leave it on autopilot.
The mistakes that get invoices rejected
ANAF rejects the XML when the data isn't clean. The most common traps:
- Wrong or missing tax ID (CUI/CIF) for business customers — validate it before issuing.
- Missing county — for B2C you need at least the county, otherwise the file fails.
- Unmapped VAT rates or products with no rate set — validation errors appear.
- Duplicate invoices when you edit an already-invoiced order or when a customer retries payment.
- Missing the deadline — you have 5 calendar days from issuing to upload to SPV; don't leave weekend orders unsent.
Tip: don't rely on "it worked in my test". Check invoice status in the app regularly and handle rejections right away, not at month-end.
B2C, B2B and non-VAT payers — the confusing cases
Many shops think e-Factura is only for companies. Not anymore: sales to individuals are reported in SPV too. The difference is in the required data — for individuals you need name and address with county, not a tax ID.
Not registered for VAT? You still have to send invoices to e-Factura; the invoice simply shows the matching rate (no VAT), and the app handles it if you set it up right. Don't skip this step just because you don't collect VAT.
If this whole chain feels like a lot — that's normal. It isn't hard, but it has many pieces that must fit together. At MPO Web Studio we set up the full WooCommerce → billing app → SPV flow remotely, with transparent pricing and a demo you see before you pay. If you want us to check your shop or put it properly on autopilot, send us a WhatsApp message and we'll tell you honestly what needs doing.
Frequently asked questions
Is e-Factura mandatory for my online shop's sales to individuals too?+
Yes. Reporting to e-Factura covers B2C sales, not only sales to companies. For individuals you don't need a tax ID, but you do need a correct name, address and county, or the file may be rejected.
How soon does the invoice have to reach SPV?+
You have 5 calendar days from issuing the invoice to upload it to SPV. An automated flow removes the risk of missing the deadline, especially for weekend or holiday orders.
Do I really need a billing app, or does a plugin alone work?+
A plugin talking directly to the ANAF API works too, but then you stay responsible for the token, XML and errors. For most shops, going through Oblio, SmartBill, FGO or similar is more stable and easier to maintain.
What do I do if ANAF rejects an invoice?+
Check the error message (usually a wrong tax ID, missing county or an unmapped VAT rate), fix the data and resend. The key is catching rejections quickly by checking status in the app, not at month-end.
I'm not registered for VAT. Do I still have to send invoices?+
Yes. The obligation to report to e-Factura doesn't depend on whether you're VAT-registered. The invoice simply shows the matching rate, and the billing app handles it when configured correctly.
7 mistakes that drive clients away from your website
Leave your email and get the guide right here, instantly. No spam.
Want to see what your business's website could look like?
Message us on WhatsApp and we'll build you a free demo website with your business name on it. See it first, then decide — no strings attached.