#mauriver21

1 messages ยท Page 1 of 1 (latest)

dry pawnBOT
rugged moss
#

Hello ๐Ÿ‘‹
Is there a guide you're following for this?

#

OR are you just attempting based on the SDK ref?

potent sky
#

I need to capture the card number from a credit card element

#

But I'vent found the right flow reading the docs

rugged moss
#

Gotcha. What's your end goal here?
Are you collecting card information to charge it OR just allow customers to update their payment methods?

potent sky
#

second one "just allow customers to update their payment methods"

rugged moss
#

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

potent sky
#

The payment method was collected initially by a setup intent

rugged moss
#

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

potent sky
#

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?

rugged moss
#

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

potent sky
#

Thxs for the clarification, I was thinking that it put in a black list previous detached credit cards

rugged moss
#

Nope! ๐Ÿ™‚ the card can still be used as long as you create a new PaymentMethod object for it

potent sky
#

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?

rugged moss
#

Yes, you would need to create a new SetupIntent. They are single-use.

potent sky
#

Thxs, I got the flow working, you were very helpful ๐Ÿ™‚

rugged moss
#

Awesome! Glad I could help ๐Ÿ™‚