#fatematzuhora
1 messages · Page 1 of 1 (latest)
You may follow this guide to upgrade the subscription: https://stripe.com/docs/billing/subscriptions/upgrade-downgrade
In the same request to upgrade the subscription, default_payment_method can be set to the new payment method ID: https://stripe.com/docs/api/subscriptions/update#update_subscription-default_payment_method
where do I get the new payment method ID?
I want to setup the new payment method ID and the upgrade the subscription together
List Customer's Payment Methods API can be used to get the payment methods that have been attached to the customer (if the new payment method has been set up): https://stripe.com/docs/api/payment_methods/customer_list
In the same upgrade request, default_payment_method can be set to new payment method ID.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It will be completely a new payment method, not exist in the payment method list
I see! In this case, it will be a two-step process:
- Use Setup Intent to collect new payment method: https://stripe.com/docs/payments/save-and-reuse?platform=web&ui=elements
- Upgrade the subscription and set the new payment method ID created from Step 1 to
default_payment_methodin the Update Subscription API: https://stripe.com/docs/api/subscriptions/update#update_subscription-default_payment_method
Is there any other way?
I don't want to use setup intent
Alternatively, you can use Customer portal to let customer manage the payment methods on their own: https://stripe.com/docs/customer-management
All right, thanks