#ying-wang_api

1 messages ยท Page 1 of 1 (latest)

slender oarBOT
open troutBOT
#

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.

slender oarBOT
#

๐Ÿ‘‹ 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.

open troutBOT
wary glen
tawdry citrus
#

I am trying to find the cards from all open Checkout sessions

#

will list payment methods returns cards from open checkou sessions as well?

wary glen
#

what do you mean by "open" Checkout Sessions?

#

what are "open" Checkout Sessions?

tawdry citrus
#

when you make list call, you can set parameter status="open"

wary glen
#

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

tawdry citrus
#

we run into a race condition issue when we create mulitple checkout session around the same time, and therefore create mulitple payment methods

wary glen
#

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?

tawdry citrus
#

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,

open troutBOT
twilit wave
#

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 with status=open to check the Checkout Session that is still processing

tawdry citrus
#

I see, got it

#

thanks for clarification, let me give it a try, thanks!

twilit wave
#

No problem! Happy to help ๐Ÿ˜„

tawdry citrus
#

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?

twilit wave
#

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

tawdry citrus
#

got it got it, thanks!