#ryanw

1 messages · Page 1 of 1 (latest)

grizzled fableBOT
urban hare
#

Are you open to it being a Stripe-hosted solution, or do you want it to be a form embedded in your site?

sour atlas
#

Form embedded on our site

urban hare
#

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

Manage your customers’ relationship with your business

sour atlas
#

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?

urban hare
#

Yeah that's a totally fine approach

#

If the payment method is tied to subscriptions, you'll need to make updates there too though

sour atlas
#

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?

urban hare
#

Yeah just default_payment_method and anywhere in your database you keep track of that

#

SetupIntents are the way to go for that

sour atlas
#

Okay, makes sense. And do we need to update customer.invoice_settings.default_payment_method as well? Or will that happen automatically somewhere

urban hare
sour atlas
#

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?

inland sable
#

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

sour atlas
#

Okay, sounds great. Thank you both for the insight