Short answer
To show a new customer what they will pay, call the preview with subscription_details.items along with the customer. For existing customers, check that the customer ID is the one that holds the subscription, and handle this code as “no upcoming invoice” in the billing screen.
Rather not fix it yourself? Stripe Billing Fix and Setup handles it at a fixed price, agreed before work starts.
Why there is nothing to preview, and the fix
01
The customer has no active subscription
“Only customers with active subscriptions or pending invoice items have invoices that can be previewed.” Stripe, Error codes (invoice_upcoming_none)
A canceled subscription, or a customer who never subscribed, has no next invoice. Show a plain message on the billing page instead of an error.
02
The app previews a plan before signup
“If not provided, but a subscription_details.items is provided, you will preview creating a subscription with those items.” Stripe, Create a preview invoice (subscription)
A checkout page that previews price, tax or proration for a new plan needs the items in the request.
const preview = await stripe.invoices.createPreview({ customer: customerId, subscription_details: { items: [{ price: priceId }] }, });03
The wrong customer ID is used
Apps that create a Stripe customer on every signup or checkout end up with duplicates for one email. Store the customer ID that owns the subscription and use that one.
04
Old code calls the upcoming endpoint
Also check: newer API versions replace the upcoming invoice call with createPreview. Upgrade the call when you upgrade the API version, and test both cases: with and without a subscription.
Checked against the vendor’s docs on : Stripe docs: Error codes; Stripe API: Create a preview invoice.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- $950Stripe Billing Fix and SetupSubscriptions, webhooks, customer portal and failed payments set up or fixed, tested in Stripe test mode.See scope and start
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
“Working with Simon makes everything run so smoothly and better than I could ask for it. Amazingly communicative, extremely knowledgeable of coding and the backend processes. I strongly recommend.”
Related: Stripe canceled subscription still has access · Stripe subscription past_due · Stripe coupon_expired · Stripe invoice_not_editable