#Naitik

1 messages · Page 1 of 1 (latest)

jolly jacinthBOT
smoky zenith
#

there are lots of caveats though(it only works if the card was added to the customer via Checkout in the first place) so it's more of a bonus feature, Checkout is primarily designed for accepting new details and you'd use different approaches if you explicitly want to charge an existing card

uneven frigate
#

You can see. email pre filled automatically for same customer id. but card dertails not pre filled

smoky zenith
#

yeah as I said, the feature is a bit weird and doesn't always work. What is the customer ID cus_xxx?

uneven frigate
#

cus_OQM3bbioqBMit5

smoky zenith
#

yeah, it's like I said then

#

it only works if the card was added to the customer via Checkout in the first place

#

here you added the card yourself manually (using the old and deprecated Token+Sources APIs) so it won't be prefilled inside Checkout

uneven frigate
#

what can I do?

#

any alternative solution?

smoky zenith
#

depends what problem you want to solve really

#

there's no real issue here, the customer can pay, they can enter their details again

#

if you specifically want to charge the existing saved cards, you can either change your approach so that you also use Checkout to save the card in the first place; or you can use a different approach like direct PaymentIntents to chage the exact card you want.

uneven frigate
#

My app flow is that.

first need to create customer with card details

and when click on pay button need to open stripe paymebnt link with default prefilled card details

smoky zenith
#

cool. That won't work though, you have to read what I wrote and try one of the other options

jolly jacinthBOT
uneven frigate
#

Hii, Another question I have.

Below screenshot total 2 cards.
1st one is added by manually
2nd is added by add card API

when I add manually "set up for future use" seeing but when I add using add card API not showing

smoky zenith
#

Because the card is not set up, because you added it using an API that doesn't do that. As I mentioned earlier, you're adding cards using the old and deprecated Token+Sources APIs. You should never do that. You should use our current guides and products like SetupIntents or Checkout in mode:"setup" https://stripe.com/docs/payments/save-and-reuse?platform=web

uneven frigate
#

oh okay

#

I want to save card details only
what's new approach?

#

I want to save card details using card element only