Hourly billing at SERVERIZZ is the monthly price divided by 672. That's 28 days of hours, so no month ever bills more than the monthly price.
WritingBilling
Billing notes
Metering, ledgers and the math behind a fair bill, noted as the SERVERIZZ billing rebuild happens.
One rule for the billing ledger: you never edit money. A correction is a new row, and the database itself refuses anything else.
CREATE TRIGGER ledger_append_only
BEFORE UPDATE OR DELETE ON ledger_entries
FOR EACH ROW EXECUTE FUNCTION reject_ledger_change();That's every billing note so far. The whole story is in the case study.01 · Billing · Case studyA usage billing ledger that can't double-chargeRead the case study