-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You should not use waitUntil
, Stripe will wait for your webhook response before redirecting, removing the need for a success page that checks that Stripe already sent the webhook
#15
Comments
waitUntil
, Stripe will wait for your webhook response before redirecting, removing the need for a success page that checks that Stripe already sent the webhook
That's exactly what https://vercel.com/changelog/waituntil-is-now-available-for-vercel-functions |
If you use waituntil Stripe will redirect the user before you saved the subscription in your database |
That's what I think the overall strategy is to use the webhooks as a trigger to go check the Stripe API. This way, we don't have to rely on the data that comes from the webhooks. |
This is simply not truth. I just checked blocking all webhook responses (never responding to anything) and the checkout session redirects in the same way, so the Stripe docs seem to be wrong. I'm simply responding as soon as possible (since it has no effect) and saving the data in my db afterwards. |
How much time did it take to redirect? Maybe there is a timeout |
It redirects after it does whatever background job it has to do, no matter your response to any of the webhooks (you receive multiple webhooks while it's processing the checkout). |
From Stripe docs https://docs.stripe.com/checkout/fulfillment?payment-ui=stripe-hosted#redirect-hosted-checkout:
The text was updated successfully, but these errors were encountered: