Stripe · api · fg-0148

latest_invoice.payment_intent is gone, so a new subscription has no client_secret to confirm

If you see expand latest_invoice.payment_intent returns an invoice with no payment_intent field, the cause and the fix for Stripe are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
expand latest_invoice.payment_intent returns an invoice with no payment_intent fieldTypeError: Cannot read properties of undefined (reading 'client_secret')Payment Element never mounts for a payment_behavior default_incomplete subscription
Cause
Basil added partial payments on invoices and removed payment_intent, charge, paid and paid_out_of_band from Invoice, and invoice from PaymentIntent and Charge. Tutorials written before 2025 still expand the old path.
Fix
Expand latest_invoice.confirmation_secret and hand its client_secret to the Payment Element. To link payments and invoices, read invoice.payments or the Invoice Payments list endpoint.
Apply
const sub = await stripe.subscriptions.create({ customer: customerId, items: [{ price: priceId }], payment_behavior: 'default_incomplete', expand: ['latest_invoice.confirmation_secret'], }); const clientSecret = sub.latest_invoice.confirmation_secret.client_secret;
Affected
Stripe API 2025-03-31.basil and later; stripe-node 18+ and the matching majors of other SDKs
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun