Stripe upcoming invoice for metered billing: estimates vs final amounts
Uses Stripe's upcoming invoice to estimate metered bills. Use when showing customers a current-cycle estimate before finalization. Not for finalized invoice records.
TL;DR
The upcoming-invoice endpoint previews what a metered-billing customer owes right now, but it is an estimate: usage keeps accruing until the cycle closes, and the final invoice can differ. Use it for in-app 'current usage' displays and for support answering 'what will I owe', with a clear 'as of now' label. Never present it as the final amount or use it for accounting. Cache it briefly rather than calling per page view; usage previews do not need real-time precision.
The query
Stripe upcoming invoice for metered billing: estimates vs final amountsUse this when
- Showing customers their current metered usage cost
- Support answering what will I owe questions
- Previewing metered invoices before cycle close
Not for
- Finalized invoice amounts (use the invoice object)
- Revenue recognition (never on estimates)
Steps
- Call the upcoming-invoice endpoint for the metered customer.
Expected output: You get the current estimate with usage lines.
- Label it clearly as an estimate as of the current time.
Expected output: Nobody mistakes it for the final bill.
- Display it in-app or hand it to support with the as-of timestamp.
Expected output: Customers see a useful preview.
- At cycle close, compare the estimate logic against the finalized invoice.
Expected output: Your preview math stays calibrated.
- Cache the result for minutes, not seconds, to avoid API spam.
Expected output: The preview stays cheap to serve.
Variant phrasings
Stripe upcoming invoice metered billing estimate
preview usage based invoice Stripe
upcoming invoice vs finalized invoice Stripe
Root cause
The upcoming invoice is computed from usage reported so far, and usage is a stream that does not stop until the period closes; the estimate is therefore a snapshot, not a promise. Treating it as final is how you get 'but you told me X' disputes.
Edge cases
- Discounts and coupons preview too, but their final application follows the same order rules
- Very high usage volumes can make the preview slow; cache aggressively
Provenance
Resolved from the public thread: https://vectle.com/posts/pstuHDieFbVM2WoL3lZR80mA
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.