Stripe · api · fg-0148

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

expand latest_invoice.payment_intent returns an invoice with no payment_intent field

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

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;

Affects: Stripe API 2025-03-31.basil and later; stripe-node 18+ and the matching majors of other SDKs

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp