
When a request fails, gets retried, or produces an error, you can submit a track event with a negative quantity to reverse the recorded usage. This works across all metered features, not just credits.
For credit burndown features specifically, reversed usage returns credits to the customer's balance via an adjustment grant. Adjustment grants accumulate across multiple corrections per company, are always consumed before plan grants or purchased credits, and carry a rolling one-year expiration that extends with each new adjustment.
Negative quantity events require a server-side secret API key (publishable keys cannot submit them) and generate negative usage records in the ledger for auditing. See the usage adjustments docs for implementation details and code examples.