#WaDo-webhooks

1 messages · Page 1 of 1 (latest)

untold pond
#

Hi! Yes webook signature can be a bit tricky.

#

Can you try to log the values of req.body, signature, and stripeWebhooksApiKey to check their values?

bitter sphinx
#

Hi

#

Find the console log below

#
  body: {
    id: 'evt_3KnIJLDV9jNuNMkU2YDehGU6',
    object: 'event',
    api_version: '2020-08-27',
    created: 1649664563,
    data: { object: [Object] },
    livemode: false,
    pending_webhooks: 3,
    request: {
      id: 'req_kiqskYa32PEJjv',
      idempotency_key: '2cbe16a6-6eab-43a9-ba3a-d67d18bcf9bc'
    },
    type: 'payment_intent.created'
  },
  signature: 't=1649664563,v1=51f0129b6e1303c7f9c026daba45d70744560976015f17c8ca9e557acf4773f4,v0=a376fa0dc92974817275d835bb3e2f25cf1a7922d17d6ada6f66b4dbf91dfffc',
  stripeWebhooksApiKey: 'whsec_cc32e4e88512285d3bcb0544cd2aa4732ab31ac62bc9a944a5303ac4c779ff7a'
}
untold pond
#

Can you check that the whsec_*** match the one you see in your dashboard (or in the Stripe CLI if you are soing local testing)?

#

And have you tried this:

could you replace JSON.stringify(req.body) by just req.body

bitter sphinx
#

Yeah it is a local wh_secret

#
A newer version of the Stripe CLI is available, please update to: v1.8.6
> Ready! You are using Stripe API Version [2020-08-27]. Your webhook signing secret is whsec_cc32e4e88512285d3bcb0544cd2aa4732ab31ac62bc9a944a5303ac4c779ff7a (^C to quit)
untold pond
#

So have you tried my suggestion above? Does it work?

bitter sphinx
#

Yes I have tried

#

But it still not work

untold pond
bitter sphinx
#

Okay let me check it

#

The first solution does not seem to work