#toxiCity
1 messages · Page 1 of 1 (latest)
I have a page displaying registered card details (payment methods) for customers. I want to support changing the card used.
Are you using Invoices/Subscriptions?
I am using setup intents
And charging later via PaymentIntents?
No, my client bills them directly using the stripe app
You mean via the Dashboard?
Well when you charge via the Dashboard you select which attached PaymentMethod you want to charge
Are you saying you only want to have one PaymentMethod attached to a Customer?
yes
Okay then you want to detach the previously attached PaymentMethod when you add a new one using https://stripe.com/docs/api/payment_methods/detach
Should just be the same way you are collecting them currently, no?
Like whenever you confirm a SetupIntent using Payment Element then a new PaymentMethod will be created
ok so I have to create a new setupIntent is that correct?
Yep you just have the customer go back through the same flow that they you used to add the initial card
But you pass the same Customer ID
Instead of a new one
ok got it