How to Integrate Payment Gateway in Website for Small Business India | WovLab
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 payments. This is where a payment gateway comes in. It's the digital equivalent of a credit card terminal, a crucial bridge between your customer's bank and yours.
However, the question "how to integrate payment gateway in website for small business india" can feel daunting. You're faced with technical jargon, a sea of providers, and concerns about fees and security. This guide is here to demystify the entire process. We'll walk you through choosing the right partner, preparing your documents, the technical integration itself, and what to watch out for. By the end, you'll have a clear roadmap to start accepting payments online.
Choosing the Right Payment Gateway: Razorpay vs. Stripe vs. PayU
The first and most critical step is selecting a payment gateway. India's fintech boom has given us several excellent options, but three names consistently stand out for small and medium businesses: Razorpay, Stripe, and PayU. Each has its strengths, and the best choice depends on your specific needs.
| Feature | Razorpay | Stripe | PayU |
|---|---|---|---|
| Target Audience | Indian startups & SMEs | Global businesses, tech-savvy users | Indian enterprises & SMEs |
| Onboarding Speed | Very Fast (often same-day) | Fast, but can be more stringent | Moderate speed |
| Standard TDR* | ~2% + GST | ~2-3% + GST (varies) | ~2% + GST |
| Payment Methods | Excellent (UPI, Cards, Wallets, Netbanking, PayLater) | Excellent (especially for international cards) | Very Good (strong local options) |
| Developer Experience | Superb, well-documented APIs | Industry gold standard, powerful APIs | Good, improving documentation |
| Best For | Quick domestic setup and wide payment options. | Accepting international payments and complex integrations. | Customization and established businesses. |
*TDR (Transaction Discount Rate) is the fee charged per transaction. These are standard rates and can be negotiated for high-volume businesses.
WovLab's Recommendation: For most Indian small businesses starting, Razorpay is the winner. Its onboarding is incredibly fast, the dashboard is user-friendly, it supports every payment method your customers might use (especially UPI), and its developer APIs are a dream to work with. Stripe is a fantastic choice if a significant portion of your revenue will come from international customers. PayU is a solid, reliable alternative, particularly for larger-scale operations.
Pre-Integration Checklist: Documents and Bank Details You'll Need
Before you can write a single line of code, you need to get your paperwork in order. Payment gateways are regulated financial services, so they require a Know Your Customer (KYC) process to verify your identity and the legitimacy of your business. Having these documents ready will make the onboarding process smooth and quick.
For a Proprietorship Firm:
- Identity Proof: PAN Card of the proprietor.
- Address Proof: Aadhaar Card, Passport, or Voter ID of the proprietor.
- Business Bank Account: A cancelled cheque or a recent bank statement of your current account.
- Business Proof (any one): GST registration certificate, Shop & Establishment Act license, or any other government-issued business license.
For a Private Limited Company or LLP:
- Company PAN Card.
- Certificate of Incorporation and Memorandum of Association (MoA).
- Company Address Proof: Utility bill or rental agreement.
- Business Bank Account: A cancelled cheque or a recent bank statement in the company's name.
- Director's Documents: PAN card and address proof for all directors.
Gather these documents as scanned PDFs. During the online application on Razorpay, Stripe, or PayU, you'll be prompted to upload them. A complete and clear submission is the key to getting your account approved in hours, not days.
The 5-Step Technical Integration Process for Your Website
This is where the magic happens. While it sounds technical, modern payment gateways have made the process remarkably straightforward. We'll use Razorpay as our example due to its popularity, but the core concepts apply to Stripe and PayU as well.
Step 1: Sign Up & Get Your API Keys
Once your KYC is approved, your account will be activated. Log in to your Razorpay Dashboard and navigate to Settings -> API Keys. Here, you'll find a "Key ID" and a "Key Secret". Think of the Key ID as your public username and the Key Secret as your password. Generate a set of keys for "Test Mode" first. We'll use these for safe development.
Step 2: Install the SDK on Your Website
The Software Development Kit (SDK) is a small library that handles the complex parts of the payment process. For a simple HTML/JavaScript website, you just need to add a script tag to your page.
<!-- Add this right before your closing </body> tag -->
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
If you're using a platform like WordPress or Shopify, you don't even need this. You can simply install their official plugin and enter your API keys there.
Step 3: Create an "Order" on Your Server (Backend)
A crucial security step! You should never calculate the final payment amount on the user's browser (the frontend). It could be manipulated. Instead, your server should tell Razorpay how much to charge. You use the "Orders API" for this. Here's a simplified example using Node.js:
// On your server (e.g., in an Express.js route)
const Razorpay = require('razorpay');
const instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_KEY_SECRET' });
const options = {
amount: 50000, // amount in the smallest currency unit (e.g., 50000 paise = ₹500)
currency: "INR",
receipt: "receipt_order_74394"
};
instance.orders.create(options, function(err, order) {
// Send the 'order.id' back to your frontend
res.json({ orderId: order.id });
});
Your frontend asks your backend "I need to charge for Product X", and your backend securely creates an order with Razorpay and returns the `order_id`.
Step 4: Implement the Checkout Form on the Frontend
With the `order_id` from your server and the Razorpay script loaded, you can now trigger the beautiful, pre-built checkout modal. Attach this code to a "Pay Now" button's click event.
// On your website's JavaScript (frontend)
const options = {
"key": "YOUR_KEY_ID", // Your public Key ID
"amount": "50000", // Amount is in currency subunits.
"currency": "INR",
"name": "WovLab Inc.",
"description": "Test Transaction",
"image": "https://wovlab.com/logo.png",
"order_id": "ORDER_ID_FROM_YOUR_SERVER", // This is the order_id you got from your server
"handler": function (response){
alert("Payment Successful! Payment ID: " + response.razorpay_payment_id);
// You can now verify this payment on your server
},
"prefill": {
"name": "Gaurav Kumar",
"email": "gaurav.kumar@example.com",
"contact": "9999999999"
},
"theme": {
"color": "#4F46E5"
}
};
const rzp1 = new Razorpay(options);
rzp1.open();
When this code runs, a popup appears allowing the user to pay via UPI, Card, etc. It's mobile-responsive and handles all the OTPs and bank redirects.
Step 5: Verify the Payment on Your Server (Webhook)
After a payment is completed, how does your server *know* it was successful? The `handler` function in Step 4 is a good indicator, but for 100% confirmation, you must use webhooks. A webhook is a notification that Razorpay sends directly to your server when a payment is captured. In your Razorpay dashboard, you can set a "Webhook URL". Your server listens on this URL, receives the payment data, and cryptographically verifies it using the "Key Secret". This final step allows you to confidently update your database, confirm the order, and send a confirmation email to the customer.
Testing and Go-Live: How to Safely Launch Your Payment System
Before you charge a single real rupee, thorough testing is non-negotiable. This is what the "Test Mode" is for. With your test API keys, you can simulate transactions without any real money involved.
Your Testing Checklist:- ✅ Simulate a successful payment using the test card details provided by the gateway.
- ✅ Simulate a failed payment using the test failure credentials.
- ✅ Test different payment methods available in test mode (e.g., test UPI, test wallet).
- ✅ Verify that a successful payment correctly updates your database (via the webhook).
- ✅ Ensure a confirmation email/SMS is sent to the user upon success.
- ✅ Check that inventory is correctly deducted if you're selling physical or digital products.
Once you've ticked every box and are confident everything works, it's time to go live! Go back to your Razorpay dashboard, switch the mode from "Test" to "Live", and generate a new set of Live API keys. Replace the test keys in your code with the live ones, and you are officially ready to accept payments from customers across India.
Understanding TDR, Annual Fees, and Other Hidden Costs
While modern gateways are transparent, it's vital to understand the fee structure. The primary cost is the Transaction Discount Rate (TDR). This is a percentage of the transaction value that the gateway keeps as its fee. For Razorpay and PayU, this is typically a flat 2% on domestic transactions. So, for a ₹1,000 sale, they would charge ₹20. On top of this, you must pay GST (currently 18%) on the TDR amount, not the transaction amount. So the total fee would be ₹20 + (18% of ₹20) = ₹23.60.
Here's what to look out for:
- Setup Fees & AMC: Great news! For standard plans, providers like Razorpay and Stripe have no setup fees and no Annual Maintenance Charges (AMC). You only pay when you make a sale.
- International Transactions: Fees are higher for international cards, typically around 3% + GST.
- Extra Features: Services like subscriptions (recurring payments), instant settlements, or using a custom payment page might incur additional charges.
- Chargebacks: If a customer disputes a transaction, you might be liable for a chargeback fee.
Always read the pricing page carefully. But for a small business in India, the simple TDR on domestic transactions is the main cost to factor into your pricing.
Conclusion: Let WovLab Handle Your Payment Gateway Setup
Integrating a payment gateway is a powerful step towards automating and scaling your business. It opens your doors to customers 24/7 and builds trust and professionalism. While the process is more accessible than ever, it still involves technical steps that need to be done correctly to ensure security and reliability.
If you're focused on running your business and prefer not to get tangled in APIs, webhooks, and testing environments, WovLab is here to help. Our expert web development team has integrated payment gateways for countless Indian businesses. We handle the entire end-to-end process, from choosing the right provider to rigorous testing and a secure go-live, all for a flat, affordable fee as part of our retainer plans.
We ensure your payment system is not just functional but also seamlessly integrated with your business operations, perhaps even connected to one of our custom AI Agents to automate post-payment workflows.