I want to get JSON from Razorpay webhook and I am using NEXT.JS in frontend and Strapi on the backend to develop my site. Because webhook doesn't work locally, I have tunneled my localhost to HTTPS using ngrok. Whenever webhook sends me data on ngrok URL, the ngrok shows me 403 Forbidden requests by webhook.
This is my code:
async verification(ctx) {
try {
ctx.send(200);
const secret = "This is the razorpay secret";
console.log(ctx.request.body);
} catch {
error;
}
},
I am sending 200 and printing the JSON that webhook sends me. I see nothing wrong and it's still not working. On the NGROK web interface, I can see the JSON webhook send me but ngrok tells me that request webhook made is forbidden and gives the status of 403.