#Naitik
1 messages · Page 1 of 1 (latest)
for the most part, if you use the same customer ID then the details are used, see the docs at https://stripe.com/docs/api/checkout/sessions/create?lang=node#create_checkout_session-customer
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
You can see. email pre filled automatically for same customer id. but card dertails not pre filled
yeah as I said, the feature is a bit weird and doesn't always work. What is the customer ID cus_xxx?
cus_OQM3bbioqBMit5
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
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.
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
cool. That won't work though, you have to read what I wrote and try one of the other options
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
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