Razorpay is a very popular payment gateway in the world of the internet.
We can integrate razorpay with most of the technologies such as android, ios, flutter, react native, PHP, python, java, NodeJS, .NET, ruby.
Here is the full documentation of integration.
After integration with any technology, when we create any payment with razorpay then payment first goes in authorization state, then it goes to the Captured state. when payment is in the captured state it indicates that the payment is successfully transferred.
Sometimes due to Razorpay Server Down, Internet Issue or any other technical reason, payment is deducted from Customer but not Successfully Completed, then that payment is reflected as “authorized”. for complete that payment we manually need to Capture the payment.
For Manually Capture Payment, please follow the below screenshot,
http://inheritxdev.net/knowledgebase/wp-content/uploads/2019/07/AwesomeScreenshot-Razorpay-Dashboard-2019-07-19-14-07-72.png
http://inheritxdev.net/knowledgebase/wp-content/uploads/2019/07/AwesomeScreenshot-Razorpay-Dashboard-2019-07-19-14-07-65.png
Now to sync live payments with our database, we need to use “Razorpay WebHook” to retrieve all the payment entries in our database which are done from the Razorpay admin panel.
here is the documentation for the webhook concept and integration.
To enable webhook, please go to Setting Tab in the razorpay Admin Panel, there will be a Tab for WebHook. to set webhook set URI and select payment events and save the form.
Write Logic to handle Razorpay webhook Request, like when any payment is captured, it is either from Our Mobile App/Web App or Razorpay Admin Panel, we will receive the Payment token for the payment which was made. we need to write database queries to save payment token to our database.
http://inheritxdev.net/knowledgebase/wp-content/uploads/2019/07/AwesomeScreenshot-Razorpay-Dashboard-2019-07-19-14-07-24.png
That’s it.