Issuing invoices by hand or in a separate portal works while you sell little. When your online store gets orders every day, or your system already records customers, products and payments, repeating that data in another tool is slow and error-prone. The solution is to integrate SRI electronic invoicing directly into your system: the invoice goes out by itself when the sale is confirmed.
This guide explains how the process works, what you need and what to watch for. It is a technical but practical guide: it does not replace current regulations or the advice of your accountant, whom you should always consult.
Integrating invoicing is not "adding a button": it is connecting your system to the SRI so that every sale generates, signs, sends and files its document with no manual work.
What electronic invoicing is in Ecuador
The SRI (Servicio de Rentas Internas, Ecuador's tax authority) allows and, for many taxpayers, requires issuing sales documents in electronic format. The most common are:
- Invoice.
- Credit note and debit note.
- Delivery note (guía de remisión).
- Withholding receipt.
- Purchase settlement.
Each document is an XML file with a structure defined by the SRI, electronically signed and authorized by the SRI's services. Who is required, since when and with which exceptions is defined by the SRI, so check your case with your accountant.
What you need to integrate it
- Active RUC and registered establishment and issuing point.
- Electronic signature: a digital certificate issued by an authorized certification entity, normally a
.p12file. Every XML is signed with it. It expires: put the date in your calendar. - Sequential numbering: the system must keep the sequence per establishment and issuing point, with no gaps or duplicates.
- A system that generates the XML according to the SRI's current technical specification.
- A connection to the SRI services, which have a test environment and a production one.
The flow, step by step
- The customer buys and the system confirms the payment.
- The invoice is generated with the customer's data (ID or RUC, email), products, taxes and totals.
- The access key is created, a 49-digit numeric code that identifies the document.
- The XML is built with the structure the SRI requires.
- It is signed with your certificate.
- It is sent to the SRI (reception service) and its status is queried.
- The SRI authorizes and returns an authorization number, or rejects with a reason.
- It is delivered to the customer: the authorized XML and the RIDE (the printed representation as a PDF), usually by email.
- It is stored, and you must keep the document for as long as regulations require.
All of this should happen in seconds and without anyone touching it.
What to do when the SRI rejects or does not respond
It is normal for it to fail sometimes: misspelled customer data, a misconfigured tax, an outage of the SRI service. A good system:
- Retries by itself when the SRI does not respond, without duplicating the invoice.
- Shows the reason for the rejection in plain language, not a cryptic code.
- Lets you fix and resend without losing the numbering.
- Logs everything for auditing: what was sent, when and what the SRI answered.
This is where you see the difference between "works in the demo" and "works in production".
Online store or own system: where it integrates
- In a WooCommerce store: there are extensions and services that connect orders to electronic invoicing. Check that they cover your cases (credit notes, returns, several VAT rates) and what customer data they capture at checkout. Review the checkout mistakes that affect exactly this.
- In a custom store or system: it integrates directly with the SRI services, with total control over the flow. This is the route of our custom developments.
- With an invoicing provider (SaaS): your system sends it the data and it handles signing and sending. It reduces the work, in exchange for a subscription and depending on a third party.
If your store is new, first read how much an online store costs in Ecuador to budget invoicing from the start.
Common mistakes when integrating
- Not asking for an ID or RUC at checkout, or accepting invalid formats.
- Misconfiguring taxes: VAT rates, zero-rated products, discounts.
- Using the test environment in production (or the other way around) without noticing.
- Forgetting to renew the electronic signature and being unable to invoice.
- Not handling returns: if there is a return, you need the credit note, not deleting the invoice.
- Not storing documents in an organized, backed-up way.
- Depending on a single person who knows how it works.
Good practices
- Test first in the SRI's test environment with real cases: VAT, discounts, final consumer, RUC.
- Validate data before sending (ID and RUC format, email).
- Store the XML and the RIDE with the order so you can find them fast.
- Monitor rejections with alerts, to fix them the same day.
- Back up documents and certificates.
Our experience
At Codegea we built Nimbus, an electronic invoicing SaaS for Ecuador; you can see the case in our projects. If you need to connect your store or system, we do a no-cost review of your current flow and tell you what fits: extension, provider or direct integration.
Write to us from contact and tell us how you invoice today.
Written by
Derian Pinto
Founder & Full Stack Developer
Founder of Codegea. Builds custom websites, stores and platforms, and integrates and supports Arc XP for media companies.
