integrallis / stripe_event

Stripe webhook integration for Rails applications.
https://rubygems.org/gems/stripe_event
MIT License
844 stars 104 forks source link

No signatures found matching the expected signature for payload #128

Closed mulaiko closed 4 years ago

mulaiko commented 4 years ago

Hi there,

Just installed your gem, subscribed to a 'checkout.session.completed' event. I'm receiving the following error "No signatures found matching the expected signature for payload" when the event is fired.

Any pointers on resolving this?

mulaiko commented 4 years ago

Found the issue:

I used the signing secret from the Stripe CLI which was different from the one issue in the dashboard. The dashboard signing secret was the correct one to use.

Cheers!

vakrolme commented 4 years ago

I ran into this exception in dev environment, and the cause turned out to be that with stripe-cli you gotta relogin every 90 days as mentioned here. When you do that, a new whsec_ key is generated, which you gotta extract (it prints to stdout when you run stripe listen) and update your .env (or wherever you get StripeEvent.signing_secrets from).