Razorpay Payment Gateway Integration with Django πŸ’³ πŸ‘¨β€πŸ’»

Nishant Handge

Have you ever wondered β€œhow do I receive online payments on a new cool app that I have built using my favorite framework, Django”? ⚑

I did too and after a bit of digging about what are the available payment gateways that work in India I came up with the list of 5–6 payment gateways.

Out of those, Razorpay stood out to me with the range of financial products and solutions it provides. Also, their APIs are really well built. So, I chose to use Razorpay as my payment gateway.

So fellow Pythonistas, in this article I will give the basic outline of how to integrate a Razorpay payment gateway into your website.

Thinking about how the Razorpay payment gateway worksπŸ€” Let’s see

source: razorpay.com

Steps to integrate Razorpay payment gateway πŸš€

STEP 1 - Setting up Razorpay account

To use Razorpay you will have to first configure it. Following are the steps:

  • Go to razorpay.com β†’ Sign up β†’ Go to the settings.

source: razorpay.com

  • Now click on the API Keys tab.

source: razorpay.com

  • Now, Click on Generate API keys button.

source: razorpay.com

  • This will generate a new key and show you the Key Idand Key Secretin a popup. Below these fields, you will see a link to Download Key Detail, click on that and let the download complete.

source: razorpay.com

STEP 2 - Store the downloaded API keys in your settings.py file