You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will throw a SecurityError exception if the signature is invalid. The parameters are as follows:
webhook_body: The complete webhook body. You can use request.raw_post in Rails, req.body.read in Rack, or request.body.read in Sinatra. Please consult your framework's documentation for the equivalent.
webhook_signature: We send the webhook signature in a request header with the key X-Razorpay-Signature . You can read the header using request.headers["X-Razorpay-Signature"] in Rails, env["HTTP_X_RAZORPAY_SIGNATURE"] in Rack, or request.env["HTTP_X-Razorpay-Signature"] in Sinatra.
webhook_secret: The secret you set at the time of setting up the webhook.
You can parse the webhook after it has been validated by using JSON.parse webhook_body.