Skip to content
Hardcount
Run it locally
Pre-1.0 · one maintainer · Stripe and cards only · no SDKs (client libraries) yet · no production users yet. Docs describe v0.12.0 (30 Nov 2026) · What’s new →

Base fees missed at a scheduled plan change

This page finds the period invoices that an older Hardcount under-billed, and says how to bill what they missed. Back to the runbook index.

A scheduled plan change is a plan change set to take effect at the end of the current billing period. Before the fix, the period invoice built when one took effect could miss base fees. It happened when the subscription has more than one item and bills its base fees in advance. That invoice opens the period that starts at the change. It billed the base fee of each item whose plan changed, and the usage of every item, but not the base fee of any other item.

  • A customer was billed less than usual for one period: the period that started when a plan change on one of their items took effect.
  • That invoice has a base fee line only for the items whose plan changed. The invoice for the next period bills every item again.

At the end of a period, the billing run first applies the plan changes due then, and then builds the period’s invoice. The older code built the invoice from the changed items only, so each other item’s base fee was left out. Base fees billed at the end of the period (in arrears) and usage were billed in full. Hardcount 0.9.2 and earlier have this bug (#1620).

The check reads each subscription’s items, which v0.12.0 removes: a subscription then holds one plan (migration 00260). Run it on v0.11.0, before you upgrade. The query, how to confirm each fee and how to bill it are on this page as of v0.11.0. After the upgrade the query cannot run, and nothing else finds these invoices.

Stuck, or found a bug? Ask in Discussions · Open an issue