In image 1, once I click the "Pay" button, I'll be redirected to the razorpay API.
In image 2, Once I'm in razorpay's API URL in test mode, I have two options, Success and Failure. On clicking success, I'm able to call the payments.capture function. But on clicking "Failure", I'm not able to get any response and no function is being called
I'm using MEAN stack, razorpay is integrated with Node JS. Any suggestions would be really helpful.
Thanks in Advance.
In the Razorpay dashboard. Go to settings> Webhooks > Give your webhook url (Select Events you want) .
Once the user clicks on failure in test mode. Razorpay will send a webhook response "Payment Failed" to the corresponding webhook url given.Note that it will be in the form of json.