Skip to content
← Back to blog
Published on 14 June 2026· Updated on 19 October 2026by Admin WebforgeSmartBillAutomatizăriE-commerce

SmartBill API Integration: Automated Invoicing for Your Online Store

Integrare SmartBill prin API: facturare automată pentru magazinul tău

A SmartBill API integration eliminates manual invoicing: every order in your online store automatically generates the invoice, emails it to the customer and updates your stock. For a store handling dozens of orders a day, that means hours of work recovered every week, zero transcription errors and financial reports that are always up to date.

For readers outside Romania: SmartBill is one of the most popular Romanian invoicing and inventory SaaS platforms, widely used by online stores and small businesses, with built-in support for Romania's mandatory e-invoicing system (e-Factura). At WebForge we have been building invoicing integrations for Romanian online stores for years, and SmartBill is by far the billing software we encounter most often. In this guide we explain what the SmartBill API can do, what a complete invoicing automation flow looks like for e-commerce, when a direct integration makes sense versus one built with n8n, what such a project honestly costs, and the mistakes we see most often in rushed implementations.

What the SmartBill API allows

The SmartBill API essentially allows everything you would do manually in the web interface: issuing fiscal invoices and proforma invoices, managing stock, recording payments and retrieving documents as PDFs — all programmatically, from your application or from an automation platform. In other words, any repetitive invoicing operation can be triggered automatically by an event in your business.

At a general level, the main capabilities cover:

  • Issuing invoices and proformas — you create fiscal documents with the customer data, products, VAT rates and the desired document series, and SmartBill returns the generated document;
  • Reversal and cancellation — you can programmatically correct documents issued in error, essential for e-commerce returns;
  • Recording payments — you mark invoices as paid when the payment processor confirms the transaction, so customer balances are always accurate;
  • Stock management — you query and update stock levels in SmartBill's inventory, so your site never sells products you no longer have;
  • PDF documents and email delivery — you download the generated invoice or send it directly to the customer, using the layout configured in your SmartBill account.

An important note of technical honesty: we are not listing exact endpoints and parameters here, because the official SmartBill documentation is the source of truth and is updated periodically. What matters for you as a store owner is that all the usual invoicing operations are exposed through the API and can be orchestrated without human intervention.

The classic e-commerce scenario: from order to reporting, with no clicks

The standard flow we implement for online stores looks like this: the order is placed, the invoice is issued automatically, the customer receives the invoice by email, stock is updated and the data flows into reporting — all within seconds, without anyone on the team touching a keyboard. Concretely, the steps are:

  1. The order is placed in WooCommerce, Shopify, PrestaShop or your custom platform, and a webhook notifies the integration system;
  2. Customer data is validated — tax ID checked for companies, complete address, the correct VAT rate for each product;
  3. The invoice is issued in SmartBill on the appropriate series (individuals vs. companies, for example), with numbering managed by SmartBill;
  4. The customer receives the invoice by email, either through SmartBill or through your transactional email system, attached to the order confirmation;
  5. Stock is updated in inventory, and if you synchronise in both directions, the website reflects real stock levels;
  6. The payment is recorded automatically when the card payment is confirmed or when cash-on-delivery is collected from the courier;
  7. Reporting is always current — your accountant sees in SmartBill exactly what was sold, with no manual file exports and imports.

The difference compared with manual invoicing is not just the time saved. It is also consistency: a tired person at the end of the day mistypes a tax ID or skips an order; a well-built automated flow never does.

Direct integration vs. integration through n8n

The short answer: an n8n integration is faster to implement and easier to modify, while a direct integration (custom code in your application) offers full control and maximum performance — the choice depends on the complexity of your business and on who will maintain the solution. Both variants use the same SmartBill API; only the place where the logic lives differs.

Criterion n8n integration Direct integration (custom code)
Implementation time Days Weeks
Initial cost From a few hundred EUR EUR 1,000–4,000
Later changes Fast, visual, no deployment Requires a developer
Control and complex logic Good for standard flows Unlimited, natively integrated in the app
Best suited for Most small and medium stores High volumes, complex business rules

In practice, we recommend n8n for most stores: the visual workflow connects the e-commerce platform, SmartBill, email and even a Slack or WhatsApp channel for notifications, and changes take minutes. We wrote at length about our approach in our guide to n8n automations. Direct integration remains the right choice when invoicing is part of your application's core logic — for example a subscription SaaS or a marketplace with commission rules.

Want to find out which variant fits your store? Write to us and we will reply with a concrete recommendation, not a sales template.

The e-Factura and SPV connection: the complete chain, automated

The good news: SmartBill submits invoices to SPV (Romania's Virtual Private Space, the government portal) for e-Factura, so an automated flow built on top of the SmartBill API covers the entire legal chain — from order to reporting to the tax authority. You no longer manage XML files, signatures or submission deadlines; you issue the invoice through the API, and SmartBill takes care of its journey to SPV.

With e-Factura now mandatory for B2B relationships and subsequently for B2C as well, this detail turns the integration from a convenience into a necessity: every manually issued and forgotten invoice is a compliance risk. We covered the whole topic — deadlines, obligations, pitfalls — in our article on e-Factura automation, which we recommend to anyone selling online in Romania.

In practice, the complete flow becomes: order → invoice issued via API → email to customer → stock updated → automatic submission to SPV → reporting. A single event (the order) triggers the entire chain, and you only see the result: correct documents, on time, everywhere they need to be.

Alternatives on the Romanian market: Oblio, FGO, Facturis

SmartBill is not the only option, and honesty obliges us to say it plainly: Oblio, FGO and Facturis also offer invoicing APIs, and the integration architecture we describe here applies almost identically to any of them. If you already use one of these programs and your team is happy with it, migrating just for the sake of the integration is rarely worth it.

  • Oblio — popular with small companies, with a documented API and accessible pricing; a solid alternative for standard invoicing flows;
  • FGO — appreciated in the services sector and for collaboration with accountants, with e-Factura support;
  • Facturis — also oriented towards inventory and production, useful when stock is the complicated part of your business.

The real selection criteria are not about marketing but about: the quality of the API documentation, how the platform handles multiple document series and warehouses, e-Factura support and the monthly cost at your document volume. We implement integrations with any of them — we make our recommendation after understanding your flow, not before.

The steps of a SmartBill integration project

A well-executed integration project follows the same steps whether it is implemented in n8n or in custom code: obtaining API keys, mapping the data, building the flow, handling errors and testing against real scenarios. Here is what that looks like in practice:

  1. API keys and a test environment — we enable API access from the SmartBill account and set up an environment where we can issue test documents without affecting real invoicing;
  2. Data mapping — we establish the correspondence between your platform's fields and SmartBill's: invoice series for each customer type, VAT rates per product category, warehouses, currencies, payment methods;
  3. Validations before issuing — we check the tax ID, address completeness and total correctness before touching the API; an invoice rejected late is more expensive than an early validation;
  4. Error handling and retries — every API has moments of unavailability; the flow must retry automatically but intelligently, with protection against duplicates (the same order must never generate two invoices);
  5. Logs and alerts — every issued or failed invoice leaves a trace; if something fails at 2 a.m., in the morning you know exactly which orders need attention;
  6. Testing on real scenarios — an order from an individual, a company with a valid tax ID, a return, cash on delivery, an order with mixed VAT rates; only after all of them pass do we switch the flow to production.

Steps 4 and 5 are what separate a professional integration from a script written in one evening. Invoicing is a fiscal process, not an experiment — reliability is not optional.

What a SmartBill integration costs: honest numbers

A simple n8n integration starts from a few hundred euros, while a complete custom integration usually falls between EUR 1,000 and 4,000, depending on complexity. There is no single correct price, but there are honest reference points:

  • Standard n8n flow (order → invoice → email → stock, a single e-commerce platform): from a few hundred EUR, delivered in a few days;
  • Extended n8n flow (multiple series, tax ID validation, payments, notifications, reports): somewhere between the basic level and around EUR 1,500;
  • Complete custom integration (code in your application, bidirectional stock sync, complex business rules, high volumes): EUR 1,000–4,000, depending on complexity and the state of your existing code.

On top of these costs come the SmartBill subscription (which you probably already pay) and possibly hosting for the n8n instance — small monthly costs relative to the time saved. The return-on-investment calculation is simple: if someone on your team spends an hour a day on invoices, the integration usually pays for itself within the first months.

Frequent mistakes in invoicing integrations

The most expensive mistakes we see are not about the API itself but about the lack of rigour around it: unhandled errors, wrong document series and duplicates generated on retry. In short:

  • No error handling — the flow works on demo day, then the API returns an error on a Friday evening and 40 orders go uninvoiced without anyone noticing;
  • Wrong invoice series — company invoices issued on the individuals' series (or vice versa) mean chains of reversals and unpleasant conversations with your accountant;
  • Duplicates on retry — the flow retries after a timeout, but the first request had actually succeeded; the result: two invoices for the same order. The solution is checking before re-issuing, so that each order produces exactly one document;
  • VAT rates hardcoded — legislation changes, and values fixed in code become time bombs; rates must come from configuration, not from habit;
  • Zero visibility — without logs and alerts, you learn about problems from customers or from the tax authority, which is the worst possible way.

All these mistakes are avoidable with an architecture designed for failure from the start — for the moments when the network drops, the API responds slowly or the data arrives incomplete. That is, in fact, exactly what you pay for when working with an experienced team.

The next step: from invoicing to an automated business

For many companies, the SmartBill integration is the first serious automation — and the one with the most visible immediate effect. From there, the road continues naturally: synchronising courier waybills, automated sales reports, intelligent answers to customer questions. The complete flow, from paid order to handed-over parcel, is described step by step in automating online store orders. If you want the big picture, we put everything we know into our complete guide to AI automations.

If you want to talk concretely about your store — platform, order volume, current invoicing flow — send us a message through our contact page. We reply with an honest cost and timeline estimate, usually within the same business day.

Frequently asked questions

How long does a SmartBill integration take?

A standard n8n flow is functional within a few business days. A complete custom integration, with stock synchronisation and specific business rules, usually takes two to four weeks, including testing on real scenarios.

Does the integration work with WooCommerce or Shopify?

Yes. Both platforms expose webhooks when an order is placed, which trigger the invoicing flow. The same principle applies to PrestaShop, Magento or a custom application — if the platform can announce a new order, we can issue the invoice automatically.

What happens if SmartBill is temporarily unavailable?

A properly built flow places the order in a retry queue and issues the invoice as soon as the service is back, with duplicate protection. You only receive an alert if the problem persists — no order silently goes uninvoiced.

Do invoices issued via the API automatically reach SPV for e-Factura?

Yes, SmartBill handles the submission of invoices to SPV, so the automated flow also covers the e-Factura obligation. You can find details on deadlines and obligations in our article on e-Factura automation.

Let's talk!

We reply within 24 hours