#matiullahpro-webhook-signature

1 messages · Page 1 of 1 (latest)

flat copper
#

Hi there 👋 the most common cause I've seen for that error being thrown, is that the constructEvent function is not being passed the raw request body.

#

constructEvent relies on receiving the exact raw payload as it was transmitted, but a lot of frameworks will try to help by formatting those payloads which inadvertently results in the error that you're encountering.

rocky bridge
#

i tried same i core php ... it showing same results...

#

48 hours ago... it was working fine...

#

now i tried each possible way... it return same error

#

i can share core php code with you... if you want....

flat copper
#

If your PHP code is encountering that signature error then, based on the code snippet that you shared, it looks expected for your server to respond to us with a 400. The next steps here is to debug why your code is failing to verify the webhook signature. You mentioned that this was working 48 hours ago, have you pushed any changes since then?

If you're doing this for multiple webhook endpoints, it's also important to make sure that you're updating the webhook signing secret that your code is using, as that value is unique to each webhook endpoint that is created.