Razorpay payment gateway for WooCommerce
The Razorpay payment gateway for WooCommerce is the official plugin. Install it from Plugins, paste the Key ID and Key Secret at WooCommerce Settings, Payments, Razorpay, set the payment action to Authorize and Capture, and run one test order. Webhooks configure themselves when you save the keys, and UPI, cards and netbanking appear at checkout.
How an Indian WooCommerce store owner wires Razorpay end to end: keys, capture settings, webhooks, the test order, and the first live payout.
knowledge
- Read time
- 5 min
- Sections
- 7
- Updated
- 14 Nov 2026
- Written by
- WebJi® team
Last editorial update: 15 November 2026.
What has to be ready before Razorpay keys work?
Two accounts have to exist first: an approved Razorpay account and a working WooCommerce store on HTTPS. Razorpay's own prerequisites list a created account, completed KYC, business activation after their activation email, and generated API keys. Until the review finishes, only test keys do anything useful.
The store side needs WooCommerce active, at least one product, a checkout page, and a valid SSL certificate — the Razorpay checkout window will not open on an insecure page. If you are still fixing that, start with the SSL troubleshooting guide. The plugin talks to Razorpay over HTTPS, so a server that blocks outbound requests breaks it at checkout.
Use test keys while the review is open. A live key pasted too early either fails checkout outright or charges a real customer while you are still learning the settings screens.
How do you install the plugin and paste the keys?
Install only the official "Razorpay for WooCommerce" plugin, then paste the Key ID and Key Secret under WooCommerce, Settings, Payments, Razorpay. A payment-link plugin with a similar name is a different product and will not act as a checkout gateway.
- Install: In WordPress open Plugins → Add New, search "Razorpay", install the official plugin, activate it. Manual installs upload the source zip to
/wp-content/plugins/. - Generate keys: In the Razorpay dashboard open Account & Settings → API Keys. Generate the test key pair first and copy the Key ID and Key Secret. Never paste either value into a public page or a screenshot.
- Enable the gateway: In WooCommerce open Settings → Payments, enable Razorpay, open its settings page.
- Paste keys: Enter the test Key ID and Key Secret, set the title and description customers see at checkout, and save.
- Check checkout: Open your checkout in a private browser window; Razorpay should be listed as a payment method.
If Razorpay is missing from the payments list, the plugin is not active. If Activate does nothing, ask the host to confirm the PHP curl extension — outbound API calls depend on it.
Authorize and Capture, or Authorize only?
Set the payment action to "Authorize and Capture" unless you have a reason to capture each payment by hand. With auto-capture, a successful payment is captured at once and the order moves on. With "Authorize" only, you capture manually from the Razorpay dashboard — and Razorpay's documentation warns that uncaptured payments are automatically refunded after 5 days, leaving you with no money and a confused customer.
- Authorize and Capture: the default choice for digital goods, normal retail, and any store without a manual review step.
- Authorize only: for stores that verify stock or fraud-check each order before taking the money. Capture within the window or lose the payment.
Which payment methods will checkout show?
The checkout shows whatever methods your Razorpay account has enabled — UPI, cards, netbanking and wallets — and you do not pick individual banks inside WooCommerce. Keep UPI visible and first; it is the method most Indian customers already use daily.
| Method | Show it when | You know it worked when |
|---|---|---|
| UPI | Always, for customers in India. Put it first. | The UPI app confirms and the WooCommerce order becomes Processing. |
| Cards | Your Razorpay account allows domestic or international cards. | A test-mode card payment is captured immediately under Authorize and Capture. |
| Netbanking, wallets | You want extra choice alongside UPI, not a replacement for it. | The options appear on the Razorpay checkout screen. |
| Cash on delivery | Only pin codes you can actually serve. | WooCommerce records the order with no Razorpay payment id — COD is a WooCommerce method, not a Razorpay one. |
A shop that only wants UPI QR and intent links, without a full gateway account, has a lighter option in the UPI payments without a gateway guide. That path does not replace Razorpay when you also need cards or netbanking.
How do webhooks keep WooCommerce in sync?
Since plugin version 3.5.0, webhooks are auto-configured the moment you save the Key ID and Secret in the plugin settings. The plugin registers the events it needs — payment.authorized, payment.captured, payment.failed and order.paid — on your Razorpay account. Verify them under Dashboard → Account & Settings → Webhooks; if you regenerate API keys, re-save them in the plugin so the auto-configuration runs again.
This matters because Razorpay can capture the money while WooCommerce still shows Pending or Failed — the browser closed before the store heard the result. When that happens, open the webhook settings in the dashboard, confirm the payment.captured event is present, and use Razorpay's "Resend" on the stuck event. The order is fixed when its note carries the payment id and the status moves to Processing.
Once a week, match WooCommerce orders against Razorpay payments so a missed update or an unrecorded refund stands out early.
How do you test before switching to live keys?
Run one full test order with test keys and confirm all four checks below before you even generate live keys. Use a cheap product you can refund, and open checkout in a private window so extensions and cached sessions do not interfere.
- Order status: the WooCommerce order reads Processing, not Pending payment.
- Payment record: the same payment id shows as captured in the Razorpay test dashboard.
- Stock: stock falls by the ordered quantity, exactly once.
- No duplicates: refreshing the thank-you page does not create a second order.
After Razorpay approves the account, switch the keys to the live pair, turn off test mode, and place one real order you refund the same day. It counts as done when that order is Processing in WooCommerce and captured in the live dashboard.
What does Razorpay charge, and when do payouts arrive?
The plugin itself is free; Razorpay charges per successful payment, and the exact rate for your account sits in the Razorpay dashboard, not on this page. Razorpay's pricing varies by method (UPI is typically the cheapest), and GST applies on their fee. Read the number off your own dashboard or pricing page before you build it into product prices.
Settlement timing is a property of the Razorpay account — on-hold period, business category, and bank — not something the WooCommerce plugin controls. Do not assume another store's payout schedule is yours. Reconcile payouts to orders in the dashboard before deciding a week looks short.
Razorpay's fee invoice is not the GST invoice your customer downloads with the order — that is a separate WooCommerce job, covered in the GST invoice guide.
Where should the WooCommerce store itself run?
The gateway never hosts your shop — a Razorpay-connected WooCommerce store needs hosting with HTTPS, current PHP and a server that allows outbound API calls. E-commerce hosting at WebJi® is built for exactly that, and support can confirm the curl extension before you install anything. Email support@webji.services for a quote; plan prices are always confirmed at checkout.
Moving an already-selling store is not automatic — free migration is subject to terms and approval. And WebJi® is not Razorpay: the account, keys, KYC and payouts all live in your Razorpay dashboard, which we do not operate.
Frequently asked questions
How do I add Razorpay to WooCommerce?
Install the official Razorpay for WooCommerce plugin, open WooCommerce → Settings → Payments → Razorpay, paste the Key ID and Key Secret from the Razorpay dashboard, set the payment action to Authorize and Capture, and save. Webhooks configure themselves when the keys are saved on plugin version 3.5.0 or newer.
Should I start with test keys or live keys?
Start with test keys from the dashboard's Test Mode. A test order should show as Processing in WooCommerce and as captured in the test dashboard. Live keys only work after Razorpay finishes KYC and activates the business, so pasting them early just breaks checkout.
The payment is captured in Razorpay but the WooCommerce order is still pending. Why?
The status callback never reached the store. Confirm the webhook exists under Dashboard → Account & Settings → Webhooks with the payment.captured event, then use Razorpay's resend option on that event. The order should move to Processing with the payment id in its notes. If keys were regenerated, re-save them in the plugin so webhooks re-configure.
What does Razorpay charge per transaction on WooCommerce?
The plugin has no setup fee or monthly fee; Razorpay charges a percentage per successful payment that varies by method and account. The exact rate, including GST on the fee, is shown in your Razorpay dashboard and on their pricing page — not in the plugin settings.
Can I use Razorpay for subscriptions or membership renewals?
Not with the base payment plugin alone. Recurring charges need WooCommerce Subscriptions for the billing schedule plus Razorpay's subscription support — treated as a separate install from the standard gateway plugin. A membership plugin that bills one-time through WooCommerce, however, works with the plain gateway.
Last editorial update: 15 November 2026.
Ready to get started with WebJi®?
Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.