Feature Requests
Share ideas, discuss and vote on requests from other users in community
This object is in archive! 

API Function: Merge Invoices

Mantas Pakamore shared this idea 6 years ago
Under Consideration

We want to generate real consolidated invoices.

Once a new invoice is generated, we can catch it with a hook. Then we can check whether a user has other unpaid invoices. If he has, we want to merge the new invoice with a previous invoice. For that to work we need an API function to merge invoices.

Ideally, all admin commands should be available through API. Now there is a feeling that we can do everything through API, but when we start working, we always find some small missing functions here and there.

Comments (4)


Agreed, this would be a great addition to the API. However it would be ideal if all basic Admin area functions were exposed through the API as well.


Needed here too.

Or, al least, that other API like



Permit to add invoice lines with a relid that connect them to product that must be renew.

With this should be possibile to copy lines to an invoice to another in order to simulate a "merge" but without relids when the CU will pay the renew action will not perform automatically... :(


This is aweful and the absolute wrong aproach.

Invoices should not be deleted and recreated all the time, they are supposed to be a final document.

well at least in most parts of the world. in coountries where this not apply you cuold still work the more stricter aproach while the other way around its not

so if you merge it should be done at generation of an invoice not later, not after.

thres also some other issues with cancle/delete and edit invoices after the fact.

its hard for you to internal audit, it could go into chaos quickly.

so no current practice is very bad and we should ask to change that to a more legal and compliant aproach

not do patchwork over aweful solutions over patchworks over patches

mergin products should be an option in an customer (merge invoices for xxx days so all invoices are within a timeframe are generated at once in one document

that would streamline everything and keeps all records and databases clean.

same time delete, edit and merge of alrready pu blished invoices should be deaktivated, and replaced by proper credit invoice


What about just updating a mass pay invoice with new invoices as they go. The biggest issue in this in the past is that the line items are not on the MassPay invoice. And that a masspay invoice is not differentiated enough not to confuse clients into thinking this is an extra charge.

Over time somehow our client invoices go out of sync for various products and we find ourselves re-aligning service billing dates about every 6months. Because of the choice to bill in 30day cycles, invoices move. But worse yet somehow different services seem to go out of sync even if they start together. This creates the core issue for clients who are trying to get one invoice with everything on it at the end of a billing month. Client's with 4 services get 4 invoices sometimes for small amounts. This creates issues with additional payment gateway fees. And charging overdue fees with a flatrate suddenly blows out into a massive charges because WHMCS can't keep billing to one invoice over time.

Most of our clients are willing to pay a prorated amount to get billed on one date. But this date moves around causing a lot of frustration for our clients and us since this influences our cash flow. And with services where we absolutely have to pay bills at the end of a month this makes the difference between being in a negative before paying suppliers and being in a positive. Essentially the lack of this feature-set actually inhibits growth. And runs the continual risk of putting us out of business if we don't continually micromanage WHMCS's lack of billing date stability.

When I think about it even hosting services are based on an actual date that our server rentals, software and other things are due. When invoices move about this creates chaos. As we grow this problem is only getting worse and worse.

So I agree with @Whatever we really need a revamp of how WHMCS works at the core. Invoices should not change over time, this confuses clients. But it requires a rethink in how invoicing will work since some overdue need to be added. And service billing dates need to remain stable so different services bill together and at an agreed time.

I think this is the core pain point we're having with WHMCS at this very moment and it's become unbearable.