-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Stripe webhooks failing (status 400) #356
Comments
I'm seeing the same thing |
FYI I only found this to be an issue if you haven't set up your customer portal in Stripe before attempting to open customer portal. Once I did that, then subscribed, then open customer portal, no event errors. |
Yeah, there are some server actions that handle the customer portal instead. Also the customer portal is not in the relevant events. Mainly I am asking is because i feel it does not make any sense to throw errors for those event. It is very hard to spot any real errors when ~90% of the non relevant events throws errors for no reason. |
I'm also having this issue, please let me know if anyone figures it out |
Same thing here. Customer events aren't handled in the example Updating email or name with the /account forms causes a de-sync between supabase and stripe |
Also facing this exact issue |
Same, for someone who is unfamiliar with Stripe I'm not sure what the correct approach is here. |
At the end I have done this:
I have changed the status code to 2## to avoid it falling into the "error" category and chose a random 69 number to identify the hooks in the future. |
Hi,
I am using this template, followed the guide and added a Stripe webhook with all events being sent to /api/webhooks on my install.
When users on the site take certain actions that are NOT on the list of relevantEvents they trigger the /api/webhooks endpoint. All of the NON relevantEvents return status 400 (error) because they are "Unsupported event type".
Events that I have seen that return errors:
customer.created
billing_portal.session.created
balance.available
setup_intent.canceled
payment_intent.payment_failed
checkout.session.expired
invoice.finalized
invoice.payment_failed
charge.failed
payment_intent.created
checkout.session.expired
Code:
File: route.ts
Why are the non relevant events returned as an error? Those events are retried multiple times by Stripe. Should not they return a 200 response instead?
The text was updated successfully, but these errors were encountered: