Short answer
For a subscription invoice, Stripe uses the subscription’s default_payment_method; if that isn’t set, it uses the customer’s invoice_settings.default_payment_method or default_source. The error means none of them gave it a payment method to charge. Set the card as the customer’s invoice_settings.default_payment_method, and for new subscriptions set payment_settings.save_default_payment_method to on_subscription.
Where Stripe looks, and the fix
01
No default on the subscription or the customer
“This takes precedence over default_source. If neither are set, invoices will use the customer’s invoice_settings.default_payment_method or default_source.” Stripe, Create a subscription
Stripe checks the subscription’s default payment method first, then the customer’s invoice settings. A card can be attached to the customer without being the default in either place, so we check both in the Dashboard or with the API for the customer whose invoice failed.
02
Set the customer’s default payment method
“ID of a payment method that’s attached to the customer, to be used as the customer’s default payment method for subscriptions and invoices.” Stripe, The Customer object
Update the customer with invoice_settings.default_payment_method set to the card’s payment method ID; the payment method has to be attached to that customer. Then we retry the failed invoice.
03
New subscriptions don’t save the card
“Stripe sets subscription.default_payment_method when a subscription payment succeeds.” Stripe, Create a subscription
When you create subscriptions, set payment_settings.save_default_payment_method to on_subscription. Stripe’s default is off, so a successful first payment doesn’t set the subscription’s default payment method on its own.
Checked against the vendor’s docs on : Stripe API: Create a subscription; Stripe API: The Customer object.
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
Related: Stripe subscription incomplete, requires action · Stripe card declined: generic decline · Stripe canceled, but app access is wrong · Stripe no such customer