#Humayun - update subscription credit card
1 messages · Page 1 of 1 (latest)
Once you have collected the CC info in to a PaymentMethod object, you can make the update subscription call and pass it in as the default_payment_method parameter https://stripe.com/docs/api/subscriptions/update#update_subscription-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So basically I start with Elements object that will return the payment method id. Use this payment method id and pass it to update subscription.
Do I need a setup intent? or that has nothing to do with this process
A SetupIntent will likely be helpful in collecting the CC info
ok got it. I will look into this.
thank you for quick help Pompey!
Of course. Also you may find this guide useful for collecting the payment method info in React https://stripe.com/docs/payments/save-and-reuse?platform=web&html-or-react=react
got it. thank you