Skip to main content
Metered plans bill in arrears on usage you record. The meter is yours. The adding up, the invoice and the collection are ours.
Usage bars climbing across a month, and the invoice that opens when the period closes.Usage bars climbing across a month, and the invoice that opens when the period closes.

Usage accumulates through the period, and the close turns it into a bill

Recording usage

idempotency_key is required. Derive it from the thing being reported, such as the subscription and the window, rather than generating a random one. A random key defeats the protection, because a retry produces a different one and the usage is counted twice.

Reporting as it happens, or in batches

Both work. Pick whichever matches how your product produces the numbers.
Batching is usually kinder to both sides. One record a minute with an idempotency key derived from the minute is safe to retry and cheap to send.

How the period closes

When the billing period ends, Reclack totals what was recorded, applies the allowance and the rate from the price, and opens a real invoice with the usage figure on the document. The collection then runs against the authorization the customer already signed.

Arithmetic

Amounts live in integer atomic units from the meter to the chain. No floating point touches a figure that will be charged, and rounding is decided once, when the invoice is written. The figure on the invoice is the figure that settles.

Keeping the customer informed

Running totals are visible to you in the dashboard and to your customer in the portal while the period is still open. A bill that arrives with no way to check it is a bill somebody argues with, so showing the figure as it accumulates is worth the small effort.
A metered period is still bounded by the approval the customer signed. Price the allowance so a usual month sits comfortably inside the cap.