Graphite can show the subscription behind each server: the plan, price, next due date and open invoices, with buttons to manage, pay or upgrade. Servers with an unpaid invoice get an alert with a Pay invoice button, and the server list can show the due date.
Only the owner of a server and admins see billing details. Subusers never see them.
How servers are matched#
Graphite matches a server to a service through the External ID of the server. It must be the service ID in your billing system, and it may only contain digits (up to 12). A server with another or an empty external ID shows no billing. If your billing system did not create the server, set the external ID in the admin area under Admin → Servers, on the server.
Connect Paymenter#
- In Paymenter, create an admin API key that can read services. Graphite calls
GET /api/v1/admin/servicesandGET /api/v1/admin/services/{id}with the product and the invoices included. - In Graphite, open the Billing tab and choose Paymenter.
- Fill in Billing URL, for example
https://billing.example.com, and API key. - Click Test connection. A green message says Connected.
- Click Save billing.
Only invoices with the status pending count as unpaid. Graphite shows the service status, the plan name, the price with its currency code, the expiry date as the due date, and links to the service and its upgrade page.
Connect WHMCS#
- In WHMCS, create API credentials for an API role that may call
GetClientsProducts,GetClientsDetails,GetInvoicesandGetInvoice. - Allow the IP address of your panel to use the WHMCS API.
- In Graphite, open the Billing tab and choose WHMCS.
- Fill in Billing URL, API identifier and API secret.
- Click Test connection, then Save billing.
Graphite shows the status, plan, recurring price with the client's currency, billing cycle and next due date. An unpaid invoice counts when it has a Hosting item for this service. At most 10 unpaid invoices are read.
The Billing tab#
| Field | Meaning | Default |
|---|---|---|
| Provider | Off, Paymenter or WHMCS | Off |
| Billing URL | The address of your billing system. It must start with http:// or https://. A trailing slash is removed |
Empty |
| API key | Paymenter only | Empty |
| API identifier and API secret | WHMCS only | Empty |
| Billing block on the dashboard | Shows the Billing block on the server dashboard | On |
| Alert for unpaid invoices | Shows an alert on the server page when an invoice is unpaid | On |
| Due date on the server list | Shows the due date on server cards | On |
| Show the due date this many days ahead | 0 to 60. A card also shows the date when it is overdue or has an unpaid invoice | 7 |
Billing only turns on when the provider, the URL and the credentials are all filled in. Secrets are stored encrypted and are never sent back to the browser. A saved key or secret shows the hint Saved, leave empty to keep it. Leave the field empty to keep it. Click Save billing to save. The Billing tab has no Reset to default.
Billing details for a server are cached for 5 minutes, so a paid invoice can take up to 5 minutes to disappear. The billing system is asked with a timeout of 6 seconds.
What users see#
- The Billing block, when it is on the server dashboard layout. Add it in the Server dashboard tab if you removed it.
- A Pay invoice alert at the top of the server page. The alert says Invoice #id is due on date, was due on date or has not been paid yet, or counts the invoices when there are several. A user can close it, and it stays closed until the browser tab is closed or the list of unpaid invoices changes.
- The due date on the server card.
- The Upgrade button on resource alerts and the Upgrade plan quick action. See Server dashboard and console.