Credit Notes, Refunds and Clawbacks in Hosting Billing
Getting money in is built carefully. Getting it back out is built in a hurry, and that is where the accounting goes wrong. Four operations that look like one.
Getting money in is built carefully. Getting it back out is built in a hurry, and that is where the accounting goes wrong. Four operations that look like one.
Getting money in is the part everyone builds carefully. Getting it back out — refunds, credit notes, account credit, clawbacks — is the part that gets built in a hurry when the first customer asks, and it is where the accounting quietly goes wrong.
The trouble is that these are four different things that look like one thing, and treating them interchangeably produces books that do not balance and balances that do not exist.
Not legal or tax advice. Credit-note and VAT-adjustment rules are national and change. This post describes the mechanics and the platform behaviour that supports them; confirm the specifics for your jurisdiction with your accountant.
A refund returns money to the customer's payment method. Cash leaves your bank. It is a real-world event with a gateway transaction behind it.
A credit note is a tax document that cancels or reduces an invoice. It adjusts what was owed and what VAT you declared. No money necessarily moves.
Account credit is a balance the customer holds with you, spendable against future invoices. No money moves and no tax position changes at the moment it is granted.
A clawback reverses credit that was granted, usually because the thing that generated it was itself reversed.
The most common mistake is using account credit where a credit note is required. A customer is overcharged, you add €40 of account credit, everyone is happy — and your VAT return still says you supplied €40 more than you did, because no tax document was ever issued to correct it. The customer is satisfied and the books are wrong.
Here is the rule that prevents most of the damage: every path that creates a balance must have a matching path that removes it, and every path that removes one must have a matching path that restores it.
That sounds obvious and it is routinely violated, because the paths are built at different times by different people. A worked example of the failure mode, which is common enough to be worth spelling out:
The fix is that refunding a credit deposit must also reduce the balance it created. And because a refund can arrive by more than one route — an admin clicking refund, an API call, or a gateway webhook firing after someone refunded from the processor's own dashboard — every one of those routes has to do the clawback, not just the obvious one. A refund issued from the gateway's own interface that never reaches your platform is exactly how this ends up wrong.
Hosting invoices get part-paid more than people expect: a customer pays what they can, or pays with a credit balance that does not cover the total and settles the rest by card. Both halves have to be visible on the invoice, and both have to be visible everywhere the invoice is read — the customer portal, the admin view, the PDF, the accounting export and the API.
The failure mode is a partial payment recorded in one table that only one code path reads. The invoice shows unpaid in three places and part-paid in the fourth, dunning chases a customer who already paid, and the accounting export omits money you actually received. When you evaluate a platform, pay a single invoice half by credit and half by card, then look at it from all five surfaces.
Account credit a customer has paid for and not yet used is money you owe them, and it should not be sitting in your books as income. This matters more than it sounds for hosting businesses that encourage prepayment or top-ups: a healthy-looking cash position can be substantially other people's money. Your accountant will want unspent balances reported separately, so your platform needs to be able to produce that number for a date.
It also affects what happens when a customer leaves. Whether unspent credit is refundable, expires, or is forfeited is a terms question with jurisdictional constraints — settle it in the terms, not case by case.
Credit deposits, allocation to invoices, refunds and clawbacks are built as matched pairs in FluxBilling: deleting a credit allocation returns the balance, and refunding a credit deposit reduces the balance it created — across every route that can trigger a refund, including an admin action, an API call and a gateway webhook fired by a refund issued from the processor's own dashboard. Partial payments are visible on every surface that reads an invoice rather than only in the admin view, so a part-paid invoice reads the same in the portal, the PDF and the export.
Credit notes are documents that reference the invoice they correct, and they flow through the same accounting export as invoices and proformas — XLSX, CSV, SAGA XML or bulk PDF — with EU VAT allocation handled in the export.
See billing features, and for how these documents land at year end, year-end financial close for hosting businesses.
Test the reverse direction of every money movement your platform supports, not just the forward one. Deposit, spend, refund, and then check the balance. Pay half an invoice with credit and half with a card, and read it from five places. The forward paths were built with care because they take the money; the reverse paths are where the surprises live.
A chargeback is the customer’s bank deciding for you, taking the money, and charging a fee whether you win or not. Most are communication failures, and three small fixes remove them.
The gap between "this invoice is overdue" and "this server is gone" is a policy, not a feature. Most businesses never write it down, so it exists anyway as whatever the software defaults to.
A gap in an invoice sequence is a question you have to answer, and "the software did it" is not an answer. Where hosting businesses generate gaps and how to stop.