Beskrivelse
Romanian law requires B2B invoices to be transmitted to ANAF’s e-Factura (SPV) system.
Autoanaf E-Invoicing for WooCommerce does it for you, automatically:
- When an order reaches the completed status, the order is signed (HMAC-SHA256) and pushed to the Autoanaf service.
- Autoanaf generates the EN 16931 / CIUS-RO UBL 2.1 e-invoice, submits it to the ANAF SPV, polls the government’s accept/reject answer, and stores everything in your Autoanaf dashboard.
- Dedupe built-in — each order is submitted at most once, even if the status flips back and forth.
- Retries — transient failures (network/5xx) retry automatically with backoff.
- Signed transport — every push goes over HTTPS with an HMAC-SHA256 signature.
What you need
- WordPress 6.5+ (tested to 7.1 — 6.5 is the floor because
Requires Pluginsis only enforced from there), WooCommerce 7.0+ (tested to 11.1) and PHP 7.4+. - A Autoanaf account (free tier available) at https://autoanaf.ro — this is an external service; the plugin is only the sender, Autoanaf does the filing.
- Your company name and CIF / VAT ID, authorized for e-Factura in the ANAF SPV (the same CIF you use to send invoices manually).
- Your company county (ISO 3166-2:RO, e.g.
RO-NT) — required for a Romanian issuer, because ANAF rejects e-invoices whose Romanian party has no country subdivision (CIUS-ROBR-RO-110). An issuer outside Romania leaves it empty and the plugin sends no subdivision at all.
External service disclosure
This plugin transmits order data to Autoanaf (https://autoanaf.ro), an
e-invoicing service operated by FISCAL LINK S.R.L. (Romania). What is sent, and when:
- When: an order reaches the
completedstatus (the plugin’s only outbound trigger). - What: the order data WooCommerce’s own REST API exposes for that order — order id and
number, status, dates, currency, line items, totals and taxes, and the customer’s
billing/shipping name, company, VAT id, address and email — plus the issuer details you
configure in the settings page. - Where: to the Autoanaf API endpoint you configure, over HTTPS, signed with the
webhook secret you set. From there the resulting e-invoice is submitted to the Romanian
tax authority’s SPV. - No other external connections. Nothing is sent to any other third party, and no
tracking or analytics calls are made from your store.
Autoanaf’s terms and privacy policy: https://autoanaf.ro/terms and
https://autoanaf.ro/privacy.
Free tier and paid plans
The plugin is free. The Autoanaf API has a free Developer tier (100 calls/month, ANAF test
environment) — enough to wire the plugin up and validate the flow end to end. Real submissions
to the production SPV need a paid plan (Starter and above); paid plans also cover higher volume,
credit notes, OCR capture and more. Deactivating the plugin leaves your WooCommerce store
untouched — no data remains on your site except the settings you entered.
Skærmbilleder



Installation
Hosted step-by-step guide: https://autoanaf.ro/connect/woocommerce
- Download the plugin zip from that page and install it in WordPress: Plugins Add New Upload Plugin Install Now Activate. (Once the WordPress.org directory listing is approved you will also find it under Plugins Add New.)
- Create an account at https://autoanaf.ro. Your account email is the tenant ID the plugin needs; an API key is only necessary if you also call the REST API directly.
- Open Settings Autoanaf and fill in:
- Tenant ID — your Autoanaf account email.
- Webhook secret — any long random string you invent, e.g.
openssl rand -base64 32. It signs each push (HMAC-SHA256) and travels in the request URL; keep it secret, like a password. (Do not usewp config shuffle-salts— rotating your WordPress salts logs out every user on the site.) - Company name (issuer) — your legal company name; it appears on the e-invoice.
- Company CIF / VAT ID (issuer) — your Romanian fiscal code (e.g.
RO12345678); it must be authorized in the ANAF SPV. - Company country — ISO 3166-1 alpha-2 code (defaults to
RO); the county below is required only while this isRO. - Company county — the ISO 3166-2:RO code of your registered address county (e.g.
RO-NT). Required for a Romanian issuer only. - Issuer address fields — street, city and postal code, as they appear on invoices.
- Save. Completed orders now flow to ANAF automatically. The settings page shows an Active state once the configuration is complete.
FAQ
-
Which orders are submitted?
-
Only orders that reach the completed status. Use the WooCommerce status workflow
(processing completed) as usual. -
What does Autoanaf do with the order?
-
Maps it to an EN 16931 / CIUS-RO UBL 2.1 invoice, submits it to the ANAF SPV with your
authorized CIF, and tracks the government answer (accepted/rejected) in your dashboard. -
Do I need a Autoanaf account?
-
Yes. The plugin is the sender; Autoanaf is the service that builds and files the
e-invoice. A free tier is available. -
Is Polish KSeF supported?
-
Not yet. This plugin currently targets the Romanian ANAF SPV (e-Factura) only. Autoanaf
is working on KSeF support; the product site will announce it when it ships. -
Is my WooCommerce data safe?
-
The payload is exactly the order data WooCommerce’s own REST API exposes, sent over HTTPS
with an HMAC-SHA256 signature. Your Autoanaf webhook secret is stored in your WordPress
database (as any plugin setting is); no ANAF credentials are stored in the plugin or sent
from your site. -
Why do I need to enter my company name and CIF?
-
They identify you as the invoice issuer on the ANAF e-invoice. The CIF must be
registered and authorized in the ANAF SPV (e-Factura) — the same one you use to log in
and send invoices manually.
Anmeldelser
Der er ingen anmeldelser for denne widget.
Bidragsydere & udviklere
“Autoanaf E-Invoicing for WooCommerce” er open source-software. Følgende personer har bidraget til dette plugin.
BidragsydereOversæt “Autoanaf E-Invoicing for WooCommerce” til dit eget sprog.
Interesseret i udvikling?
Gennemse koden, tjek SVN repository, eller abonner på udviklerloggen via RSS.
Ændringslog
0.2.0
- Rebranded to Autoanaf E-Invoicing for WooCommerce (was: FiscalLink for WooCommerce). Display name, slug, text domain and every user-facing reference changed; the service, settings page and documentation links now point at https://autoanaf.ro.
- No change to the filing flow. Your existing settings carry over untouched (the stored option name is unchanged) — same Tenant ID, same webhook secret.
- If you installed 0.1.x from the hosted zip: the buyer-CIF checkout field id changed with the rename, so a CIF already saved on past orders is not re-read. Orders created from 0.2.0 onward are unaffected.
0.1.8
- The “CIF firmă” field now appears on the modern Checkout block as well (WooCommerce 8.9+ Additional Checkout Fields API). On default stores the field was silently missing, so B2B orders were filed without the buyer’s CIF. The classic (shortcode) checkout keeps working, and WooCommerce older than 8.9 still gets the legacy field.
- New Autoanaf panel on the order screen: “✓ Filed to ANAF e-Factura” with the UTC timestamp, or “✗ Not filed” with the reason, plus a Push to Autoanaf now button.
- A failed push now records why it failed (HTTP status and the core response), instead of only a counter — a rejection is finally diagnosable from the order itself.
- The webhook secret is no longer printed in cleartext in the settings status box.
- HPOS-safe: order meta is read and written through the WooCommerce order object, and the hourly retry job uses
wc_get_orders().
0.1.7
- Listing-readiness fixes (no behaviour change): the plugin and author links now point at https://autoanaf.ro (the previous
autoanaf.roapex returns 503), “WC tested up to” is corrected to 11.1 (the version the plugin is actually exercised against), the readme states the WordPress/WooCommerce/PHP requirements explicitly, the plugin declaresRequires Plugins: woocommerce(WordPress now refuses activation without WooCommerce), andRequires at leastis raised from 6.0 to 6.5 — the version from whichRequires Pluginsis enforced.
0.1.6
- Docs only, no behaviour change: the setup instructions no longer suggest
wp config shuffle-saltsfor the webhook secret (that rotates your WordPress salts and logs every user out) — they now useopenssl rand -base64 32. Installation points at the hosted guide (https://autoanaf.ro/connect/woocommerce), describes the manual zip upload while the WordPress.org listing is in review, and no longer implies the plugin needs an API key. The free-tier description now matches the pricing page: 100 calls/month on the ANAF test environment, production submissions on a paid plan.
0.1.5
- Fix: the “Company county” field is no longer required for every store. A new Company country setting (ISO 3166-1 alpha-2, default
RO) drives it: the county is required — and sent asissuerCounty— only for a Romanian issuer (issuerCountryRO, or aRO…VAT id). A store outside Romania can now activate and push orders with no county, and the plugin sends noissuerCountyparameter at all. Saving an RO configuration without a county is rejected with an explicit settings error instead of silently filing invoices ANAF refuses.
0.1.4
- New: “Company county” setting (ISO 3166-2:RO, e.g.
RO-NT), sent as theissuerCountyquery parameter and required for the plugin to report as Active. ANAF rejects any e-invoice whose RO party lacks a country subdivision (CIUS-RO BR-RO-110, “Erori de validare identificate”) — previously every pushed order was filed and rejected. The customer’s subdivision is derived from the WooCommerce billing state, so no store-side change is needed for it.
0.1.3
- New: issuer address fields (street, city, postal code; country fixed to RO) — the CIUS-RO seller address on e-invoices. ANAF rejects address-less sellers, so the push guard and the “configured” state now require the issuer city.
- New: the webhook URL carries
issuerAddress/issuerCity/issuerPostalCode/issuerCountry.
0.1.2
- New: “CIF firmă” billing checkout field (
billing_vat_id) with official RO checksum validation — required for RO company buyers and stored normalized with theROprefix. - Fix: the order payload now includes
billing.vat_id, so core can emit the buyer VAT id in the UBL e-invoice.
0.1.1
- Fix: send
issuerName/issuerVat(new settings fields) — core rejected unsigned pushes with HTTP 400. - Fix: send the
X-WC-Webhook-Topicheader so orders are actually processed, not just acknowledged. - Fix: send VAT in the WooCommerce REST v3 shape (
total_tax+rate_percent) — e-invoices now carry the correct tax rate. - Fix: only mark an order submitted when core explicitly confirms processing (
processed: true).
0.1.0
- Initial release: order-completed hook, signed push, dedupe, retry queue, settings page.
