I'm implementing subscription functionality using the Stripe Checkout Session API. During the checkout process, users are redirected to the Checkout Session page where they enter their payment method details.
Now, I want to enable users to change their payment method in the future, which would update the default payment method (stored in invoice_settings.default_payment_method).
For future subscription charges, I want to ensure that the updated default payment method is always used. So, my question is: will the subscription continue to use the payment method used during the original checkout session, or will it switch to the new default payment method?
Additionally, I would like to know if there is a way to configure the subscription to always use the default payment method, regardless of the payment method used during the initial checkout session.
When subscriptions are created in Checkout, the collected payment method is set as the default_payment_method
on the Subscription (API ref), so setting the customer invoice_settings[default_payment_method]
would not change the payment method used for the subscription. If you wanted a subscription with a specific default_payment_method
set to use the customer invoice default instead, you can clear the Subscription setting by sending an empty string:
curl --request POST \
--url https://api.stripe.com/v1/subscriptions/sub_12345 \
-u sk_test_123abc: \
--data default_payment_method=