-
Hi I need to integrate the Stripe webhook to fulfill orders on an AdonisJs 5 application. I need to send back the raw body for Stripe with the following code :
But I get this message back : I even tried to send the Any way around this ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
FOUND THE SOLUTION. The following code just works for Stripe with AdonisJS 5 for webhook (threw SEO keywords here for others) : What didn't work was the fact that I used the test mode secret token instead of the one given on the Stripe CLI terminal : |
Beta Was this translation helpful? Give feedback.
FOUND THE SOLUTION.
The following code just works for Stripe with AdonisJS 5 for webhook (threw SEO keywords here for others) :
event = stripe.webhooks.constructEvent( ctx.request.raw(), signature, secretKey )
What didn't work was the fact that I used the test mode secret token instead of the one given on the Stripe CLI terminal :
> Ready! You are using Stripe API Version [2022-08-01]. Your webhook signing secret is whsec_xxxxxxxxxxxxxxxxxxxxxxxxx (^C to quit)