PD Cloud Cost & Margin for WHMCS

PD Cloud Cost & Margin — Know What Your Cloud Resell Actually Earns

Find out which services you are losing money on — and which resources nobody is paying for

Made and supported by Projektif Digital Ltd. Runs inside PD Modules, the panel every module installs into.

Billing & Sales Monitoring & Alerts

PD Cloud Cost & Margin shows a hosting company which of its resold cloud services are losing money, and which cloud resources are still billing with nobody paying for them. It reads your real cloud bill, matches every charge to the WHMCS service that caused it, and sets that against what you charge the customer.

It is built for hosts who resell cloud servers, databases and storage with PD provisioning modules, and who would otherwise find out about a wrong price, or a volume left behind by a cancellation, only when the provider's invoice arrives.

Why hosts choose PD Cloud Cost & Margin

Know which services lose money. Margin lists, for one month at a time, what each service costs against what you charge for it, worst first, with links to the service, its client and its product. A service costing more than it charges is flagged "Losing money", and one earning less than your margin floor (20% by default) is flagged "Below your floor".

Find what a cancellation left behind. "Paying for nothing" lists disks, snapshots and addresses that have been billing for at least the number of days you set (7 by default) with no service attached, most expensive first, with what each is, its region, this month's cost and since when it has been billing.

Your bill, not an estimate. Nothing is guessed. A service with revenue and no measured cost is listed as "No cost data yet", never as a healthy margin, and the headline figures count only services whose cost was actually measured.

Matched exactly, never by guessing. A charge is matched to a service through the names and tags the PD module gave the resource when it built it. Anything built by hand carries no marker and shows under "Paying for nothing" until you set it aside, so you can trust a match when you see one.

One customer or one plan is one row. Margin rolls up per product and per client, so a customer or a whole plan that loses money is a single line.

Read-only, always. The module never deletes or changes anything at your provider. It only reads the bill, and what to switch off stays your decision.

How it works

  1. Install alongside your PD cloud modules. AWS costs are read with the credentials your PD AWS modules already hold, with nothing new to set up. Azure, Google Cloud and DigitalOcean are brought in by pasting their per-resource cost export.
  2. Set your comparison. Choose the currency and rate used to compare, your margin floor and your orphan thresholds in Settings.
  3. Costs refresh daily. A scheduled job pulls costs once a day, or you can press Refresh from your providers.
  4. Read the Margin tab. Filter to what is losing money and open the service behind it.
  5. Clear up the leftovers. Check "Paying for nothing", then fix the real ones in your provider console and mark legitimate ones as expected so they stop appearing.

What you get in WHMCS

Margin

  • Cost against revenue per service, per product and per client, for the month you choose, worst first
  • Revenue is the service's recurring price turned into a monthly figure: a yearly plan is divided by twelve, and one-time and free services count as no monthly revenue, so a cloud cost they carry shows as a loss
  • Revenue is converted into the provider's billing currency at the rate you set, and a service billed in another of your currencies is first converted at your billing system's own rate
  • The current month is always partial because providers publish billing data hours to a day behind, so completed months are the ones to compare

Paying for nothing

  • Orphan age counts from when the resource was first seen billing, so something left behind months ago stays on the list from the first day of a new month
  • Resources under a minimum monthly cost (1 by default) are left out
  • Set a resource aside as "Expected" and it moves to "Ones you have set aside", with a "Look at it again" button to put it back
  • Tax, support plans and other charges that belong to no resource are left out rather than shown as orphans

Providers

  • AWS is read from Cost Explorer for every AWS account set up as a server for a PD AWS module. If AWS refuses, for example for a missing permission or because resource-level data is off, the Providers tab names the reason instead of showing a zero
  • Because AWS keeps resource-level detail for only about fourteen days, the daily refresh keeps each day it reads and a month is the sum of its days
  • Paste a per-resource cost export from AWS, Azure, Google Cloud or DigitalOcean, header row included. The module finds the resource, cost, service, region and currency columns by reading the header, adds several lines for one resource together, and skips credits and zero-cost lines
  • Importing a month again replaces that month rather than adding to it, and an export in a different currency from your comparison currency is refused with the reason
  • Each provider shows how it is read, whether this month has data, how many resources were read and how many matched a service

Staying informed

  • An optional email digest, off by default, mentions each newly-affected service or resource once a month, never the whole list every day
  • A module report says whether a PD cloud module is installed, whether this month has cost data, how many charges matched, how many services lose money, and what the orphans cost
  • Read-only assistant tools answer "which services cost more than they earn" and "which resources is nobody paying for"
  • Refreshes, imports and resources set aside are logged in the module's Activity

Security built in

  • AWS cost reads go from your server to your own AWS account only
  • No second copy of any secret is kept: AWS is read with the credentials your PD AWS modules already store
  • The licence check sends only your licence key, domain, server IP and install directory, plus module and version, never customer data
  • Customers never see any of it: the module adds no client-area pages

One product, every feature

PD Cloud Cost & Margin is one paid module with everything included. There are no add-on tiers. It installs into PD Modules in one click, updates itself, and adds its own tables and scheduled job without modifying WHMCS files. AWS cost reads cost a small amount per request at AWS; the once-a-day refresh keeps that to pennies a month, and pasting an export costs nothing.

If your subscription ever lapses, you get 14 days of grace with everything working. After that, the margin figures already worked out stay readable, while refreshing, importing, the orphan list and the digest pause until it is active again.

Requirements

  • WHMCS 9 or later on PHP 8.2 or later, with the ionCube Loader
  • At least one PD cloud provisioning module; without one the module still totals your bills, but Margin stays empty and every charge appears under "Paying for nothing"
  • For AWS, a Cost Explorer permission on your AWS credentials
  • PD Modules, the free control panel every PD module installs into

Questions

Do I need the PD cloud provisioning modules for this to work?

For the headline feature, yes — this is a companion to them. Per-service margin and orphan detection rely on each resource being recorded against the service that owns it, which is what PD Lightsail, PD EC2, PD AWS S3, PD Azure VM, PD DigitalOcean Droplets and the rest of the PD cloud range do when they provision. With none of them installed the module still reads your bill and totals it accurately per provider, but no charge can be attributed to a customer: Margin stays empty and everything lands under “Paying for nothing”. The Providers tab and the module report tell you which situation you are in.

What about resources I created by hand, or with another vendor's module?

Our modules never recorded them, so they are never matched — they appear under “Paying for nothing” until you mark them as expected. That is deliberate: guessing would put one customer's cost against another customer's revenue and make both figures wrong at once.

Do I have to give this module new cloud credentials?

No. For AWS it uses the server credentials your PD AWS modules already hold, so there is nothing new to set up and no second copy of a secret. For every other provider it reads a cost export you paste in — no credentials at all.

My AWS costs come back empty. Why?

Either the IAM user your AWS server uses cannot read Cost Explorer (provisioning permissions do not include it — add ce:GetCostAndUsageWithResources), or resource-level granularity is not switched on in your AWS account (Billing → Cost Explorer → Preferences). The module names which one it hit rather than showing you a zero — the Providers tab shows what AWS said on the last refresh.

Why is this month's figure lower than I expect?

Because the month is not over, and because providers publish billing data hours to a day behind. Compare completed months; the current one is always partial.

A service says "No cost data yet" but I know it is running.

Then no charge on the bills read so far has been matched to it. Either the provider has not billed it yet — DigitalOcean invoices arrive after the month ends, and AWS is a day behind — or its resource is not one our module recorded (created outside the PD module, or replaced by hand), in which case its charge is under “Paying for nothing”. We do not guess: attributing a charge to the wrong customer would make two figures wrong at once. Services with no cost data are left out of every total.

Can it delete the orphaned resources for me?

No, deliberately. Nothing here writes to your provider. A resource can legitimately have no service attached — your own backups, a shared load balancer, something a colleague is mid-way through. Mark those as expected and they stop appearing; delete the rest in your provider console.

How is revenue worked out?

From the service's recurring price in WHMCS, turned into a monthly figure (a yearly plan divided by twelve, any other term by its length in months), converted to your default currency at WHMCS's own rate if the client is billed in another of your currencies, and then into your provider's billing currency at the rate you set. One-time and free services have no monthly revenue, so any cloud cost they carry shows as a loss.

Why do I set the exchange rate myself?

Because a wrong rate makes every margin on the page wrong, and a live rate that quietly went stale is worse than one you chose on purpose and know the age of.

Does running it cost me anything?

AWS charges a small amount per Cost Explorer request. The refresh runs once a day, which keeps that to pennies a month. The cost-export path costs nothing.

What happens if my licence lapses?

The margin figures you already have stay readable — that is your business data, not ours. Refreshing, importing and the orphan list pause until the licence is active again.

What data leaves my server?

Your customers' data stays in your WHMCS. To confirm your licence, the platform sends us four things and nothing else: your licence key, the domain, your server's own IP address and the directory it is installed in — the four values recorded against your licence in your client area. Alongside that we see which module and version you run and whether its licence is healthy, so we can ship compatible updates. We never receive your clients' personal data, your credentials, or the contents of your WHMCS. Crash reports are off unless you turn them on, and a diagnostic report is only ever sent when you send one, after showing you a preview you can edit.

Which WHMCS and PHP versions does it need?

WHMCS 9 or later, on PHP 8.2 or later. It installs alongside whatever else you run — it adds its own tables and templates rather than modifying WHMCS files, so it does not collide with other vendors' modules or with a customised theme. Uninstalling removes its own tables and settings and leaves no orphans behind.

How do I get help?

Open a ticket from your client area, or use Get help inside the PD Modules panel, which attaches a diagnostic report — you see a preview of exactly what it contains, and can exclude any part of it, before anything is sent. Support is included with an active subscription; bug reports are welcome whatever your licence state.

What’s new in 0.2.18

  • Fixed: the Margin screen reported no cost data for the month when it had collected plenty. Costs, revenue and margin now appear for every service, whichever billing system you run.

Get your website online with PD Hosting

UK hosting, domains and support from a real team. From a first site to a full server.

Terms and Conditions  ·  Privacy Policy

PD Hosting is the trading name of Projektif Digital Ltd, registered in England and Wales, company number 12482555.

PD Hosting
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.