#ying-wang_api
1 messages ยท Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- ying-wang_webhooks, 3 days ago, 18 messages
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1216962467507212348
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! why do you need to expand the data in the Checkout Session? You can list the payment methods on a customer with https://docs.stripe.com/api/payment_methods/customer_list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I am trying to find the cards from all open Checkout sessions
will list payment methods returns cards from open checkou sessions as well?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
when you make list call, you can set parameter status="open"
why do you want to find PaymentMethods on an open Checkout Session? You are using Checkout Sessions to setup PaymentMethods for future use. If the Checkout Session is still open, nothing has been processed yet, and there will be no Payment Method created
we run into a race condition issue when we create mulitple checkout session around the same time, and therefore create mulitple payment methods
i still don't understand how that is related to the issue you're trying to solve here? Can you explain more about the race condition?
let me ask the question this way, if checkout.setup_intent.payment_method is set, can we assume the payment method added via this checkout is already created successfully, right?
if checkout.setup_intent.payment_method is missing, which means it is still processing?
then if there exist an "processing" checkout without payment method populated, we want to wait for it and not allow customer to create another checkout and add another payment method,
if checkout.setup_intent.payment_method is set, can we assume the payment method added via this checkout is already created successfully, right?
Yes
if checkout.setup_intent.payment_method is missing, which means it is still processing?
This is not true! If the Checkout Session is expired, this setup intent will not be processed. I'd recommend using List Checkout Session API withstatus=opento check the Checkout Session that is still processing
No problem! Happy to help ๐
one follow up question, for those payment method ID returned from list checkout session, they will be returned as part of list payment methods API as well right?
If customer is set in Checkout Session creation, then yes - the list of payment methods will be returned List Payment Methods API with this specific customer
got it got it, thanks!