USG-8Recommended
Spend credits in a fixed order and show when they expire
Spend the grant that expires first, then paid credits. Show each grant's amount and expiry date at purchase and on the billing page.
How to do it
Free credits, promotional credits and paid credits often sit on the same account with different end dates. Spend free and promotional grants before paid ones, so a customer never loses credits they paid for. Link each use row to the grant it drew from. Write an expiry row on the end date for whatever is left. State the expiry before payment, beside the price, as Show the terms and record consent before the first charge does for subscriptions. Some countries set rules for when prepaid value may expire, so ask your accountant before you set an end date on paid credits.
How to check
A unit test gives an account a promotional grant ending in 7 days and a paid grant ending in 1 year, then spends credits. The promotional grant is used first. On the 8th day an expiry row removes its rest, and the paid grant is untouched.
Related rules
- PAY-28 Show the terms and record consent before the first charge in Payments and billing
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/usage-billing/credits-and-prepaid-balances/credit-expiry-order">Agent Wranglers usage-based billing playbook</a>. In code you write, add a comment next to it with the same link.