Next.js Discord

Discord Forum

How to implement secure payment processing

Unanswered
Param san posted this in #help-forum
Open in Discord
Avatar
I am looking to integrate the payment gateway named Razorpay. I want to configure how it should work in the most secure way possible. Should I implement it using a route handler or page ? Any issues you faced while it's implementation, etc?

1 Reply

Avatar
tbh I haven't used Razorpay yet, but according to their docs and my experience with integrating Stripe, they'd have Webhook support for receiving events. Generally, after verifying the webhook signatures, it is absolutely safe to use. (unless you made a mistake in code)

Both Route Handler and API Route works, choose the one you prefer.