#mauriver21
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Is there a guide you're following for this?
OR are you just attempting based on the SDK ref?
I'vent found a guide yet really, the only thing that gave me a clue was this
https://stripe.com/docs/js/tokens_sources/create_token
I need to capture the card number from a credit card element
But I'vent found the right flow reading the docs
Gotcha. What's your end goal here?
Are you collecting card information to charge it OR just allow customers to update their payment methods?
second one "just allow customers to update their payment methods"
I see. Can you provide more information on how you're collecting the payment methods in the first place?
I ask because the flow you're currently using creates a token which is separate from creating a PaymentMethod object
The payment method was collected initially by a setup intent
I see. I don't think our API support updating the number for an existing PaymentMethod. So you'd likely need to create a new PaymentMethod using the SetupIntent API and detach the previous/existing PaymentMethod
I was thinking on this solution, however I'm not sure how this works. I read that if you detach the previous payment method you can't again attach it. What that means? that the user can't re-use a previous entered credit card?
They can use the credit card but you'd need to create a new PaymentMethod object for it. You can't re-use the same pm_xxxx object
Thxs for the clarification, I was thinking that it put in a black list previous detached credit cards
Nope! ๐ the card can still be used as long as you create a new PaymentMethod object for it
Another question, for this I will need to create another setup intent instead of using the existing setup intent used for storing the payment method by first time?
Yes, you would need to create a new SetupIntent. They are single-use.
Thxs, I got the flow working, you were very helpful ๐
Awesome! Glad I could help ๐