nextjs-subscription-payments icon indicating copy to clipboard operation
nextjs-subscription-payments copied to clipboard

Webhook Error: No signatures found matching the expected signature for payload.

Open adryserage opened this issue 1 year ago • 3 comments

How to do ? Installing the Vercel template

https://github.com/vercel/nextjs-subscription-payments

The problem and logs : f7b7351d-6708-4324-bb77-3492a310837c

adryserage avatar Jan 20 '24 04:01 adryserage

Check this: https://github.com/vercel/nextjs-subscription-payments/pull/293/files

tonoli avatar Feb 13 '24 12:02 tonoli

im still a tad lost, what do you save the env key as here ? it seems different from the webhook api secret

ebowwa avatar Mar 06 '24 23:03 ebowwa

Run into the same issue while testing the app deployed on Vercel, and that what I did wrong (probably as it's not clearly described in Readme):

  • ❌ I used whsec_xxx that I saw when I was adding events, but that webhook secret is for Local testing, not for testing on Vercel 2024-04-04_10-59-31

So what you need to do is:

  • finish selecting event and hit "Add events" button
  • get redirected to the Webhook page
  • ✅ use Signin secret from the Webhook page as your Production STRIPE_WEBHOOK_SECRET env variable 2024-04-04_11-00-29
  • redeploy the latest build on Vercel in order to apply the updated env variable

Bych avatar Apr 04 '24 10:04 Bych