SmartBill + WooCommerce: invoices issued automatically for every order
· The AYT team · 6 min read

To issue SmartBill invoices automatically from WooCommerce, you install the free, official plugin SmartBill Facturare si Gestiune from wordpress.org, sign in with your SmartBill account email, API token and company tax ID (CIF), then choose the order status at which the invoice is issued. From then on, the invoice is created in SmartBill, the Romanian invoicing app, when the order reaches that status and can go out to the customer by email automatically. The plugin only works with certain SmartBill plans, so check yours first.
What you need first
- a SmartBill account on a plan that allows the plugin: the plugin's FAQ names Platinum (invoicing), Gestiune Plus (invoicing and stock management) and eCommerce; on SmartBill's price page, Platinum and Gestiune Plus include the WooCommerce plugin, and the other plans list a paid optional "Modul e-commerce", so ask SmartBill what your plan needs;
- an invoice series created in SmartBill;
- products in the store with correct prices and, if you use stock management, codes that match the ones in SmartBill;
- the minimum requirements from the plugin description: PHP 7.2, MySQL 5.6, WooCommerce 3.0.
SmartBill says the plugin is only compatible with core WooCommerce features and doesn't guarantee it works alongside other plugins. If you have plugins that change checkout or prices, test on a staging copy.
Step 1: install the plugin and sign in
- In wp-admin, go to Plugins → Add Plugin, search for "SmartBill Facturare si Gestiune", install and activate.
- In the new SmartBill menu, open Autentificare (sign in).
- Fill in Email utilizator (your SmartBill account email), Token and Cod fiscal (CIF).
- Click Autentificare. The message „Autentificare realizata cu succes!” (signed in successfully) shows you the link to the settings.
You get the token in SmartBill Cloud, under Contul Meu → Integrări (My account → Integrations), in the API area. The plugin's labels are in Romanian, written without diacritics (for example "Setari TVA").
Step 2: VAT settings
In SmartBill → Setări (settings), the first section is Setări TVA (VAT settings); the labels are in Romanian:
- Prețurile includ TVA: choose "Da" (yes) if WooCommerce prices are shown with VAT;
- Cota TVA produse and Cota TVA transport: the VAT rates applied on the invoice for products and shipping;
- Transportul include TVA: the same, for the delivery cost;
- Adăugare TVA la încasare: only if the company uses cash-accounting VAT.
If the company isn't VAT-registered, the plugin tells you so and doesn't ask for rates.
Step 3: when and what gets issued
In Setări emitere documente (document settings) you set the basic rule:
- the document type issued in SmartBill: invoice or proforma;
- the default document series: the one created in SmartBill;
- Facturează automat comanda când statusul comenzii devine (invoice automatically when the order status becomes): usually "Completed" or "Processing", depending on how you work;
- invoice paid orders as paid: for online payments, the invoice shows as collected straight away;
- the document's currency and language, issue date and due date;
- how shipping, discounts and coupons appear on the invoice.
The plugin issues invoices as paid when payment went through NETOPIA Payments or the WooCommerce Stripe Gateway, according to its description. The NETOPIA setup is in the NETOPIA in WooCommerce tutorial.
If you don't want automatic invoicing, you can issue the invoice by hand from the order page, with the button that issues it in SmartBill.
Step 4: customer details at checkout
The settings also decide what checkout asks for:
- offer invoicing to a company at checkout: adds fields for the company name, CIF and Trade Register number;
- show the CNP (Romanian personal ID number) for individuals at checkout: if you choose "Nu" (no), or the customer gives no valid CNP, the plugin puts 13 zeros on the invoice, the value ANAF (the Romanian tax authority) accepts in e-Factura for an individual without a CNP.
What a good checkout for companies looks like is in the article on company details and CUI at checkout.
Step 5: sending the invoice to the customer
In Setări trimitere documente (sending settings), tick Trimite automat documentul clientului (send the document to the customer automatically), so the invoice is emailed right after it's issued, with Cc or Bcc if you want a copy. The option to show the invoice in the customer's account adds a button to the invoice in the customer's store account.
Step 6: stock (optional)
If your plan includes stock management, the plugin can take products out of stock when invoicing and sync the store's stock with SmartBill:
- choose the warehouse stock is taken from;
- turn on updating stock in the online store;
- copy the sync URL from the plugin into SmartBill Cloud → Contul Meu → Integrări → Sincronizare stocuri → URL, and the plugin's token into Token autentificare in the same place.
Matching is by product code, so the SKUs in WooCommerce must be the same as the codes in SmartBill.
Step 7: test with drafts
Before you let the plugin issue real invoices, turn on Emite ciornă (issue as draft). Invoices from orders then appear in SmartBill as drafts, with no number assigned, and you check that each invoice total matches the order total. Try at least:
- an order with paid shipping;
- an order with a discount coupon;
- an order for a company, with a CIF;
- one order paid by card and one cash on delivery.
When the totals match, turn off Emite ciornă.
e-Factura
Invoices issued in SmartBill to customers in Romania also have to reach RO e-Factura, the national e-invoicing system. Every SmartBill plan includes the e-Factura module, according to its price page; you use it once you authorise SmartBill in SPV (ANAF's online portal). The obligations and deadlines are explained in the article on e-Factura in WooCommerce. This isn't tax advice; check the settings with your accountant.
Common problems
The invoice isn't issued on status change
Check that the status chosen in the settings is exactly the one the order reaches, and that the sign-in is still valid. The error shows up in the order notes.
The invoice total differs from the order total
The usual cause is Prețurile includ TVA or Transportul include TVA set the opposite way from the store. Correct it and test again with drafts.
You need help from SmartBill
SmartBill answers at plugins@smartbill.ro, according to the plugin description.
SmartBill on a store hosted at AYT
On AYT WordPress hosting you run the draft tests on a staging site created from the WordPress Toolkit, then repeat the settings on the live store. Daily backups, kept in 3 locations, help if a plugin update changes something at checkout. Invoice emails are sent by SmartBill, through its API, not by the store's server.
