Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why aren't Stripe events firing and not being received by webhook?

I've tested my webhooks locally, using the CLI, and they work fine. However, when I took the webhooks live and deployed them to Heroku, and went into "live" mode on Stripe (which I assume is necessary to be able to use live webhooks), Stripe just doesn't fire events at all, they don't appear in the dashboard, webhook endpoint doesn't get any requests, nothing; for example, no account.updated when a I try to create a Connected account, or no checkout.session.complete when I try to complete a Checkout purchase. Is there a step I've perhaps missed when taking my webhooks online?

like image 406
Rafael Sofi-zada Avatar asked Oct 17 '25 03:10

Rafael Sofi-zada


2 Answers

If you're using Stripe Connect, webhooks won't fire if you selected the wrong type.

When you set up a new webhook, there's a radio button that asks whether it's for 'Account' or 'Connect':

enter image description here

I had correctly selected 'Connect' when I set up my 'test' webhooks, but I had accidentally selected 'Account' for the production ones, which is why they weren't firing at all.

So just double check that you correctly selected 'Connect' or 'Account'. I don't think there's a way to alter it on existing endpoints, so I just created identical new ones with the correct type and everything suddenly worked as expected.

enter image description here

like image 133
stevec Avatar answered Oct 19 '25 09:10

stevec


I ran into this issue myself- a few ideas:

  • Make sure you are configured correctly in the dashboard, eg. only flip the "Test Mode" switch if you are looking at test data
  • Make sure you have the endpoints set up for both live and testing. You have to add them each time
  • Double-check that you're using the correct signing secret. The signing secret will be differnt for live, production testing, and local testing, even if you're using the same endpoint.

For example:

  • [Production] Live - Endpoint = https://www.example.com/webhooks. Signing secret = xyz
  • [Production] Testing - Endpoint = https://www.example.com/webhooks. Signing secret = abc
  • [Local] Testing - Endpoint = localhost:5000/webhooks. Signing secret = efg
like image 32
Dr. Funkenstein Avatar answered Oct 19 '25 11:10

Dr. Funkenstein



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!