Back

VibeFox Razorpay for WooCommerce — Help

Requirements

WordPress: 6.0 or later.

WooCommerce: 7.0 or later, installed and active. The plugin refuses to activate without it.

PHP: 8.0 or later.

Razorpay account: you need the Key ID and Key Secret of your Razorpay account for test mode, and for live mode once your account is activated. A webhook with a secret of your choice is strongly recommended (see Configuration). Payments in currencies other than INR need International Payments enabled on your Razorpay account.

VibeFox license key: bought on vibefox.net. One key works on one domain.

Installation

1. In WordPress go to Plugins > Add New > Upload Plugin, choose the plugin ZIP file and click Install Now. You can also upload the wcp_razorpay_payment folder to /wp-content/plugins/ by FTP.

2. Click Activate.

3. Open the settings: WooCommerce > Settings > Payments > Razorpay > Manage, or click Settings under the plugin name on the Plugins page.

4. Enter your VibeFox license key in the license block at the top of the page and click Activate.

5. Enter your Test Key ID and Test Key Secret, set up the webhook in the Razorpay Dashboard and enter its secret (see Configuration).

6. Turn on Enable/Disable and make a test payment with Test mode on. When you are ready, enter the Live keys and untick Test mode.

Configuration

All settings are on one page: WooCommerce > Settings > Payments > Razorpay. Above the fields the page shows notices: the keys of the current mode are missing (the payment method is then hidden at checkout), the Key ID does not start with rzp_test_ in test mode or rzp_live_ in live mode, test mode is on, the webhook secret is empty, or the store currency is not INR and needs International Payments on your Razorpay account. In the list of payment methods, Razorpay is marked as needing setup until the current mode has its keys, and a Test mode badge shows while test mode is on. Spaces pasted with the keys are removed when you save.

General

Enable/Disable: Enable Razorpay Payment Gateway turns the payment method on or off. Default: off.

Title: the payment method name customers see at checkout. Default: UPI, Cards, NetBanking.

Description: the text shown under the payment method at checkout. Default: Pay securely via UPI, Credit/Debit Card, or Internet Banking through Razorpay.

API keys

Get your keys in the Razorpay Dashboard under Account & Settings > API Keys. Switch the Dashboard to Test mode to generate test keys (rzp_test_...). Live keys (rzp_live_...) are available after your account is activated.

Test mode: Use the Test mode keys (no real money is charged). Default: on. Untick it to take real payments. Payments, captures and refunds of an order always use the keys of the mode in which the order was paid, so switching the mode later does not affect existing orders.

Test Key ID: the Key ID from the Razorpay Dashboard in Test mode. It starts with rzp_test_.

Test Key Secret: the Key Secret from the Razorpay Dashboard in Test mode.

Live Key ID: the Key ID from the Razorpay Dashboard in Live mode. It starts with rzp_live_.

Live Key Secret: the Key Secret from the Razorpay Dashboard in Live mode.

Payment

Payment Action: when the money is taken. Default: Authorize & Capture.

Authorize & Capture: the customer is charged immediately. If Razorpay reports an authorized payment, the plugin captures it.
Authorize Only: the money is reserved. The order is put On hold, and you capture the payment later with the order action Capture Razorpay payment or in the Razorpay Dashboard. Razorpay refunds authorized payments automatically if they are not captured in time.

Webhook

The webhook confirms payments even when the customer closes the browser right after paying, and records refunds made in the Razorpay Dashboard. In the Razorpay Dashboard go to Account & Settings > Webhooks and add a webhook in Test mode and another one in Live mode. Use the URL shown in this section of the settings. It looks like https://your-site/wc-api/razorpay_p_webhook/. Copy it exactly as the settings show it. Enter a secret of your choice in Razorpay and select these events:

payment.authorized: a payment was authorized.
payment.captured: a payment was captured, also when you capture it in the Razorpay Dashboard.
payment.failed: a payment attempt failed.
order.paid: the Razorpay order of the payment was paid.
refund.created: a payment was refunded, for example in the Razorpay Dashboard.

Webhook Secret: the secret you entered when creating the webhook. Use the same secret for the Test and the Live webhook, because the plugin has one field for both. Webhooks without a valid signature are rejected. Without the webhook, a payment is confirmed only when the customer returns from the popup or opens the order payment page again later.

Advanced

Enable Logging: Save debug logs. The log is in WooCommerce > Status > Logs, source wcp_razorpay_payment. Errors and warnings are always logged; this option adds the debug details. Keys, signatures and customer contact data are never logged. Default: off.

Delete Data on Uninstall: Remove the plugin settings and logs when the plugin is deleted (orders are never touched). Default: off.

Checkout

The customer chooses the payment method (by default UPI, Cards, NetBanking) and places the order. The plugin creates a Razorpay order for the exact order total and currency and opens the order payment page. The Razorpay Checkout popup opens there automatically, with the customer's name, e-mail and phone filled in. If the popup is closed, the customer can click Pay Now to open it again or Cancel order. In test mode the page shows Razorpay Test mode: no real money will be charged.

After a successful payment the plugin checks the Razorpay signature, fetches the payment from the Razorpay API and compares the amount and currency with the order. The order is marked paid only after Razorpay confirms it. The customer then sees the order received page. If the signature is valid but the payment cannot be fetched at that moment, the order is put On hold and the webhook confirms it later.

If the customer comes back to an unpaid order, the plugin reuses its Razorpay order. If that Razorpay order was already paid, for example because the customer closed the browser and there is no webhook, the plugin applies the payment instead of asking for a second one.

Messages the customer can see:

Payment was cancelled. Please click "Pay Now" to try again.
Your session has expired. Please click "Pay Now" to try again.
We could not verify your payment. The message adds that the order will be updated automatically once Razorpay confirms it if money was debited.
Razorpay is temporarily unavailable. Please try again in a few minutes.
Razorpay could not accept this payment: followed by the reason from Razorpay.
The order amount is too small to be paid with Razorpay.
Razorpay Checkout could not be loaded. The popup script is blocked; the message asks to check the connection, disable content blockers and reload the page.

The payment method works on the classic checkout, on the Checkout block and on the Pay for order page. It is compatible with WooCommerce High-Performance Order Storage (HPOS).

The plugin takes one-time payments only. It has no subscriptions or recurring payments, no saved cards, no Razorpay Magic Checkout, Payment Links or Route (split payments), and no offer or affordability widgets.

Orders and refunds

Order statuses

Pending payment: the Razorpay order was created and the customer has not paid yet. Each Razorpay order is added to the order notes with its amount and mode.

Processing or Completed: the payment was captured and confirmed, the WooCommerce default after payment. The order note shows the Razorpay payment ID, the amount and how it was confirmed (callback, webhook or check on return). The transaction ID is the Razorpay payment ID (pay_...).

On hold: set in these cases, each with an order note: the payment was only authorized (Authorize Only), the paid amount or currency did not match the order, the payment was captured for a cancelled order, or the payment could not be verified via the Razorpay API at that moment. An order that is already On hold still gets the note.

Failed: the payment.failed webhook arrived for a pending order. The note shows the Razorpay error. The customer can still pay again; an order that already has an authorized or captured payment is not changed.

Cancelled: the customer clicked Cancel order, or the order was cancelled by you or by the WooCommerce stock hold timeout. A payment that arrives later does not reopen it automatically: an authorized payment is not captured, and a captured payment puts the order On hold for your review.

If an additional payment arrives for an order that is already paid, the order is not changed. A note asks you to refund it in the Razorpay Dashboard if it is not intended.

Capture (Authorize Only)

Open the On hold order, choose Capture Razorpay payment in Order actions and click the update button. The payment is captured in the mode it was authorized in, and the order becomes paid. If Razorpay refuses, the order note shows Razorpay capture failed: with the reason. A capture made in the Razorpay Dashboard completes the order by the webhook.

Refunds

Open the order, click Refund, enter the amount and click Refund via followed by the payment method title. Full and partial refunds are supported. The refund is sent with the keys of the mode the payment was made in. If Razorpay does not accept the refund, WooCommerce shows Razorpay refund failed: with the reason, and no refund is recorded. A successful refund is added to the order notes with the Razorpay refund ID, amount and status.

Refunds made in the Razorpay Dashboard arrive by the webhook and are recorded on the order as WooCommerce refunds, once and without restocking items. A Dashboard refund in another currency or larger than the refundable amount is not recorded automatically; a note asks you to record it manually.

License key

The plugin works with a VibeFox license key from vibefox.net. The license block is at the top of WooCommerce > Settings > Payments > Razorpay. Paste the key into License key and click Activate. The block shows the status, for example the date the license is active until and your domain. Use Check now to check the status again, Change key to enter another key and Remove key to remove it from this site. The link Manage licenses and domains in your account opens your vibefox.net account.

One key works on one domain. Removing the key from a site does not free its domain slot. Free the slot in your vibefox.net account.

Without an active key, Razorpay is not shown to customers at checkout. If a payment is started anyway, the customer sees This payment method is not available. Please choose another one. Logged-in store managers still see the payment method, marked (unlicensed — visible to admins only), so you can set up and test the plugin before you buy a key. A reminder appears on the Plugins page and on WooCommerce pages. Existing orders are not affected: payments already started are still confirmed, and refunds work.

When a license expires, the plugin keeps working, but updates and support need a renewal. The status is checked again automatically in the background.

Troubleshooting

Razorpay does not appear at checkout: check that the license is active, Enable/Disable is on and the current mode has both keys: Test Key ID and Test Key Secret in test mode, Live Key ID and Live Key Secret in live mode. The settings page shows a notice when they are missing.

The payment went through, but the order stays Pending payment: the webhook is not working. In the Razorpay Dashboard check that the webhook exists in the mode you use (Test or Live), that its URL is exactly the one shown in the settings and that the five events are selected. Check that Webhook Secret is the same secret as in Razorpay. The order is also confirmed when the customer opens the order payment page again.

Webhook answers Webhook secret not configured: Webhook Secret is empty. Enter the secret of the Razorpay webhook. Razorpay delivers the event again later.

Webhook answers Invalid signature or Missing signature: the secret in the settings differs from the secret of the Razorpay webhook. Enter the same secret in both places.

Webhook answers Retry later: the plugin could not confirm a capture with the Razorpay API, or the order was being updated by another request at the same moment. Razorpay delivers the event again automatically.

An order is On hold: read the order note. The payment was only authorized (use Capture Razorpay payment), the amount or currency did not match the order, the payment arrived for a cancelled order, or it could not be verified via the Razorpay API at that moment and waits for the webhook.

The customer sees an error when paying: open the order notes, or look at WooCommerce > Status > Logs, source wcp_razorpay_payment. Errors are logged even with Enable Logging off. Wrong keys give the message that the payment method is not available right now. Other reasons from Razorpay are shown after Razorpay could not accept this payment:.

The popup does not open: the Razorpay Checkout script was blocked by a content blocker or the connection. The customer sees a message and can reload the page.

Refund fails: the refund uses the keys of the mode the payment was made in. Check that this mode's keys are set and read the reason in the error message.

The license block shows an error: follow the message in the block. For example, if the key is already used on another domain, free a slot in your vibefox.net account and click Check now. If the site address changed, click Check now to activate the key for the new domain. If the license server cannot be reached, the plugin keeps working on the last known status.

Uninstall

Deactivating the plugin keeps all data. To remove it, deactivate and delete it on the Plugins page. The license key and license status of this plugin are always removed. The gateway settings and the logs (log files, including rotated ones, and log entries in the database) are removed only if Delete Data on Uninstall was on. Otherwise they stay for a later re-install. Orders and their Razorpay data are never deleted. Existing orders keep their payment notes and transaction IDs.

Razorpay is a trademark of its respective owner. This plugin is not affiliated with or endorsed by Razorpay.