Invoicing · 9 min · 2026-11-07

Shopify and TOConline: how to issue invoices automatically and why it fails

The Shopify and TOConline integration fails on the tax number, duplicates invoices and misses orders. The causes, the legal deadlines and a reliable flow.

TOConlineShopify invoicingCertified invoiceNIFIntegration

Summary

What matters before moving forward.

  • TOConline is often chosen by the accountant, not the store: licences are subscribed by the certified accountant. The store has to adapt to the software that is already there.
  • Public complaints about the TOConline app for Shopify repeat three problems: the tax number read from the Address 2 field, invoices that are not generated and duplicate invoices.
  • Shopify webhooks can arrive twice, out of order or not at all. An integration that issues an invoice on every notification, without checking, will duplicate and miss invoices.
  • In an online sale paid at checkout, payment comes before delivery. Under article 36 of the Portuguese VAT Code, the invoice must then be issued on the date payment is received.
  • A certified invoice cannot be deleted or edited. Every integration error is fixed with a credit note and a new invoice, which multiplies the accountant's work.

Why so many stores end up on TOConline

In many small businesses the person choosing the invoicing software is not the store owner, it is the accountant. With TOConline this is literal: licences are subscribed by the certified accountant, who works with several clients on the same platform.

For the store this has a practical consequence. It cannot switch to whichever software has the best Shopify app without changing how it works with its accountant. The question stops being which invoicing software is best and becomes how to make Shopify talk properly to TOConline.

There is an official app on the Shopify App Store that promises to sync orders, invoices and credit notes. In public reviews from 2026, merchants describe serious invoicing failures, missing invoices and duplicates. It is worth understanding why, because the causes apply to any poorly designed integration.

Failure 1: the tax number comes from Address 2

Shopify checkout has no native field for the Portuguese tax number (NIF). The most common workaround, used by several Portuguese integrations, is to ask customers to type the NIF in the second address field, the one used for floor, door or flat.

It works until it does not. The customer types a floor number instead of the NIF, the browser autofills old address data, or the NIF is entered with spaces or a PT prefix. A public review of the TOConline app describes exactly this: if the field is filled incorrectly, automatic invoicing fails.

A robust integration does not trust the field blindly. It validates the format and check digit, tells a NIF apart from an address note and, when the value is invalid, issues to a final consumer or places the order in a review queue instead of failing silently.

Failure 2: duplicate or missing invoices

Most integrations react to Shopify webhooks, the notifications the store sends when an order is created or paid. Shopify's documentation is explicit: deliveries can repeat and should be ignored using the webhook ID, ordering is not guaranteed and delivery itself is not guaranteed, so apps should run periodic reconciliation.

An integration that issues an invoice every time it receives a notification, without checking whether the order already has one, duplicates. An integration that only reacts to notifications, without reconciliation, misses orders when a notification does not arrive. Reviews mentioning around 8 duplicate invoices in 500 orders describe this pattern.

The fix is a matter of design, not luck. Each order must be linked to the number of the invoice issued, issuing must be idempotent, so repeating the request does not create a second invoice, and a daily job must look for paid orders without an invoice.

When to issue: the deadline many stores ignore

Article 36 of the Portuguese VAT Code sets the general rule: the invoice is issued no later than the fifth business day after the tax becomes due. But there is an exception that matters for online stores. When payment is received before delivery, the invoice must be issued on the date payment is received.

In a Shopify store taking cards or MB WAY, the customer pays at checkout, before the order ships. Issuing the invoice only when the order ships, days later, may not respect this rule. With Multibanco, the relevant date is when the reference is paid, not when the order was placed.

This is a decision to make with your accountant, because it depends on your case. The point is that the invoice trigger, order created, paid or shipped, is not a technical detail. It is a tax choice the integration has to respect.

Why every error is expensive

A certified invoice cannot be deleted or edited. If it goes out with the wrong NIF, the wrong amount or twice, it is corrected with a credit note that cancels it and, where needed, a new invoice. Each correction means two extra documents reported to the Tax Authority.

For the store this is lost time. For the accountant it is unplanned work that sooner or later shows up in the monthly fee. An integration that fails 2% of the time may look acceptable and still create dozens of corrections a month in a store with volume.

So before switching on automatic invoicing, test it the other way round: think about what happens on each error. Who sees it, when they see it and how they fix it.

How Vokzar connects Shopify to TOConline

We use the TOConline API, with credentials requested in your own account, and agree with your accountant on when invoices are issued, the series and how final consumers are handled.

We build issuing with checks: the NIF is validated before going ahead, each order is linked to its invoice, a repeated request does not create a duplicate and a daily check finds paid orders without a document.

Cases that fail go to a review list with the reason, instead of failing silently. Your accountant receives correct documents the first time and the store knows exactly what is left to handle.

Related next steps

Next steps.

Proof and validation

  • The complaints described come from public reviews of the TOConline Invoices app on the Shopify App Store, checked in November 2026.
  • Webhook behaviour comes from Shopify's official webhook best practices.
  • The deadline rules summarise article 36 of the Portuguese VAT Code and should be confirmed with your accountant for your case.

Official documentation

Validated sources.

Technical strategy should be auditable. These sources link directly to the official documentation behind this guide.

Frequently asked questions

Common questions about this topic.

Does Shopify integrate with TOConline?

There is a TOConline Invoices app on the Shopify App Store. Public reviews from 2026 report invoices not generated, duplicates and failures with the NIF read from the Address 2 field. The alternative is an integration through the TOConline API, designed with checks.

Why does my integration create duplicate invoices?

Shopify webhooks can arrive more than once. If the integration issues an invoice for every notification without checking whether the order already has one, it creates duplicates. Issuing has to be idempotent.

When should I issue the invoice for an online order?

The general rule in article 36 of the Portuguese VAT Code is by the fifth business day after. When payment is received before delivery, as with card or MB WAY at checkout, the invoice must be issued on the date payment is received. Confirm your case with your accountant.

Can I fix an invoice issued with the wrong NIF?

A certified invoice cannot be edited. It is corrected with a credit note and, where needed, a new invoice. That is why validating the NIF before issuing pays off.

Want to apply this to your site?

Next step Technical audit