← Back to Blog
A Small Business Guide: How to Integrate a Payment Gateway in India
By WovLab Team | February 24, 2026 | 8 min read
By WovLab Team
Published on Feb 24, 2026
🕑 12 min read
In today's digital-first India, taking your small business online is no longer an option—it's a necessity. But a beautiful website is only half the battle. To turn visitors into customers, you need a seamless, secure, and reliable way to accept online payments. This is where a payment gateway comes in. This guide provides everything you need to know about how to integrate a payment gateway in a website for a small business, tailored specifically for the Indian market.
From navigating the plethora of options to understanding complex fee structures and ensuring regulatory compliance, the process can seem daunting. We'll demystify it for you, step by step, so you can confidently start accepting payments and growing your business online.
Choosing the Right Payment Gateway: Razorpay vs. PayU vs. Stripe
The first and most critical step is selecting a payment gateway partner. The right choice depends on your business scale, technical expertise, and customer base. Here’s a breakdown of the top three contenders in India:
| Feature |
Razorpay |
PayU |
Stripe |
| Ideal For |
Startups and SMEs looking for a feature-rich, easy-to-use solution. |
Established businesses and enterprises needing robust, scalable solutions. |
Businesses targeting a global customer base with a focus on developer experience. |
| Onboarding |
Fast, 100% digital KYC. Usually active within minutes. |
Digital onboarding, but can take a few days for activation. |
Very fast digital onboarding, often the quickest of the three. |
| Pricing (Standard) |
2% per transaction for Indian cards, UPI, Netbanking. No setup fees. |
2% per transaction. Custom pricing for high-volume businesses. No setup fees. |
2% for most Indian cards. Higher for international cards (3%). |
| Key Features |
Payment Links, Smart Collect, Subscriptions, RazorpayX (business banking). Extensive payment methods. |
Wide range of payment options, high success rates, strong fraud detection. |
World-class APIs, excellent documentation, global payments, subscription management (Stripe Billing). |
| Integration |
Excellent documentation, easy plugins for WordPress/WooCommerce, Shopify, etc. |
Plugins available for major platforms, slightly more technical than Razorpay. |
Considered the gold standard for developers due to its powerful and flexible APIs. |
Our Recommendation for Small Businesses:
For most Indian small businesses, Razorpay strikes the perfect balance between ease of use, comprehensive features, and competitive pricing. Its quick onboarding and excellent support for popular website platforms make it a fantastic starting point. If your business model is heavily subscription-based or targets a global audience from day one, Stripe is a powerful alternative, though it may require more development expertise.
Step-by-Step Integration Guide for Your Website Platform
Once you've chosen your gateway and your account is approved, it's time for integration. The method varies depending on your website's platform.
1. For eCommerce Platforms (WordPress/WooCommerce, Shopify)
This is the most straightforward approach, perfect for non-technical users.
- Find the Official Plugin: Go to your platform's app/plugin store (e.g., WordPress Plugin Directory, Shopify App Store) and search for the official plugin for your chosen gateway (e.g., "Razorpay for WooCommerce").
- Install and Activate: Install the plugin with a single click and activate it.
- Enter API Keys: In your gateway's dashboard, find your API Keys (usually a "Key ID" and "Key Secret"). Copy these and paste them into the plugin's settings page within your website's admin panel.
- Configure Settings: Enable the gateway, customize the title and description that customers will see at checkout, and save your changes.
Your payment gateway is now active! It's that simple. The plugin handles all the complex code, security, and handshakes between your site and the gateway.
2. For Custom-Built Websites
If you have a custom-coded website, you'll need a more hands-on approach using the gateway's Software Development Kits (SDKs) and APIs.
- Choose the Right SDK: Gateways provide SDKs for various programming languages (e.g., PHP, Python, Node.js, Ruby). Download the one that matches your website's backend language.
- Server-Side Integration: Your backend developer will use the SDK to create an "order" or "charge" request. This involves sending the amount and currency to the gateway's server and receiving an order ID in return.
- Client-Side Integration: On the front-end, you'll use the gateway's JavaScript library (like Razorpay's `checkout.js` or Stripe Elements). You pass the order ID obtained from your server to this script.
- Handling the Callback: When the payment is complete (or fails), the gateway redirects the user back to your site with payment details. Your server must have a secure endpoint (a "webhook") to receive this callback, verify the payment signature to confirm its authenticity, and then update your database to mark the order as paid.
While more complex, this method offers complete control over the user experience. For expert help with custom integrations, check out our web development services.
Understanding TDR, Setup Fees, and Other Hidden Costs
A payment gateway is a service, and it comes with costs. Understanding these is vital for your financial planning.
- Transaction Discount Rate (TDR): This is the primary fee. It's a percentage of each transaction that the gateway keeps. For most Indian gateways, this is around 2% + GST. So, on a ₹1,000 sale, the gateway would take ₹20 + ₹3.60 (18% GST on the fee) = ₹23.60.
- Setup Fees: Most modern gateways in India, like Razorpay and PayU, have zero setup fees for their standard plans. Be wary of providers that ask for a hefty upfront cost.
- Annual Maintenance Charges (AMC): Similar to setup fees, AMCs are becoming rare for standard SME accounts. Always confirm this before signing up.
- International Transactions: Fees are typically higher for payments made with international cards, often around 3% + GST. You might also incur currency conversion charges.
- Other Costs: Check the fine print for fees related to chargebacks (disputed payments), batch settlements, and using specific payment methods like American Express or EMI options, which sometimes carry a higher TDR.
Our advice? Create a simple spreadsheet to project your monthly sales and calculate the estimated TDR. This helps you price your products correctly and understand your net margins. For transparent, affordable service packages, see our retainer pricing.
Essential Security & RBI Compliance Checklist for Indian Businesses
Security is non-negotiable. A breach not only costs money but also destroys customer trust. Your payment gateway handles most of the heavy lifting, but you have a role to play.
- Use a PCI DSS Compliant Gateway: The Payment Card Industry Data Security Standard (PCI DSS) is the global security standard. All major gateways (Razorpay, PayU, Stripe) are Level 1 compliant, the highest level. This means they handle sensitive card data in a highly secure environment.
- Never Store Card Information: Your server should never store full credit card numbers, CVVs, or expiry dates. The entire point of using a modern gateway integration (like Stripe Elements or Razorpay's checkout) is that this sensitive data is sent directly from the customer's browser to the gateway's secure servers, bypassing your server completely.
- Implement SSL/TLS on Your Website: Your entire website must be served over HTTPS. An SSL certificate encrypts the data exchanged between your user's browser and your server. It's a basic requirement for any site that handles user data and is a clear trust signal (the padlock in the browser).
- Verify Webhook Signatures: As mentioned in the custom integration section, you must cryptographically verify the signature of every webhook/callback you receive. This ensures the request is genuinely from the payment gateway and not a malicious actor trying to fake a successful payment.
- Adhere to RBI Guidelines: The Reserve Bank of India sets the rules for digital payments. This includes mandates like two-factor authentication (2FA) for all card-not-present transactions. Using a compliant Indian payment gateway ensures you are automatically covered by these regulations.
Testing Your Integration: From Sandbox to Live Transactions
Never launch without thorough testing. All gateways provide a "Test Mode" or "Sandbox Environment" for this purpose.
- Switch to Test Mode: In your gateway's dashboard, toggle the mode from "Live" to "Test". You will be given a separate set of test API keys. Use these on your website.
- Use Test Card Details: The gateway's documentation will provide a list of test card numbers that you can use to simulate different scenarios—successful payments, failed payments (e.g., due to incorrect CVV or insufficient funds), and different card types.
- The Testing Checklist:
- ☑ Process a successful payment. Does the customer land on a "Thank You" page?
- ☑ Do you, as the admin, receive an order confirmation email?
- ☑ Is the order status correctly updated to "Paid" or "Processing" in your website's backend?
- ☑ Simulate a failed payment. Is the user shown a clear error message and allowed to try again?
- ☑ Test various payment methods: UPI, Credit Card (Visa/Mastercard), Netbanking from a major bank.
- Going Live: Once you're confident everything works, switch back to "Live Mode" in your gateway dashboard and replace the test API keys on your site with your live API keys. It's a good practice to then make one small, real transaction with your own card to ensure everything is perfect.
Beyond Integration: Optimizing for Conversions and Failed Payments
Integration is just the start. Now, optimize the system for better business outcomes.
1. Reduce Cart Abandonment
A clunky checkout is a conversion killer. Ensure your checkout page is clean, mobile-friendly, and only asks for essential information. Offer guest checkout as an option. Display trust seals like your payment gateway's logo and SSL certificate prominently.
2. Handle Payment Failures Gracefully
Failures happen—due to bank server issues, incorrect details, or OTP delays. Instead of a dead end, your system should:
- Provide a clear reason for the failure.
- Ask the user to try again with a different method.
- Save their cart so they don't have to start over.
3. Automate Follow-ups
What about users who drop off at the payment stage? Or payments that fail? This is where automation can recover lost revenue. With an AI Agent, you can set up automated workflows to send a WhatsApp message or email an hour later, reminding them to complete their purchase, perhaps with a small discount code to nudge them over the line.
Ready to Get Started?
Let WovLab handle it for you — zero hassle, expert execution.
💬 Chat on WhatsApp