#ryanw
1 messages · Page 1 of 1 (latest)
Are you open to it being a Stripe-hosted solution, or do you want it to be a form embedded in your site?
Form embedded on our site
Gotcha. Probably the easiest way to do that is to just create your own expiration date field that the customer can input the new expiration date. When updating an existing payment method, that's the only card info you can change: https://stripe.com/docs/api/payment_methods/update#update_payment_method-card. The hosted solution would have been our customer portal: https://stripe.com/docs/customer-management
Got it, thank you. We are also considering the route where we account for any type of updates by just setting up a brand new payment method using a SetupIntent/PaymentElement. And regardless of if the user is changing just the expiry date, or something more like the card number itself, we will always create a new method, and delete the old one once the new one's been confirmed. Does that sound like a reasonable approach?
Yeah that's a totally fine approach
If the payment method is tied to subscriptions, you'll need to make updates there too though
I see. Yes this would be tied to subscriptions as well. What are the updates we'd need to make? Set the default_payment_method on the subscription? Anything else to update?
Or anything on the customer to update as well?
Yeah just default_payment_method and anywhere in your database you keep track of that
SetupIntents are the way to go for that
Okay, makes sense. And do we need to update customer.invoice_settings.default_payment_method as well? Or will that happen automatically somewhere
That's the customer's default value. You could just set that. However, setting default_payment_method on the subscription will override that value: 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.
Ah, I see. Nice
And to set these default payment method values, should it be done in reaction to a setup_intent.succeeded event? Or is there another recommended way?
setup_intent.succeeded would probably be the best place to set these default values. That is the event that is most directly relevant to the setup of that payment method succeeding
Okay, sounds great. Thank you both for the insight