E-Invoicing for Online Stores: How to Stop Doing It by Hand
Every order you invoice by hand is ten minutes lost and an error waiting to happen. E-invoicing is mandatory in more and more countries — and automating it is one of the few tasks that pays for itself.
April 20, 20236 min readIn this article
The scene repeats across thousands of small stores: the order comes in, payment clears through the gateway, and then someone opens the tax authority's system or a separate program and manually retypes the name, the tax ID, the address and the products to issue the invoice. Ten minutes per order, on a good day. At twenty daily orders, that's over three hours of work an integration does in zero.
And it isn't optional: electronic invoicing is already mandatory in most of Latin America, and the European Union is heading the same way. This article explains how the circuit works, what data your checkout has to collect, and how to automate issuance without becoming an accountant in the process.
How the circuit works, in plain language
An electronic invoice isn't a pretty PDF: it's a structured document (XML in almost every country) sent to the tax authority, which validates and authorises it. The PDF your customer receives is only the printable representation of that document. The full circuit:
- The order is confirmed in your store with the customer's tax details.
- The structured document is generated with issuer, recipient, line items, taxes and totals.
- It's signed electronically with your digital signing certificate.
- It's sent to the tax authority (SRI in Ecuador, SAT, DIAN, AFIP… depending on the country), which validates it and returns the authorisation.
- The customer receives the authorised document by email, and you archive the XML — which is the legal document, not the PDF.
The three routes to issuing (and which is yours)
| Route | How it works | Who it's for |
|---|---|---|
| The tax authority's free portal | Manual issuance, invoice by invoice, on the official site | Under ~5 daily orders; zero cost, everything by hand |
| An invoicing provider with an API | An authorised service issues for you; your store sends it the data | The standard for stores: a reasonable monthly fee, automatic issuance |
| Direct integration with the authority | Your system signs and submits the XML itself | High volume or custom software; more control, more maintenance |
For the great majority of stores, the middle route is the right one: invoicing providers have already solved the signing, the formats and the regulatory changes — which arrive every year. Your job reduces to connecting the store to their API: when the order is paid, the invoice issues itself. How to evaluate and prioritise that connection is in integrations and APIs for your business.
What data to collect at checkout (and what not to)
The invoice gets issued with whatever the checkout captured. Asking for too little means chasing the customer afterwards; asking for too much scares off sales. The balance:
- The tax ID (national ID, RUC, VAT number… by country) with format validation in the field itself: the check digit gets verified on the spot, not afterwards.
- Name or legal name autocompleted from the ID where the authority allows lookups: less typing, fewer errors.
- A "final consumer" option for buyers who don't need a named invoice, where regulation allows it: it cuts friction on small tickets.
- Email address, which you're collecting anyway: it's where the document arrives.
- Nothing else. The fiscal address only if your rules require it on the document; every extra field lowers conversion.
The cases nobody mentions until they hurt
- Credit notes: every refunded return requires its electronic credit note linked to the original invoice. If you automate issuance, automate this too — it's the forgotten half of the circuit.
- The tax authority being down: official systems have maintenance windows and outages. Countries solve this with contingency issuance (issue offline, report later); check that your provider supports it.
- Orders from abroad: exporting goods or services has its own document type and its own tax treatment. Don't improvise: ask your accountant before accepting the first foreign order.
- Withholdings: if you sell to companies, some will withhold taxes and issue you their withholding document. Your system has to record it against the invoice.
- Numbering and sequence: invoices are sequential per issuing point. Two systems issuing on the same sequence (the store and the physical shop, say) is a guaranteed collision — separate the issuing points from day one.
Reconciliation: making invoice, payment and order agree
Issuing is half the job; the other half is the numbers closing at month's end. Three totals must always match: what the store says (orders), what the gateway says (collections net of fees) and what the tax authority says (invoices issued).
- Every paid order has exactly one invoice (or one invoice plus its credit note). Orders without invoices, or invoices without orders, are the two alarm signals.
- The gateway fee doesn't vanish: it gets recorded as an expense with its own document, not "lost" between the gross charge and the net deposit.
- A 30-minute monthly review with the three reports prevents the year-end mismatch that costs days — and fines.
- Export and store the XMLs in your own backup, not only in the provider's portal: the archiving obligation (5-7 years in most countries) is yours, not theirs.
The most expensive mistakes
- Invoicing by hand "for now". "For now" lasts years, and every transcription error is a credit note plus a new invoice.
- Issuing with old dates. Issuance windows are short (same-day or a few days in several countries); saving up the month's orders to invoice on the 30th is an infraction, not a convenience.
- Ignoring rejections. The bounced invoice nobody reviews becomes a sale without a document — among the most expensive infractions there are.
- Switching providers without migrating the archive. Previous years' XMLs must remain accessible; export them before cancelling the contract.
- Not testing credit notes until the first real return, with the customer waiting for their refund.
Frequently asked questions
Am I required to issue an e-invoice for every online sale?
In most of Latin America, yes: every sale generates an electronic document, though many regimes include a final-consumer figure for receipts without buyer identification. Thresholds and exceptions vary by country and tax regime, so confirm your case with your accountant — but the regulatory direction is clear, and it points to full mandatory coverage.
What happens if the tax authority's system goes down?
Regulations provide for contingency issuance: you issue the document offline with a special key and report it once the system returns. A good invoicing provider handles this automatically. What you can't do is stop invoicing: the official system's outage doesn't suspend your obligation.
How much does automating invoicing cost?
E-invoicing providers typically charge a modest monthly fee or a bundle of documents — almost always less than one hour of manual work per month costs you. The store integration is a one-off development cost, small if your platform already has a connector for that provider. Above 5-10 daily orders, it pays for itself in the first month.
Do I issue the invoice on payment or on shipping?
The general rule in most regimes is to issue on transfer of the goods or on collection, whichever comes first — in practice, for an online store, when payment is confirmed. Issuing on dispatch can put you out of the window if shipping is delayed. Confirm your country's exact criterion with your accountant and configure the automation on the payment event.