Usage Billing
Usage billing charges a service for what it used
Usage billing charges a service for what it used, on top of its base fee: gigabytes of transfer, API calls, users, disk space. A product set to Usage based meters one or more things and prices them in bands.
Setting a product up #
- On the product, set the Pricing model to Usage based. The ordinary price grid becomes the base fee for each billing cycle (type 0 for pure pay as you go).
- Open Usage pricing and add a metric for each thing you meter. A metric name is lowercase letters, digits and underscores, starting with a letter, and a product can meter a limited number of things.
- For each metric choose how the period's readings become one number (below), give it a display name (shown to clients) and a unit, and set its price bands.
- Save.
Counting the period #
| Count the period as | Use it for | Example |
|---|---|---|
| Last reading | what is held | disk space |
| Peak reading | what is reached | most users online |
| Sum of readings | what is posted as it is used | API calls, transfer |
Price bands #
A metric's price is graduated. Each band has a range and a price per unit in each currency, and each band is priced on its own. A band priced 0 at the start is the included amount: a first band of 0 to 1,000 GB at 0 means 1,000 GB are included, and every unit above it is charged at the next band's price. Only the last band can have no upper limit, and every band needs a price in the default currency (type 0 for a free band). A currency you leave blank is sold at the default currency's price, converted at today's rate.
Limits and included amounts are per month. For a sum metric, a quarterly, yearly or longer renewal multiplies them by the months of its cycle, so a yearly plan includes twelve months of allowance. Last reading and peak reading are levels, not totals, and are never multiplied.
How readings arrive #
- The daily run reads usage from the server module when the module can report it (for example a cloud server's transfer).
- For anything else, the API posts readings for a service.
How it is billed #
A usage product's renewal invoice carries the base fee and the usage metered since the last invoice, up to the day that invoice is raised. The readings are marked billed in the same step, so a reading is billed once and a failed run bills nothing.
On a plan billed monthly, quarterly or longer, usage is billed at each renewal for the readings of that period. A client who pays for a quarter in advance gets one invoice for that quarter: the base fee, plus the usage used since the previous invoice. The usage is not billed month by month unless the invoices themselves are monthly.
A period with no reading is not charged: the renewal goes out with the base fee, the service's usage history says No readings, and the activity log says so, so you see a period that went by unmetered rather than a bill that is quietly short. If readings arrive later you can bill them.
When a service is cancelled or terminated no renewal follows, so whatever is left is billed on an invoice of its own.
What staff and clients see #
- On the service, staff see Usage billing: the estimated usage charge so far, the cut-off ("The next renewal invoice includes usage up to ..."), the history of what was billed, and Bill usage now to invoice what no invoice has carried yet.
- Clients see their usage on their service page.
- Some figures are estimates: a DigitalOcean droplet's transfer is worked out from its bandwidth graph, so it can differ a little from what DigitalOcean counts.
A fixed-length base fee and usage are separate lines. Changing a metric's price bands later does not change invoices already raised.
Something missing or wrong? Tell us or contact us.