DEV Community

Rishabh Sethia
Rishabh Sethia

Posted on • Originally published at innovatrixinfotech.com

How to Integrate Razorpay Payment Gateway in Shopify: Complete 2026 Guide

Razorpay is India's most popular payment gateway. Shopify is India's fastest-growing e-commerce platform. Getting them to work together properly — with UPI, EMI, COD, and proper GST invoicing — requires more than just installing an app.

This guide covers the complete integration, including the edge cases most tutorials skip.

Step 1: Set Up Your Razorpay Account

Before you touch Shopify:

  1. Create a Razorpay account at razorpay.com
  2. Complete KYC (business documents, bank account, PAN/GST)
  3. Get your Live API Keys from Dashboard > Settings > API Keys
  4. Enable the payment methods you need: UPI, cards, netbanking, wallets, EMI, COD

Note: KYC approval takes 2-7 working days. Don't start Shopify setup until your Razorpay account is live and approved.

Step 2: Install Razorpay on Shopify

  1. Go to Shopify Admin > Settings > Payments
  2. Under "Third-party providers," search for Razorpay
  3. Install the official Razorpay app from Shopify App Store
  4. Enter your Live API Key ID and Key Secret
  5. Enable "Test mode" first to verify the integration

Important: Shopify charges a 2% transaction fee on all third-party payment gateways if you're on Basic or Shopify plans. To eliminate this fee, you need Shopify Advanced (₹21,000/mo) or Shopify Plus. For most Indian stores, the math makes sense to stay on Basic/Shopify plan and absorb the fee until revenue justifies the upgrade.

Step 3: Configure Payment Methods

UPI (Critical for India)

In Razorpay Dashboard > Settings > Configuration:

  • Enable UPI (VPA, QR Code, and UPI Intent)
  • Test with a real UPI ID before going live
  • UPI is the #1 payment method for Indian online stores — don't skip this

EMI

  • Enable in Razorpay Dashboard under Payment Methods > EMI
  • Specify minimum order amount for EMI (typically ₹5,000+)
  • No-cost EMI requires coordination with your bank partner (Razorpay handles this)

COD (Cash on Delivery)

Shopify handles COD natively — you don't need Razorpay for this. Set it up under Settings > Payments > Manual payment methods > Cash on Delivery.

For COD fraud prevention, use Razorpay's COD Intelligence feature (available on Growth/Scale plans) which scores orders for fraud risk.

Step 4: GST and Invoice Setup

India requires GST-compliant invoices for all B2C transactions above ₹50,000 (B2B invoices for all amounts). Shopify's native invoicing is not GST-compliant.

Options:

  1. Razorpay Tax Invoice (built into Razorpay) — Generates GST-compliant invoices automatically. Enable in Razorpay Dashboard > Tax.
  2. Shopify apps like QuickBooks GST or Zoho Books integration — More comprehensive, syncs with accounting.
  3. Custom Liquid template — If you want Shopify's native order confirmation to be GST-compliant.

For most stores, Razorpay's built-in tax invoice is sufficient.

Step 5: Testing Checklist

Before going live, test every payment flow:

  • [ ] Card payment (domestic and international)
  • [ ] UPI payment (scan QR + enter VPA)
  • [ ] Netbanking
  • [ ] Wallets (Paytm, PhonePe if enabled)
  • [ ] EMI (if enabled)
  • [ ] COD
  • [ ] Refund flow (refund a test order and verify it processes)
  • [ ] Webhook delivery (verify Shopify receives order confirmation from Razorpay)

Common Issues and Fixes

Order stuck in "Pending Payment": Usually a webhook issue. Verify your webhook URL in Razorpay Dashboard > Settings > Webhooks. The URL should be https://yourstore.myshopify.com/webhook/razorpay.

Duplicate orders: Happens when Razorpay sends multiple webhook events. Enable idempotency in Razorpay settings to prevent duplicate processing.

UPI timeout errors: Default UPI timeout is 3 minutes. For higher-value orders, customers may need more time. Contact Razorpay support to extend timeout.

GST invoices not generating: Ensure your business GST number is added in both Razorpay and Shopify settings.


Need expert help? Innovatrix Infotech is a professional Shopify development agency in Kolkata handling integrations across India. Get a free consultation.


Originally published at Innovatrix Infotech

Top comments (0)