Skip to content

Knowledgebase

Prepare a HostBill metered-billing product

hostbill, resellers

Metered billing charges for measured resource use. A reliable setup needs a defined unit, a trustworthy measurement feed, a tested pricing scheme and a clear billing-period boundary. Decide these before enabling customer charges.

01 Define the measurement

Write down what one unit means, how often usage is collected and which service identifier receives it. Distinguish a cumulative counter, an interval's new usage and a current resource level. Submitting a cumulative total repeatedly as additional usage can produce a very different bill from recording only the interval increase.

Confirm whether your provisioning module supplies the required metric automatically. HostBill also supports custom variables fed through its API, but that requires an integration responsible for collecting and submitting accurate values. Do not imply that selecting a variable starts measuring a provider that does not expose it.

02 Configure and test the product

  1. Open the product's General settings and select the appropriate metered pricing mode. Choose the billing cycle and any separately agreed fixed recurring or setup charge.
  2. Configure the metric's customer-facing name, unit and internal variable. Review whether readings accumulate and whether values reset each period.
  3. Enter the approved price brackets and choose the intended scheme. HostBill offers tiered, overage, volume, peak and stair-step approaches. Their behaviour differs, so check the vendor's examples and your own readouts instead of inferring the formula from the scheme name.
  4. Configure the supported collection task or custom API feed. Use a restricted API identity where applicable and record how failures, repeats and missing intervals are detected.
  5. Submit a controlled sequence of measurements to a test service. Include values below, at and above a pricing boundary, and calculate the expected charge independently.
  6. Generate or preview the test billing result and compare each metric, fixed fee, discount and tax treatment. Verify the customer can understand the units and period being charged.

03 Test the period boundary and failures

Run a case that crosses the end of the billing period. Confirm which invoice receives a delayed reading and whether reset settings affect later collection. Preserve enough measurement history to explain the invoice even if the operational metric is reset.

Simulate a missed collection interval and a repeated submission in the test environment. Establish whether your integration corrects, rejects or duplicates that data. Document a review process for incomplete usage before invoices are issued, particularly where the provider also bills you for the same resource.

Monitor the collection task, queue failures and unexpected usage changes after launch. Compare a sample of customer bills with provider measurements regularly. Record tariff changes with effective dates so support can explain why identical usage in different periods may cost a different amount.

04 Example: convert cumulative readings into interval usage

A hypothetical provider counter reports 1200 units at the start, 1350 after the first interval and 1500 after the second. If your integration is designed to submit each interval's additional usage, the expected entries are:

Code or configuration example
First interval:  1350 - 1200 = 150 units
Second interval: 1500 - 1350 = 150 units
Total new usage:                300 units

Submitting all three cumulative readings as additional usage would instead record 4050 units. Match the feed to the variable's accumulation and reset behaviour before applying any prices. Keep the original readings and timestamps so the 300-unit result can be explained, and test counter resets separately rather than treating a negative difference as ordinary consumption.

Common questions

Why did enabling metered pricing produce no usage?

Check whether a supported module or custom API integration is supplying the configured variable for that account. Pricing settings define how data is charged; they do not guarantee the data exists.

Can I change schemes on an active billing period?

Test the effect on existing readings first and follow your agreed tariff-change process. A different scheme can recalculate the same usage differently, so a future-period change is often easier to explain and reconcile.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support