#akos_error

1 messages ยท Page 1 of 1 (latest)

jovial lakeBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

hot zenith
#
import stripe
from asyncio import run

client = stripe.StripeClient(os.getenv("STRIPE"))

async def main():
    session = await client.v1.checkout.sessions.retrieve_async("cs_live_b12KiG98jLY02eGdokZpW9y4yWCA79iC8VY4ib2nmjEPhoNZFOYxdML9yi")

run(main())
#
stripe._error.InvalidRequestError: Request req_I1MJB6cfywN6zu: No such checkout.session: cs_live_b12KiG98jLY02eGdokZpW9y4yWCA79iC8VY4ib2nmjEPhoNZFOYxdML9yi
teal kayak
#

๐Ÿ‘‹ Hi there! Let me take a look

#

It looks like the Checkout Session belongs to the account acct_1PgCVlEWE0J4C6cm, but you made this request using a key that belongs to the account acct_1RqEsXI9q63ANwis

hot zenith
#

Uhh, yeah that might be it. Thanks!

#

Quick question regarding sessions

#

Whats the best way to find an expired checkout session based on its client_reference_id?

teal kayak
hot zenith
#

Thats my current implementation, however the python SDK limits the returned results to 100. I've had an issue with prod where it failed to find a checkout session due to this.

#

Is this an SDK limitation or an API one?

teal kayak
#

The limit is 100 results at a time, but you can iterate through all results

hot zenith