stripe webhook errors
-
Hi there,
Are there any changes regarding webhooks with woocommerce 4.1 update could be affecting your plug-in?
Asking hence i have been getting webhook errors (http status code: 400 (bad request) since 14th May.
Thanks
Tunc
-
Funny i ended up removing webhook secret key in stripe plug-in configuration as described on following support ticket and it started to work again (http status code:200 now).
I think you guys need to have a deeper look at this and find out what’s going on, cos it does not make sense.
https://www.ads-software.com/support/topic/stripes-latest-api-webhook-failing/
Thanks
TuncHi @tgunergun
Thanks for replying and linking back to the previous discussion.
As mentioned in that thread, the customer advised this may be due to a conflict with another webhook – are you using any other integration which uses the webhook secret?
I haven’t been able to replicate this error so I’d love to know more about how this happened to help us narrow down any problem with our integration.
Thanks,
Hi @dougaitken
Thanks for your prompt reply, i do not have any other plug-in or code that uses web hooks, not sure why they are failing since May 14, 2020 at 10:52AM either…
Btw, when will you upgrade your plug-in to use 2020-03-02 version of stripe API?Thanks
Hey @tgunergun
Do you remember anything changing on your site around that time – May 14, 2020 at 10:52AM – any plugin or extension updates, changes to security services?
Btw, when will you upgrade your plug-in to use 2020-03-02 version of stripe API?
I’ve created an issue to have the developers look into this. Taking a read through the changelog though, I don’t see any updates that impact our extension. To confirm, I’ve opened a GitHub issue around this – https://github.com/woocommerce/woocommerce-gateway-stripe/issues/1207
Thanks,
Hi @dougaitken
No changes in security settings but following events occurred from 13th May onward.
Btw, none of these plug-ins have webhook support (except woo, it’s disabled) or all of their Rest-API functions are disabled.13th May
Woocommerce 4.1 (upgrade)
Woocommerce Product Add-Ons (upgrade, but deactivated straight away)
Yoast SEO (upgrade)14th May
Order received via stripe
Contact From 7 (upgrade)
Anti-Spam by Cleantalk (upgrade)17th May
web hook errors reported from stripe (17 times since May 14, 2020 at 10:52AM)Thanks for creating a ticket for API update. It would nice to have your end matches stripe version. As of now, your extension uses 85% of old API and 15% New API (post/sources mostly) of stripe.
Thanks
-
This reply was modified 4 years, 9 months ago by
tgunergun.
Hi again @tgunergun
14th May
Order received via stripe
Contact From 7 (upgrade)
Anti-Spam by Cleantalk (upgrade)17th May
web hook errors reported from stripe (17 times since May 14, 2020 at 10:52AM)Are you able to pinpoint the time of that Anti-Spam by Cleantalk upgrade? I know some sites have had trouble with the Yoast update as well but unsure if that would be related.
One other thing to check – can you see when your API keys were generated?
You can look on this page – https://dashboard.stripe.com/apikeys – if they are older than a year, I’d recommend rolling the keys and updating via your Stripe payment gateway settings.You mentioned also that removing the Webhook secret resolved this – when did you add the secret?
Thanks,
@dougaitken I upgraded to v4.4.0, disabled Anti-Spam and Yoast plug-ins and retested, sadly result is the same, webhooks do fail, if i use “webhook secret” in stripe plug-in configuration. Regarding API keys, i recently started to use stripe so key is about 2 months old. Could you advise where else i can look further to troubleshoot?
Thanks
Hi @tgunergun
Can I ask what event types you have listed via **Webhooks > Endpoints > your site URL**?
If you have
All events
please delete this then re-add only those that are needed:payment_intent.amount_capturable_updated payment_intent.payment_failed payment_intent.succeeded review.closed review.opened source.canceled source.chargeable charge.refunded charge.dispute.created charge.succeeded charge.failed charge.captured
https://docs.woocommerce.com/document/stripe/#section-3
Let me know how you get on!
Thanks,
@dougaitken same problem, that was my initial configuration anyway, to only send selected webhooks, then i deleted/re-created webhook configuration with all events.
Btw, it should not make any difference as each order it usually generates about 5 webhooks.
Thanks
Hi All. We are also having 100% webhook failure. This is a new woo-commerce installation, (may 17, 2020), all plugins up-to-date.
Here is a summary of the chat I had with stripe support…Me. Hello. Our webhook is constantly failing, possibly because of an older API version? How do we update the version?
Support. So had a look and the webhooks are failing because of the API version. Looks basically like the endpoint, in this case the woocommerce server, is rejecting the webhooks directly due to a format issue. The format itself is incorrect basically. What might need to happen is that the WooCommerce side might need a specific API version of Stripe to configure them. You are on the most up to date version which is 2020-03-02
Me. All plugins up-to-date, and we use this: https://www.ads-software.com/plugins/woocommerce-gateway-stripe/
Support. Checked your first link there and it doesn’t actually specify the API version that they need or use. Either way its what’s causing your webhooks to fail here
Me. the transactions seem to be going thru ok. so maybe i should just disable the hook for now. This would stop the notifications. and maybe when the plugin is fixed i can re-anable. What do you think?
Support. I get you, yeah there seems to be no issue with your payments from what I can see here. The payments that I can see in the Dashboard all look good from here. It would stop the notifications alright definitely and it would depend on if you were okay with that. But it doesn’t seem to be affecting the incoming payments at all.
Hey @tgunergun
To confirm – removing the Webhook secret makes this work for you again. You are on the latest version of all plugins, and this happened for all purchases?
Can you let me know if this happens in Test Mode as well?
@davemspan Is your scenario the same since you have commented on this thread – if you remove the webhook secret, this will work as expected?
Thanks,
@dougaitken yes, that is correct and all my plug-ins are latest. As said before it started to happen for all purchases after 14th may. It’s very easy to test, go to Stripe Dashboard -> Developers -> Webhooks -> URL x, pick any webhook attempt (whether it failed or succeeded) and resend. They always fail if websecret is defined in your plug-in configuration, they succeed if no websecret is defined in your plug-in.
I’ll have a look at the test mode in the evening and report later, it’s a production site.
Thanks
Hey @tgunergun
Thanks for letting me know your full scenario here – I haven’t been able to replicate this at all – with and without the Webhook secret being included in the WooCommerce Stripe payment gateway settings.
Is Stripe able to provide any other details from the webhook event log about the cause for this?
Thanks,
@dougaitken not much really, you only get following.
HTTP status code
400 (Bad Request)Failed
charge.refunded
evt_1Gjm1cFThcBwS9ZV0WqCxG6L
22 May, 19:05
12 days ago+body message that i will not share here.
Please run your tests in production mode btw and let me know.
Thanks
Thanks
Hi @tgunergun
So I have managed to replicate this under a specific set of steps:
If the Stripe.com account view and the Stripe payment gateway don’t match then the webhook will fail.
example:
A test webhook will fail if the site is in live mode, and vice versa. A live webhook will fail if the site is in Test mode.
I haven’t been able to fail a webhook when the site and the webhook event are the same “mode” – i.e. both are live or both are test – in these scenarios, the webhook event will succeed.
Does that match what you’re seeing or are your live events failing when the site is in Live Mode?
Thanks,
-
This reply was modified 4 years, 9 months ago by
- The topic ‘stripe webhook errors’ is closed to new replies.