#victorconnexion

1 messages · Page 1 of 1 (latest)

cursive shuttleBOT
upper rock
#

Are you using the correct webhook secret and passing the raw request body without modifications?

scarlet siren
#

yes, the secret is correct

#

const eventObject = await this.stripe.webhooks.constructEvent(body, sig, webhookSecret)

#

I believe this is due to how the body is parsed

upper rock
#

You don't parse the body, you should just pas in the raw body

scarlet siren
#

it body is not longer raw as it was parsed to sns a

upper rock
#

Then it won't work

#

you need to pass in the raw body

scarlet siren
#

the raw body is JSON file ?

upper rock
#

The body is data bytes, you don't parse it json or process it before passing it to constructEvent

scarlet siren
#

thanks will investigate further