E-commerce

How to Add Razorpay Payment Gateway to WooCommerce, Shopify and Laravel

By Team TechavinyaOctober 24, 20264 min read
Razorpay payment gateway - Techavinya guide
Quick summary: The Razorpay payment gateway lets Indian businesses accept UPI, cards, netbanking and wallets online. This guide explains how to connect the Razorpay payment gateway to WooCommerce, Shopify and Laravel, step by step.
Razorpay payment gateway - Techavinya guide

Razorpay is one of the most popular payment gateways in India. It lets your customers pay with UPI, cards, net banking and wallets, and it works with WooCommerce, Shopify and custom PHP or Laravel websites. This guide gives an overview of how Razorpay integration works on each platform and the common mistakes to avoid.

Before you start

  • Create a Razorpay account and complete KYC (business PAN, bank account, website details).
  • Make sure your website has clear Privacy Policy, Terms, Refund and Contact pages — payment gateways check these during activation.
  • Generate test API keys first and only switch to live keys after testing.

Razorpay payment gateway on WooCommerce

  1. Install the official Razorpay plugin for WooCommerce.
  2. Go to WooCommerce → Settings → Payments → Razorpay and add your Key ID and Key Secret.
  3. Set up the webhook in your Razorpay dashboard so orders are marked paid even if the customer closes the browser.
  4. Place test orders in test mode, then switch to live keys.

Need a website or app that brings customers?

Get a free consultation and fixed quote from our Jaipur team within 24 hours. No obligation.

WhatsApp UsCall +91 97826 31650

Razorpay payment gateway on Shopify

  1. Install Razorpay from Shopify’s payment providers.
  2. Connect your Razorpay account and choose which payment methods to show.
  3. Test the checkout on mobile, since most Indian customers pay by UPI on their phones.

Razorpay payment gateway on Laravel or custom PHP

  1. Create an order on your server using Razorpay’s Orders API.
  2. Open Razorpay Checkout on the front-end (JavaScript or React) with the order ID.
  3. Verify the payment signature on the server before marking the order paid.
  4. Add webhooks for payment captured, failed and refund events.

Common Razorpay payment gateway problems

  • Orders stuck in “pending payment” — usually a missing or wrong webhook.
  • Payment successful but order not created — signature verification or callback URL issue.
  • Checkout not opening on mobile — JavaScript conflicts with themes or caching plugins.
  • Duplicate orders — the payment flow is not idempotent.

Razorpay alternatives

Depending on your business, you may also consider Cashfree, PayU, PhonePe or CCAvenue for Indian payments, and Stripe or PayPal for international customers. Many stores offer two gateways so customers always have a working option.

Frequently asked questions

Is Razorpay integration free?

Razorpay charges a transaction fee per payment. The plugins are free; developer charges apply if you need setup, customisation or a custom integration.

How long does integration take?

On WooCommerce or Shopify it usually takes a few hours to a day including testing. Custom Laravel or PHP integrations take 1–3 days.

Can you fix my existing Razorpay setup?

Yes, we debug failed payments, webhook issues and orders that are not updating.

Need help with payment integration?

Techavinya integrates Razorpay, Stripe, PayPal, PayU, Cashfree and PhonePe into WordPress, WooCommerce, Shopify, Laravel, PHP and React applications. See our payment gateway integration service or message us on WhatsApp (+91 9782631650) for a quick quote.

Razorpay payment gateway: tips before you go live

Before you switch the Razorpay payment gateway to live mode, run a few checks. These small steps prevent failed payments and angry customers later.

  • Complete KYC early. Keep your PAN, bank account details and business proof ready. Activation is faster when documents match your business name exactly.
  • Test everything in Test Mode. Place test orders for successful, failed and cancelled payments, and confirm that order status updates correctly on your website.
  • Set up webhooks. Webhooks tell your website when a payment succeeds even if the customer closes the browser. Without them, some paid orders may stay “pending”.
  • Show clear policies. Add refund, cancellation, shipping and contact pages. Payment providers check these during review and customers trust them.
  • Check current pricing. Transaction fees differ by payment method and plan, so confirm the latest charges on the Razorpay website before setting your product prices.

Need help? Techavinya sets up and tests the Razorpay payment gateway on WooCommerce, Shopify and custom Laravel websites, including webhooks and order emails. Message us on WhatsApp and we will get your payments working.

Want a website or AI tool that brings you leads?

Talk to Techavinya for a free consultation. We reply within 24 hours.

Leave a Reply

Your email address will not be published. Required fields are marked *