#Niek
1 messages · Page 1 of 1 (latest)
Correct. You cannot use the source objects in conjunction with Payment Intents and 3DS. You should instead create the Payment Method either before getting to the confirmCardSetup() step, or by passing in a Stripe Card element (see here: https://stripe.com/docs/js/elements_object/create_element?type=card) to confirmCardSetup() in order to create the Payment Method during that step (see here: https://stripe.com/docs/js/setup_intents/confirm_card_setup#stripe_confirm_card_setup-with_element)
Here's a tutorial that shows that process from start to finish (in case you hadn't come across it yet): https://stripe.com/docs/payments/card-element
Thanks @obtuse kestrel I'm half way migrating my subscription process from tokens to setup intents. But my question was actually how to deal with already existing cstomers, those that were created using the old tokens. They still have the default_source field populated, while the new customers, created using the new setup intents flow will have the invoice_settings field populated. I would expect that in the end they would only be one filed for the default payment method, whether created by the tokens or the setup intents.
👋 stepping in as two-shoes needs to step away.
So then the question comes up if I should update my existign customers and move the card from the defaullt_source to the invoice_settings.dedault_payment_method field
It will be difficult to maintain anyway if there are two different places to get the payment method
You wouldn't change anything about your current customers
Ok, and what if a ustomer that was created in the past using a token wants to change his card (eg because his old card has expired). I would update the customer and set the invoice_settings.default_payment_method field, right? I guess I should then also empty the default_source field
Hmm actually maybe I'm misremembering that and you can actually set Cards as the invoice_settings.default_payment_method. Sorry, one sec let me double check.
ok no prob
Okay yeah my bad. You can set a card as the invoice_settings.default_payment_method and that setting will take precedence over the customer's default_source
So if you want to shift everything over to invoice_settings.default_payment_method then that will work fine
ok perfect thanks for this confirmation. I assume that I will have to d othis migration myself? There is no magic button in Stripe that can do this automatically, right?
Correct