
Razorpay Payment Flow (One-Time) Payment
Hello Everyone Today we will understand the Razorpay Payment flow step by step clearly . When we click on pay now button the execution starts as Step -1 (Razorpay order creation) First of all we have to create order in razorpay before making a payment because each payment in razorpay is tied to an order. var instance = new Razorpay ({ key_id : ' YOUR_KEY_ID ' , key_secret : ' YOUR_SECRET ' }) const order = instance . orders . create ({ amount : 50000 , currency : " <currency> " , receipt : " receipt#1 " , notes : { key1 : " value3 " , key2 : " value2 " } }) return { order , key_secret } Step-2 (FRontend recieves order details and key_secret) Frontend will recieves order details and key_secret and pass these details to razorpay checkout ,because these details like key_secret and order.id and amount will tells the razorpay, for which merchant for which order.id and for what amount this current payment are. var options = { key : " rzp_test_xxxxx " , // Your Razorpay Key ID amount : 50000
Continue reading on Dev.to React
Opens in a new tab



