#littleape - update CC info

1 messages · Page 1 of 1 (latest)

real sierra
#

What info are you looking to let them update for the card?

frozen mulch
#

Basically everything, from simply the expiry to totally providing a new card. Tried just doing another SetupIntent confirmation but that fails since its already confirmed

#

I can't find any info in the docs for Stripe.js related to updating existing info of a customer.

#

Do I need to create a new SetupIntent on server side with the same customer email and use that for new card?

real sierra
#

For a new card, you will want to make a new SetupIntent

#

Correct

frozen mulch
#

Ahh ok

real sierra
#

There are some details that you can update otherwise but for an entirely new card you will want to do that

frozen mulch
#

If it's only expiry that I want to change is there a way to do that directly through Stripe.js on client side?

real sierra
#

Good question, I think you might also need to create a new SetupIntent for that and make sure to pass the old intent's ID in to the payment_method parameter when creating it.

#

Though I'm not sure what the Stripe.js confirm call would look like here.

#

Are you using the Payment Element or are you using the separate card number and expiry elements?

frozen mulch
#

Payment Element generated by stripe.js

real sierra
#

Gotcha. Unfortunately I don't think that that element can only show the expiry field. Trying to find what we recommend here and will get back to you