Roni Rechter

I Built an Enterprise Billing Platform With AI. Here Is What It Took.

Most writing about building enterprise software with AI lands in one of two piles. Explainers describe an architecture nobody has run. Demos show an impressive prototype and stop right before anyone asks who is allowed to approve what. Neither tells you whether AI can carry a complex system all the way into production.

I can speak to that from my own build. I built the next generation of MaxBill, an enterprise monetization platform, with AI doing a large share of the engineering. It is now live with utility companies, billing their real customers.

The short answer

Yes, you can build a complex enterprise system with AI. AI did not make it enterprise grade on its own. People did, and they had to understand the domain to do it.

How it started: one person and a chat window

I started alone, back when building with AI meant copying code out of ChatGPT and pasting it into an editor. There were no context engines. The model knew nothing about the codebase beyond what fitted in the message, so every answer was written for a project it had never seen.

The tools moved fast and I moved with them: Cursor, then Augment Code, then Claude Code and Codex. What improved at each step was context: how much of the system the tool could see before it wrote a line. That decided how useful it was far more than which model sat underneath.

Once the platform had proved its value, I brought in more engineers and taught them the process. Today it runs in production for utility companies.

The hardest part of billing happens before the bill

People assume the hard part of utility billing is the calculation. Tariffs, tiers and proration look complicated, but once the inputs are right they are deterministic. The hard part is getting the inputs right: gathering data from several outside systems, keeping it consistent, and applying the correct conditions to each customer at each point in time.

The platform integrates with three kinds of outside system, and each one owns part of the truth:

System What it holds What the platform does with it
Market messaging system The authoritative consumption data Imports consumption as the basis for rating
Banks Incoming payments Imports payments and allocates them to the right invoices
Tax and e-invoicing authorities Tax rules and the official invoice record Submits invoices in the form each authority requires

We control none of them. Each has its own formats, timing and failure behaviour. Consumption data can arrive late, or be corrected after a bill has gone out. A payment may not match any single invoice cleanly. The billing logic is only as correct as the data it runs on, and most of the engineering effort sits there.

Integration code is also where AI-generated code needs the hardest look. It looks finished long before it handles the cases that matter: late data, corrections, duplicates and outages.

Workflows: onboarding a contract

Billing is the end of a longer process. A typical custom workflow is onboarding a contract. The contract is entered into the system, goes through e-signature, and has to pass a set of conditions before the customer goes live. Some cases cannot legally be onboarded at all, and the workflow has to stop them rather than rely on a person to notice.

Every utility has its own version of this. The conditions differ, the order differs, and the legal constraints differ by market. A platform that hard-codes one onboarding flow is useless to the next customer, so workflows have to be configurable, and configuring them has to be cheap.

MaxBill's Workflow Management screen showing a contract workflow from generation request through offer, signing and supplier change, with approval steps, terminal statuses, and a workflow AI assistant panel that explains the workflow in plain language
A contract workflow in MaxBill: each step, its approvals and its end states on one line, with a workflow-specific AI assistant that explains the flow and suggests changes in plain language. Screen restyled for publication from the real product.

What is automated today

Among the things we now automate:

The list keeps growing. Alongside it sits Captain, our own copilot built into the platform. Captain knows the whole system, can carry out most kinds of operations, and already handles the majority of an operator's day-to-day work. An assistant that acts needs the same boundaries, tests and audit trail as the code underneath it.

Captain, MaxBill's built-in copilot, summarising a paid invoice with its billing period, total amount and item count, then creating a renewal draft for the customer on request
Captain at work: asked to describe an invoice, it summarises it; asked for a renewal draft for the customer, it creates one. Screen restyled for publication from the real product.

What remains is the step that matters most: connecting those automated parts into one customisable flow that runs end to end. I have not seen anything like it in the market, and it is what we are building now.

Automating every step and then removing the person who joins them up is the point where the engineering problem changes category. I have written about what a system needs before it is allowed to act on its own, and this is the system I had in mind.

AI inside the billing itself

We use AI in the platform as well as to build it. AI generates the formulas that produce a bill, and AI validates them.

The model writes the formula, and the formula calculates the bill. Models are unreliable at arithmetic, so the safe pattern is to have a model produce something deterministic that can be checked and rerun, rather than trusting a number it produced directly. A formula can be validated before it touches a customer. A number a model produced on the day leaves you nothing to validate.

Where AI failed: duplication and architecture

On small, well-bounded tasks AI is excellent. Across a large codebase it fails in two predictable ways.

Duplication. Asked to add something, the model writes it again instead of finding the version that already exists. Each copy looks fine on its own. Together they become several implementations of the same rule that drift apart over time, and in billing that can mean two customers on the same tariff getting different bills.

Architecture decisions. The model makes choices that look reasonable in the file it is editing and wrong for the system as a whole. It does not know why the system is shaped the way it is, so it cannot respect the reasons.

Both have the same cause: the model cannot see the product as a whole. Bigger context windows help, but the reasons behind an architecture mostly live outside the code.

Our answer was to build our own knowledge store of the product (how it is structured, what already exists, and why decisions were made) and give the AI access to it as an architecture tool. Before it writes code, it can check what exists and how the system expects the job to be done. A person who understands the architecture still makes the final call.

Where AI is not allowed

There are parts of the system AI does not touch: security gates, proxies, and network and access boundaries. It was not useful there, and we would keep it out even if it were. These are the controls that decide what everything else, AI-written code included, is allowed to do. If the same tool writes the code and the gate that constrains it, the gate is no longer independent.

How we know it works: tests on every change

Every new piece of development ships with tests, and a single repository can have thousands of them running in the pipeline. That is the condition that makes AI-generated code acceptable. It has to pass the same tests as code a person wrote, and nothing is merged because it reads well. Generated code is fluent. It compiles, follows conventions and explains itself in comments. None of that is evidence it is correct, and plausible is not the same as supported. The tests settle it.

Where the time goes now

AI shortened two things a lot: writing code, and building enough context about the codebase to change it safely. Both take much less time than they used to.

It did not shorten the work that makes the system enterprise software. The team still has to learn the domain: market rules, tax and e-invoicing requirements, why a contract can or cannot be onboarded. They still have to make the right call when an architecture decision comes up. Those are the decisions AI gets wrong, so that time has stayed with the team.

That is why I count total delivery effort rather than how fast code appears:

Total effort = requirements + architecture + generation + review + testing + integration + security + documentation + deployment + rework

Generation is the line AI shrinks most visibly, and it was never the biggest one. The saving is real. It comes from faster development and faster context building across the whole cycle, while domain learning and architecture judgement still need real time from the team. Prompting before you know the domain gets you code quickly, then rework when the missing rule surfaces, and the rework eats the saving.

Teaching the team

Building alone with AI and teaching a team to do it are different jobs. When I worked alone, the architecture lived in my head, and I caught the model's mistakes because I knew what the system should look like. A new engineer starts without that, and so does the model.

What made the process teachable was getting that knowledge out of one person's head:

What I would tell anyone attempting it

Before any of it reaches customers, it has to pass a production gate like any other system.

Verdict: expand

The platform is live with utility companies, the team grew once the approach had proved itself, and the next step is the end-to-end flow that ties the automated pieces together.

My conclusion: use AI to move faster through disciplined enterprise delivery. Do not use it to skip domain knowledge, architecture or security, because those are where the system becomes enterprise software, and AI does not supply them.


I write about autonomous systems that act, and what it takes to let them. More writing here. For new essays, follow me on LinkedIn or subscribe by RSS.