#skandaaryal_29085
1 messages · Page 1 of 1 (latest)
it would be even better if we could list all of the cards we saved using setup intent here
Hi there, I'm struggling to understand this use case. Why do you want to show list of saved cards in a setup flow?
so that user can choose among the cards he had saved previously during checkout
So you want to pre-fill the payment mode checkout page with previously used payment method for your return customers, am I right?
also when a new card is saved, the latest one overrides the previous one now! we need to allow the user to choose his default card (from our UI) and stripe should reflect that card during checkout
i have disabled link as need to handle it only through stripe
You can refill the payment method if you specify a customer. https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer refer to the API reference for more details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
how can I achieve this?
i mean in the screenshot attached
I've already shared you the API reference, have you got a chance to try it out yourself?
why?
@open charm we need to make a certain card default from the UI! something like this! and the chosen one should appear during the checkout as in this screenshot! this is the only requirement for now please ignore every other things
I've already answered your question and recommended a solution, and it's entirely up you whether to take my advice or not.
this doesn't work @open charm as I have already passed the customer too! it's not about customer,
What's the customer session ID?
Btw there's no need to tag me on every message that you type
cus_Oa2hDIY9pRUYti
No, it's a customer ID, I want to see the ID of checkout session that you created
I can see the payment method is already pre-filled
yeah it's always latest setup intent! even when there are multiple intents!
we need user to be able to choose from a variety of cards here
and it should be reflected in the screenshot you shared
That's the expected behaviour, the Checkout page will only use the last used payment method.
The solution here is to use Link https://stripe.com/docs/payments/link
So that your customer can choose a payment method from Link
yeah! but we need to manage it ourselves 😦
we need to make a certain pament method default from our UI
and it should be shown during checkout
Then I'm afraid this kind of customization is not available in Checkout
what is the source of Pay With.. in the screenshot you shared?
we can save multiple cards in stripe
but the latest saved is always shown over there
just need to change which one of the saved to show there
Yup, as I explained, that's the behaivour of checkout page
thank you Jack for your help