Razorpay Payment Gateway Integration

Capture payment on any website through Razorpay

techhawa-razorpay-recurring-payment-home

Razorpay make it easier for you to focus on building great products while we work on simplifying your payments with easiest way to accept, process and disburse digital payments for businesses in India. You can do the easiest integration, completely online onboarding, best in class performance and feature filled checkout. Quickly go live with Razorpay as shown below.

#1.Creating an account

  • Create an Razorpay Account.
  • Verify your account by activating the link mailed to your account.

  • techhawa_razorpay_signup

#2. Getting AP

  • Login into Razorpay Dashboard.
  • You can switch the mode to either live or test.
  • Note: By default it will be in test mode. To enable live mode you need to provide required documents ( It will take 2-3 business day to activate live mode ).

  • Go to settings, choose API keys tab and click on generate test key (Test Mode)

  • techhawa_razorpay_key_generate
  • Save the Key Id and Key Secret (You can also download)

#3. Integration of source code

  • Copy and paste the below code on your webpage.

  • <meta name="viewport" content="width=device-width">
    <form action="/purchase" method="POST">
    <!-- Note that the amount is in paise = 50 INR -->
    <script
        src="https://checkout.razorpay.com/v1/checkout.js"
        data-key="<YOUR_KEY_ID>"
        data-amount="50000"
        data-buttontext="Pay with TechHawa"
        data-name="Merchant Name"
        data-description="Purchase Description"
        data-image="https://your-awesome-site.com/your_logo.jpg"
        data-prefill.name="TechHawa"
        data-prefill.email="[email protected]"
        data-theme.color="#F37254"
    ></script>
    <input type="hidden" value="Hidden Element" name="hidden">
    </form>
    
  • Now replace the key-id in the above code and save the file with .html.
  • Note: For live change the mode in top nav bar and copy the LIVE KEY-ID .

  • You can see the demo below.


  • Live Demo