Is it safe to implement payment gateway logic within NextJS route handlers?
Answered
Broken Nokia posted this in #help-forum
I want to integrate a payment gateway (PayTM or Razorpay) into my app, should i have a separate backend to handle transactions or is it safe to implement the transaction logic within the route handlers of my NextJS project.
Answered by B33fb0n3
route handlers are handled serverside. So yes, that is safe. Keep in mind to read the documentation of the specific payment gateway so you put the right code to the right place
3 Replies
@Broken Nokia I want to integrate a payment gateway (PayTM or Razorpay) into my app, should i have a separate backend to handle transactions or is it safe to implement the transaction logic within the route handlers of my NextJS project.
route handlers are handled serverside. So yes, that is safe. Keep in mind to read the documentation of the specific payment gateway so you put the right code to the right place
Answer
Noted, thank you ☺️