#abhinandkaippalli01_webhooks

1 messages · Page 1 of 1 (latest)

hollow rampartBOT
#

đź‘‹ 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/1433844144756887552

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

swift orchid
#

Hi, you said 'it consistently takes around 4–6 seconds before the payment is marked as “successful” and the success page is shown.' and then you said 'I have already verified that the frontend triggers the Stripe payment immediately after clicking the “Pay” button.' which to me, it's at different steps. Can you confirm where you exactly notice this?

vapid briar
#

I first create the checkout session using the following code:

const session = await stripeTest.checkout.sessions.create({
line_items: lineItems,
mode: 'payment',
success_url: ${process.env.STRIPE_SUCCESS_REDIRECT_URL}?session_id={CHECKOUT_SESSION_ID},
cancel_url: ${process.env.STRIPE_CANCEL_REDIRECT_URL}?type=cancelled,
metadata: {
customerId: userId,
orderId: orderId,
},
})

After that, the Stripe checkout screen appears. When I click the Pay button, the payment starts processing — this is where there’s a delay of around 4–6 seconds while it shows “Processing.” Once that completes, it redirects to the success screen.

eager latch
#

đź‘‹ shift change, I'll be taking over the thread, just reading through and getting caught up.

#

Is this new behavior you weren't seeing prior?

vapid briar
#

Thanks! No, this delay has been happening consistently; it’s not new for me.

eager latch
#

I'm not currently seeing reports of performance degradation at the moment for what it's worth.

vapid briar
#

Understood, thanks for confirming. The delay consistently occurs after clicking the “Pay” button on the Stripe Checkout page — it shows “Processing” for about 4–6 seconds before redirecting to the success URL. Could this delay be related to how Checkout finalizes the payment or webhook confirmation timing?

eager latch
#

I know this can vary a bit with traffic. Some of that delay comes from the gateway conversation we have with the issuer. If you have a webhook endpoint listening for Checkout.session.completed there is also some delay while we wait to get a response back from your server.

vapid briar
#

Thanks for clarifying that. Yes, I do have a webhook listening for checkout.session.completed where I update the database and send confirmation emails. That might be contributing to the delay. I’ll review the webhook processing time and optimize it to see if it reduces the lag after clicking “Pay.”