-
Payments
Implement usage-based (metered) billing correctly
Reports usage to the provider reliably, with local records that survive retries and idempotent submission.
Free Prompt
What This Does / How This Helps
Makes usage billing trustworthy in both directions: durable local records so no billable action is lost, and idempotent reporting so retries never double-charge. Metered billing is the model where bugs bill themselves in both directions. Fire-and-forget reporting loses revenue silently every time the API hiccups. Naive retries overcharge customers. And without a local record, there's no way to prove what a customer actually used when they dispute the invoice. The kill-and-recover verification is the honest test: interrupt the reporting pipeline and confirm it resumes without losing or duplicating a single unit.
Want to skip doing this by hand?
Fortivibe audits your app for all of the areas these prompts cover (and more).