#Robin020
1 messages · Page 1 of 1 (latest)
hi! what exactly do you mean by loading the session? There's multiple parts involved there potentially(calling your backend server from the frontend, the backend calling our /v1/checkout/sessions API, then the redirect from the frontend to the CheckoutSession URL), so it really depends what part you mean and how much you've measured the actual individual parts.
I see
I had this problem last week, your colleague asked for a cs id
Is there any way you can check the Stripe side?
I can check some things with an ID yes
Where can I find the id?
it's in the URL for example (https://checkout.stripe.com/c/pay/cs_test_xxxxx ) ; or the id field of the CheckoutSession object from the API
sure. So for context I opened that page just now and it loaded immediately, and the API request that was used to create the Session(https://dashboard.stripe.com/logs/req_gWG6l7ZIJl64hV) eas executed in 0.6 seconds according to our logs. Where did you see 20 seconds exactly?
maybe, hard for me to say, I don't know what your code does beyond making that API call to us, and what exactly you see on your side/in your browser
Im hosting this code on Render.com
Frond end is in Google Firebase
I didnt expect that to deliver such a delay
My code only creates a checkout session
Customized with some parameters
have you added any logs or such to investigate what's happening? Like log the exact time you make the API call to stripe.checkout.sessions.create(...) and the exact time you return a 3xxx status to the frontend(if that is how you've implemented it).
I am logging when the CS is created
it seems to only take a lot time the first time
Like I need to wake up the server
I dont know if that is possible
What is the 3xxx status?
yep that's probably the issue
you should check the docs of your platform(this Render thing) about how to maybe have an always-on server or faster start up, lots of services like that will have cheaper tiers where the server is put to sleep when not active for a while