Short answer
Check that the invoice and its items use the same customer ID. Then make the order explicit: create the invoice as a draft, add each invoice item with that invoice’s ID, and finalize it. If the app depends on items created earlier, pass pending_invoice_items_behavior: include when creating the invoice.
Rather not fix it yourself? Stripe Billing Fix and Setup handles it at a fixed price, agreed before work starts.
Why the invoice has no items, and the fix
01
The invoice is for a different customer
“Verify that the correct customer is being specified or create any necessary invoice items first.” Stripe, Error codes (invoice_no_customer_line_items)
Apps that create a new Stripe customer at every signup or checkout can end up with duplicates for one email. The items sit on one customer while the invoice is created for another. Store one customer ID per user and reuse it.
02
The items aren’t added to the invoice
“You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.” Stripe, Create an invoice item (invoice)
Create the draft invoice first, then create each item with the invoice ID so it lands on that invoice.
const invoice = await stripe.invoices.create({ customer: customerId }); await stripe.invoiceItems.create({ customer: customerId, invoice: invoice.id, amount: 2500, currency: 'usd', }); await stripe.invoices.finalizeInvoice(invoice.id);03
Pending items aren’t pulled into the invoice
“Include any pending invoice items, and create an empty draft invoice if no pending invoice items exist.” Stripe, Create an invoice (pending_invoice_items_behavior)
Items created without an invoice ID stay pending. Pass pending_invoice_items_behavior: include when creating the invoice to pull them in.
04
The subscription version of the error
Also check: invoice_no_subscription_line_items is the same problem for a subscription ID. Check the subscription ID, or create the invoice items first.
Checked against the vendor’s docs on : Stripe docs: Error codes; Stripe API: Create an invoice; Stripe API: Create an invoice item.
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 invoice_upcoming_none · Stripe invoice_not_editable · Stripe invoice_payment_intent_requires_action · Stripe invoice_no_payment_method_types