Skip to content
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

[13.x] Fix async issue with webhooks #1227

Merged
merged 3 commits into from
Aug 3, 2021
Merged

[13.x] Fix async issue with webhooks #1227

merged 3 commits into from
Aug 3, 2021

Conversation

driesvints
Copy link
Member

This PR fixes an async issue with webhooks. When using a checkout session, a susbcription created and subscription updated event are sent by Stripe. Because Stripe handles the checkout session so fast, these are sent at almost the exact same time. This can cause the updated event to arrive before the created event. By delaying the updating event by one second, we give ample time for the created webhook to be handled first. This solution was suggested by a community member who tried it out in their production app and hasn't experienced the issue ever since.

Fixes #1201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Order of webhooks from Stripe may not be consistent causing subscription to be in incorrect state
2 participants