Billing modules
Sell hosting from WHMCS, FOSSBilling or Blesta and let it create, suspend, restore and terminate accounts on your Dashmox server. All three are free and open source, and the integration key they need comes with Pro and Business.
Where they are
On GitHub, or inside the panel.
All three are published, free to use and free to read before you install them. Nothing in them is obfuscated or encoded, which matters for software that holds a key to your panel and runs on your billing server.
- WHMCS provisioning module, which also carries two tools for finding orphaned accounts and pushing your packages onto the panel.
- FOSSBilling server manager.
- Blesta provisioning module.
They are separate modules, because the three billing systems are shaped nothing alike, and each one is self-contained once unpacked.
The panel also carries them, under Server, then Downloads. That copy is the one built against the release you are running, and it is there on a server with no route to the internet at all.
What they do
The lifecycle, driven from your billing system.
- Create. A paid order makes the customer on the panel and the website under them.
- Suspend and restore. Flips the whole customer, which signs out their people and reconfigures their websites.
- Terminate. Removes every website first, then the customer, in that order because the panel refuses a customer who still owns one.
- Change package. Moves a customer onto another plan you already sell.
- Usage. Reports peak disk over the billing period, from the daily samples.
What a customer sees is a read-only summary on their service page: status, disk, transfer over thirty days and certificate expiry, with an optional link to the panel. Every change is still made in the panel, so it is built once rather than twice and kept in step for ever.
Setting one up
A key, a server, and a product.
Make an integration key in the panel under Server, then Integrations, granting it the permissions the module needs. It belongs to the installation rather than to a person, so it does not vanish when whoever made it leaves.
Give it exactly these permissions. A module with less fails partway through an order; one with more is a credential that reaches further than it needs to.
| Permission | Why the module needs it |
|---|---|
sites.create | Creating the hosting when somebody orders. |
sites.view | Reading back what it created, and finding accounts that no longer have an order. |
sites.edit | Suspending and restoring on non-payment, and changing plan on an upgrade. |
sites.delete | Terminating when a customer cancels. |
customers.manage | Creating the customer the hosting belongs to. |
users.manage | Creating the account the customer signs in with. |
Set Allowed ranges to your billing server’s address while you are there. A key that only works from one machine is useless to anybody who takes a copy of it. See integration keys for the whole form.
Then add the server in your billing system:
Hostname panel.example.com Port 443 Access hash dashmox_YOUR_KEY_HERE Secure yes
In WHMCS the key goes in the access hash; Blesta has a field for it and stores it encrypted. Then press Test connection. It checks the key is a Dashmox one before opening a socket, that it may read hosting packages, and that the panel has packages at all, so a missing permission is found there rather than by the first customer to order.
| What the test says | What to do |
|---|---|
| Not a Dashmox key | Check it begins dashmox_ and was copied whole. |
| Not valid | It was deleted, has expired, or the request came from outside the allowed ranges. |
| Was not given a permission | The message names it. Add that one to the key. |
| No hosting packages | The key works. Create a package in the panel first, since a product has to map onto one. |
| Integration keys need a licence | The installation has no Pro or Business licence in force. |
More than one server
Your billing system decides where accounts land.
Several Dashmox servers work with no extra configuration: the module reaches whichever panel a service is assigned to. Where new accounts go is a server group in your billing system, and its fill type does what a host would ask for: the server with the fewest accounts, a random one, or filling each in turn.
One thing is worth knowing before trusting a balanced group. The count behind "least accounts" is your billing system's own, so a panel that also holds websites it never created looks emptier than it is, and the balancer sends more work to the fullest machine. A tool that ships with the module finds exactly that, in both directions.
Two tools
Push your packages, and find what nobody is billing for.
Push packages copies the products you sell onto a panel. One direction only, and it only ever adds: an allowance somebody is already hosting under is not something a sync script should move. It says what it would do unless you tell it to go ahead.
Find orphans is read-only and compares both directions. Websites on the panel your billing system does not know about are the ones that break a balanced group and that nobody is invoicing. Services being billed whose website is gone are somebody paying for nothing.
What they do not do
Said plainly rather than quietly skipped.
There is no single sign-on. The link to the panel is a plain link to its sign-in page and your customer enters their own panel password. A one-time token that logs somebody in is worth exactly as much as a password, and what it buys is one fewer sign-in on a page most people visit rarely.
A customer can be allowed to hold customers of their own, and the ones they create are customers on your server that you also see. What there is no support for is selling hosting under somebody else's branding: no second panel, no separate name on it, no second price list. A module operation with nothing behind it refuses by name rather than reporting success, because a method that quietly does nothing tells a host their customer's password changed when it did not.