Skip to content

Stripe Billing errorStripe: invoice_no_customer_line_items

invoice_no_customer_line_items is the Stripe error for creating an invoice for a customer who has no pending invoice items. Stripe says to check that the right customer is specified, or to create the invoice items first.

Rather hand it over? Stripe Billing Fix and Setup: Subscriptions, webhooks, customer portal and failed payments set up or fixed, tested in Stripe test mode.

Full refund if Simon can’t take it on once he sees your project, or if you cancel before work starts. Refund terms.

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

  1. 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.

  2. 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);
  3. 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.

  4. 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.

“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.”
A buyer in the United States, January 2026. App development on Fiverr
All 127 Fiverr reviews

Related: Stripe invoice_upcoming_none · Stripe invoice_not_editable · Stripe invoice_payment_intent_requires_action · Stripe invoice_no_payment_method_types

Questions

More on this error

What does pending_invoice_items_behavior default to?

exclude. Stripe’s Create an invoice reference says it defaults to exclude when the parameter is omitted, and exclude always creates an empty draft invoice, whether or not there are pending invoice items.

Can items be added to a finalized invoice?

No. Stripe says invoice items can only be added to draft invoices, with a maximum of 250 items per invoice.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. 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.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.