#xiaowo_api
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1293150637391089699
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
Yes, you can update the PaymentMethod at any time. How do you want the customer experience to look like exactly?
Can you please send me the link to the document for modifying the bank card number By update the paymentMethod?
There's many ways to do this. How are you currently creating the Subscription?
One of the no-/low-code approaches is using Customer Portal: https://docs.stripe.com/customer-management
this is the currenty way save the bank number when create the subscription
we may prefer to use code ways to help user to modify the card number
Alternatively, you can save the new PaymentMethod with a SetupIntent: https://docs.stripe.com/payments/save-and-reuse?platform=web&ui=elements
Then you can use the PaymentMethod and update it on the Subscription object: https://docs.stripe.com/api/subscriptions/update#update_subscription-default_payment_method
hi, In practical applications, modifying bank cards is actually a relatively rare scenario, so I actually prefer not to modify existing subscription related codes. May I ask if there are any other ways for me to modify the user's bank card?
Of course, if this method does not exist. I will also redesign according to your suggestion above
Stripe will use the Subscription.default_payment_method, and if it's not available Customer.invoice_settings.default_payment_method.
So if Subscription.default_payment_method is not present, you can jut modify the Customer object. But, if default_payment_method is present on Subscription, updating the Customer object will not have any effect.
Overall, I would recommend updating the Subscription object directly.
did i update the Subscription.payment_settings.payment_method_options.card feild
?
I suddenly understand!!! Are you suggesting that I follow these two steps to complete the modification?
Yes
thanks very very much, I will carefully read the document first to see how to implement my requirements