Skip to content

SmartBill PrestaShop integration: invoices issued automatically from orders

· The AYT team · 5 min read

Woman in sunglasses holding many shopping bags

You connect SmartBill (a Romanian cloud invoicing service) to PrestaShop with SmartBill's official module, which you download from their developer site and upload in Modules → Module Manager. Once it's linked to your account with your email address and API token, the module issues the SmartBill invoice straight from the PrestaShop order, by hand or automatically when the order reaches a given status, and emails it to the customer.

What you need first

  • A SmartBill Cloud account on a plan that includes online store integration. The module page asks for the Platinum, Gestiune Plus or eCommerce package, and stock sync works only on eCommerce. Check the SmartBill modules page for what applies now, because the packages change.
  • Your company details set up correctly in SmartBill: tax ID (CIF), address, bank account, VAT payer or not. The module takes some of them from there.
  • Invoice series already created in SmartBill. The module doesn't create them, it only picks them.
  • A supported PrestaShop version. At the time of writing, SmartBill's page lists compatibility from 1.7.0.0 to 9.2.1.

Back up the shop before installing any module that writes to orders.

Step 1: download and install the module

  1. Open the SmartBill modules page and download the PrestaShop archive.
  2. In the back office go to Modules → Module Manager → Upload a module and pick the archive.
  3. The archive must be named smartbill.zip and contain a smartbill folder. If your browser renamed it (for example smartbill (1).zip), the upload fails.
  4. After installing, click Configure.

Step 2: link the module to your SmartBill account

In SmartBill Cloud, open Contul meu → Integrări → Informații API (My account → Integrations → API information) and copy the token. Then, in the module's configuration:

  1. Enter the email address you sign in to SmartBill with, and the token.
  2. Enter the company's tax ID and save. The tax ID is needed because one SmartBill account can hold several companies.
  3. If the details are right, the module loads the series and other options from the account.

The token gives access to the company's invoicing. Don't email it or paste it into public tickets.

Step 3: choose the invoicing settings

The main options, to match to the company's situation:

  • VAT payer or not, and the rates you use;
  • the invoice series (and the proforma series, if you use them);
  • whether you use stock management in SmartBill;
  • the number of days until the due date;
  • how shipping appears on the invoice;
  • whether the invoice is emailed to the customer and shown in their shop account.

PrestaShop's VAT rates must match SmartBill's. You check them in International → Taxes, and on each product, in the pricing tab, you pick the right tax rule. A product with no tax rule ends up on the invoice with the wrong VAT.

To start with, issue invoices as drafts. You check them in SmartBill, and once the first 3–4 orders come out right, you switch to final invoices.

Step 4: issue your first invoice

  1. Place a test order in the shop, paying by bank transfer.
  2. In the back office open Orders → Orders and go into the order.
  3. Click the "Emite document" (issue document) button on the order page.
  4. The module shows a confirmation message and a link to the document.

If the document came out wrong, delete or cancel it in SmartBill and click "Remitere document" (reissue document) on the order.

Check on the test invoice: the customer's name and address, the tax ID (on company orders), prices with and without VAT, shipping, discounts and coupons.

Step 5: automatic invoicing on status change

Once the test invoices are right, set the order status at which the module issues the invoice by itself. The usual choices:

  • "Payment accepted", if you only want the invoice after payment (card or confirmed transfer);
  • "Shipped", if you invoice on dispatch, for example with cash on delivery.

Don't pick a status that orders cancelled later also pass through, or you'll end up issuing credit notes often.

Step 6 (optional): stock sync

With the eCommerce package, the module can bring stock levels from SmartBill's stock management into PrestaShop. First, check in SmartBill's documentation which field the module uses to match products between the two, and test on 2–3 products. Only then turn sync on for the whole catalog.

Common problems

Symptom Likely cause
The module won't connect token copied incompletely, wrong email or missing tax ID
The series isn't in the list the series isn't created in SmartBill for that company
Different VAT on the invoice the product has no matching tax rule in PrestaShop
No automatic invoice the chosen status isn't one your orders pass through
Upload error the archive isn't named smartbill.zip

SmartBill's support covers configuring the module, not configuring the shop or the server. For shop errors, turn on PrestaShop debug mode and read the exact message.

What about e-Factura?

The module sends the invoice to SmartBill. Reporting to RO e-Factura, Romania's national e-invoicing system, happens from SmartBill once you authorise your SmartBill account in SPV (ANAF's online portal). The options in full are in the article on e-Factura in PrestaShop. If you also run a WooCommerce shop, its steps are in SmartBill for WooCommerce.

Your PrestaShop shop on AYT

On AYT you install PrestaShop in one click from the PrestaShop Toolkit. Before installing a new module such as SmartBill, you make a staging copy on a subdomain, test invoicing there, then install the module on the live shop too. Backups are daily for the last 7 days, weekly for 4 weeks and monthly for 24 months, restored from the panel. Plans are on the hosting page.

More articles

All articles