Why the recurring invoice is the easy bit
Every ERP can send the same invoice every month. That’s not where subscription businesses struggle. The trouble starts with the exceptions, and a subscription business is mostly exceptions: usage over an allowance, upgrades part way through a period, a paused account, a card that failed three times, a customer on an old price you promised never to change.
Dedicated billing tools handle those well, then hand you a new problem. Customers, invoices and payments now live in two systems, and someone spends the first week of every month reconciling them. For many businesses a well-built module inside ERPNext or Odoo is the simpler answer. For some it isn’t, and we cover that further down.
A worked example with water coolers
A water cooler rental company bills monthly. Each cooler costs $35 a month and includes 60 litres. Extra water costs $0.40 a litre. Drivers record meter readings in a delivery app, which posts them to the ERP.
An office customer has 12 coolers, so the allowance is 720 litres. In August they use 910. The subscription invoice for August shows 12 cooler rentals at $35, which is $420, plus 190 extra litres at $0.40, which is $76. That’s $496 before tax, ignoring for a moment the change they made mid-month.
On 11 August they add three more coolers for a new floor. With a 31-day month, that’s 21 days of the new units, or 3 × $35 × 21/31, about $71.13. That appears as its own line on the August invoice, the litre allowance for August stays at 720 (a choice, not a law), and September starts at 15 coolers with 900 litres included.
The code in this page’s snippet does the usage part. When the Subscription creates its Sales Invoice, the hook finds unbilled readings for the period and adds one overage line. Once the invoice is saved, each reading is stamped with its number, so a second run for the same period finds nothing left to charge. If finance cancels the invoice, the readings are released and picked up next time. Billing code should be exactly this predictable.
One detail worth deciding before you build: what happens when the delivery app sends a reading late, after August has already been invoiced? We’d put it on the next invoice with its real reading date in the description. Some businesses prefer a separate adjustment invoice. Either is fine. Guessing isn’t.
What our subscription billing software module contains
On ERPNext, the module extends the standard Subscription and Subscription Plan DocTypes. A new Usage Record DocType holds readings. Hooks in hooks.py attach to Sales Invoice events, and follow-up jobs go in scheduler_events. Nothing is written as a Server Script, since billing logic deserves version control and tests. The reasons are laid out in our post on Server Scripts vs a custom app.
On Odoo, it depends on edition. With Enterprise we extend the subscription app. On Community we build recurring logic around sale.order, generate account.move records on an ir.cron, and add a portal page where customers can see their usage.
Both versions ship with tests for the maths. Proration is the kind of thing that’s right in the demo and wrong on the 31st.
Billing rules we’d argue with
- A custom price for every customer, in code. Use price lists or plan variants. Code is for rules, not for the special deal you gave one client in 2023.
- Retroactive rebilling of old periods. If a reading was wrong, issue a credit note or an adjustment line on the next invoice. Rewriting posted invoices upsets auditors and customers equally.
- Daily dunning emails. A reminder at 3, 10 and 21 days overdue gets paid. Daily messages get filtered.
- Replacing a billing platform that already works. If you’re doing complex usage pricing across thousands of self-serve customers and a dedicated tool is handling it well, keep it. Sync the invoices into the ERP instead.
Where the invoices go next
Subscription invoices are still invoices. They need the same follow-up and dispute handling as any other, which is what invoice management covers. Upfront annual plans also create deferred income questions for your accounting setup, so bring your accountant in early.
For platform choice, the ERPNext vs Odoo comparison is worth reading before you commit, particularly the part about what’s in Odoo Community and what isn’t.