Stripe Webhook
-
Hi the webhook keeps on being disconnected.
I tried re-configuring connection and reconnecting the stripe account multiple times. Webhook keeps on being disconnected.
Can you explain why this is happening.
The page I need help with: [log in to see the link]
-
Hi @davidecho, thanks for reaching out, I can see how frustrating it is to have the Stripe webhook repeatedly disconnect even after reconnecting, let’s work through what might be causing this.
In most cases, a webhook getting disconnected is usually due to one of the following:
- The webhook endpoint URL becoming inaccessible, for example due to firewall, security plugins, or server restrictions blocking incoming requests from Stripe
- A mismatch or reset of the webhook signing secret after reconnection
- The site returning non-200 responses to Stripe, which causes Stripe to disable the endpoint after repeated failures
- Caching or security layers interfering with the
/wc-api/WC_Stripeendpoint
To move forward, please check the following:
- Go to your Stripe Dashboard → Developers → Webhooks and confirm if the endpoint is being disabled there and if there are any delivery errors logged
- Review your WooCommerce → Status → Logs and look for Stripe-related logs around the time the webhook disconnects
- Ensure your site is publicly accessible and not blocking Stripe IPs or requests
- Temporarily disable any security or firewall plugins, or server-level protections, and test again
- Confirm there are no caching rules applied to the webhook endpoint
You can also follow this guide for a full walkthrough on webhook setup and troubleshooting: https://woocommerce.com/document/stripe/setup-and-configuration/stripe-webhooks/
If the issue persists, please share your System Status Report via https://pastebin.com or https://gist.github.com and any relevant Stripe webhook error logs. That will help us take a closer look.
Looking forward to your findings so we can narrow this down further.
Quick note, when trying to access the website I get Cloudflare’s “Sorry, you have been blocked”. I’m located in Morocco.
Hi there!
I checked your site, and when trying to access it, I’m getting a Cloudflare “Sorry, you have been blocked” message. This indicates that Cloudflare is restricting access to certain requests.
This can also affect Stripe webhooks, as Stripe needs to reach your site endpoint. If Cloudflare is blocking those incoming requests, the webhook may fail or get disconnected repeatedly.
I recommend:
- Checking your Cloudflare firewall/security settings
- Whitelisting Stripe’s IP addresses or webhook requests
- Temporarily lowering the security level or disabling rules to test
Once Cloudflare allows those requests, the webhook connection should remain stable.
Let us know how it goes.
Hi @shahzeenfarooq ,
The security rules I have on Cloudflare are the following:
- Verified Bots throttle
- Block access outside Europe and US
Does these have a part on blocking Stripe webhooks?
Hi there!
Thank you for update.
Yes, those Cloudflare rules can definitely affect Stripe webhooks.How your two rules impact Stripe
- Verified Bots throttle
Stripe’s webhook deliveries are regular HTTPS requests from Stripe’s servers, not “verified bots” like search engines.
If this rule aggressively throttles or challenges requests, Stripe’s webhook calls may be slowed, rate‑limited, or blocked, causing Stripe to eventually disable the endpoint after repeated failures. - Block access outside Europe and US
Stripe’s webhook IPs are not guaranteed to come only from Europe and the US, and Cloudflare does not treat Stripe as a special case.
If any of Stripe’s webhook servers are located in regions you are blocking, Cloudflare will return an error instead of passing the request to your site, which can cause the webhook to disconnect
To confirm if this is the cause, I would suggest temporarily disabling this rule as a test. Then try triggering a Stripe webhook again (for example by placing a test order or retrying a failed webhook).
If the issue persists, please enable the Stripe error log by going to WooCommerce > Payments > Stripe > Settings, scroll down to the Advanced tab, and check the Error Log option.
Then, go to WooCommerce > Status > Logs, open the log file related to Stripe payments, copy the error log.
Please use https://pastebin.com/ or https://gist.github.com/ and share a link to that paste in reply here. Once we have more information, we’ll be able to assist you further.
Hi I followed your advise.
Please see here the stripe error logs – https://gist.github.com/davidechoweb/33b08a72461e01943590ef7afd0450de
Hi there!
Thank you for sharing the log. I have reviewed it, and everything appears normal in these logs. However, it looks like you are not using the latest version of the Stripe plugin. Could you please update the Stripe plugin to the latest version (10.7.0) and check whether you still face the same issue?
Also could you please share the System Status Report which you can find via WooCommerce > Status.Please use https://pastebin.com/ or https://gist.github.com/ and share a link to that paste in reply here. Once we have more information, we’ll be able to assist you further.
Hi @davidecho,
Thanks for sharing the system report. I also look a look at the logs. There are a few things here that are very likely working together to cause the repeated webhook disconnections, and I want to walk through them in order of priority.
- This is the most probable root cause. A community member noted on this thread that your site returns a Cloudflare “Sorry, you have been blocked” error. If Cloudflare’s WAF or Bot Fight Mode is active, it may be blocking the POST requests Stripe sends to your webhook endpoint. When Stripe can’t deliver webhooks and gets repeated failures, it disables the endpoint, which is exactly what you’re seeing. To fix this, you’ll need to either whitelist Stripe’s IP ranges in your Cloudflare firewall rules, or create a firewall exception for the
/?wc-api=wc_stripeendpoint so Cloudflare doesn’t inspect or block those requests. - Each time you’ve reconnected the Stripe account, a new webhook endpoint is likely being created in Stripe without the old ones being removed. This creates a loop: the old orphaned webhooks keep firing with an invalid secret, Stripe sees repeated failures and disables the endpoint, and reconnecting starts the cycle again. Please go to your Stripe Dashboard → Developers → Webhooks and check how many endpoints are listed for your site URL. You should only have one. Delete any duplicates, then reconnect once cleanly.
- You’re currently on version 10.6.1. A more recent release includes a fix specifically described as “Remove redundant secret management logic when configuring webhooks” which is directly relevant to what you’re experiencing. Please update the plugin before reconnecting.
- Your system report shows 39 WooCommerce template overrides in your theme, many of them significantly out of date, including your checkout and cart templates. While not directly causing the webhook disconnect, outdated templates can cause unexpected errors during checkout, which in turn generate non-200 responses to Stripe, contributing to webhook delivery failures. These should be reviewed and updated by a developer familiar with your theme.
I hope that helps. Let us know if you need anything else.
You must be logged in to reply to this topic.