Àpèjúwe
AutoRenewly Subscriptions for Razorpay connects your WooCommerce store to Razorpay so you can take one-time payments and sell subscriptions that renew without anyone lifting a finger.
The plugin is built around WooCommerce Subscriptions. Each subscription is mirrored as a native Razorpay Subscription, Razorpay charges the customer on schedule, and signed webhooks keep WooCommerce in sync. Renewal orders are marked paid, failed payments put the subscription on hold, and cancellations, pauses and resumes flow both ways.
Without WooCommerce Subscriptions, the plugin works as a standard Razorpay gateway for regular WooCommerce products.
Recurring payments with WooCommerce Subscriptions
- Native Razorpay Subscriptions. Each WooCommerce subscription gets a Razorpay Plan, Customer and Subscription. These are created automatically at checkout, so you donÌtumọ̀ Yorùbá: ’t set anything up in the Razorpay Dashboard.
- Automatic renewals. Razorpay charges every billing cycle. When the
subscription.chargedwebhook arrives, the plugin marks the matching WooCommerce renewal order as paid and records the Razorpay payment ID. - Fixed-length and “until cancelled” subscriptions. Razorpay needs a fixed number of billing cycles, so open-ended subscriptions start with a long billing horizon that the plugin extends automatically before it runs out. Customers still see “until cancelled”.
- Free trials. The first recurring charge is scheduled for the day the trial ends.
- Sign-up fees. These are charged with the first payment as a Razorpay add-on.
- Daily, weekly, monthly and yearly billing, with any billing interval Razorpay accepts.
- Two-way status sync. Cancelling, suspending (on-hold) or reactivating a subscription in WooCommerce cancels, pauses or resumes it in Razorpay. Razorpay events such as activated, charged, pending, halted, paused, resumed, cancelled and completed update the WooCommerce subscription status.
- Failed-payment handling. A pending payment puts the subscription on hold while Razorpay retries. Once retries run out (halted), the renewal order is marked failed.
- Plan reuse. A Razorpay Plan is shared by every subscription with the same product, price, currency and billing schedule, so your Razorpay account doesnÌtumọ̀ Yorùbá: ’t fill up with duplicate plans.
- Custom pricing respected. The recurring amount comes from the order line item, so discounted or negotiated prices are billed correctly.
- Admin tools. Store managers can view and correct the stored Razorpay Subscription ID, Plan ID, Key ID and mode from the Edit Subscription screen.
- Cleaner price strings. A stray trailing “for” is removed from open-ended subscription prices on product, cart, checkout and account pages.
One-time payments
- Razorpay Checkout. A Razorpay Order is created for each WooCommerce order, and customers pay in the secure Razorpay Checkout window on the order-pay page.
- Every payment method enabled on your Razorpay account, including cards, UPI, netbanking and wallets.
- Verified server-side. Each paymentÌtumọ̀ Yorùbá: ’s Razorpay signature is checked before the order is marked paid.
- Retry-safe. If a customer comes back to pay later, the existing Razorpay order or subscription is reused, so nothing is duplicated.
Built for modern WooCommerce
- Works with both the block-based Cart & Checkout and the classic shortcode checkout.
- Compatible with HPOS (High-Performance Order Storage).
- Separate Test and Live API keys with a one-click mode switch. Each order keeps the keys it was created with, so switching modes never breaks open orders or active subscriptions.
- Your own brand logo in the Razorpay Checkout window, picked from the Media Library.
- Optional debug logging to WooCommerce Status Logs.
- Accepts 32 currencies: INR, USD, EUR, GBP, SGD, AUD, CAD, CHF, HKD, SEK, DKK, NOK, NZD, ZAR, MXN, BRL, PLN, CZK, HUF, ILS, MYR, PHP, THB, AED, SAR, QAR, LKR, NPR, BDT, MMK, CNY and TWD. Currencies your Razorpay account isnÌtumọ̀ Yorùbá: ’t enabled for will still be refused by Razorpay.
Security
- Webhooks are verified with HMAC-SHA256 using your Webhook Secret. Unsigned or tampered requests are rejected.
- Each webhook event is processed once, so Razorpay retries never record a renewal twice.
- Checkout callbacks are protected by a nonce, the order key and a Razorpay signature check.
- Card, UPI and bank details are entered directly into Razorpay. Your site never sees or stores them.
Requirements
- WordPress 6.7 or later
- PHP 8.0 or later
- WooCommerce 9.0 or later
- WooCommerce Subscriptions, for recurring payments (optional)
- A Razorpay account. For recurring payments, Razorpay Subscriptions must be enabled on the account.
External services
This plugin relies on Razorpay, a third-party payment service provided by Razorpay Software Private Limited, to process payments and recurring subscriptions. The plugin cannot take payments without it.
- Razorpay API (
https://api.razorpay.com/v1): when a customer places an order or signs up for a subscription, the plugin sends the order amount, currency, order number, subscription product name and billing schedule, and the customerÌtumọ̀ Yorùbá: ’s name, email address and phone number to create Razorpay orders, plans, customers and subscriptions. The API is also called to fetch or update subscription details, and to cancel, pause or resume a subscription when the store owner or customer changes its status. Requests are authenticated with the API keys you enter in the plugin settings. - Razorpay Checkout (
https://checkout.razorpay.com/v1/checkout.js): this script is loaded only on the order payment page to display the Razorpay payment window. Payment details (card, UPI, bank, etc.) are entered by the customer directly into Razorpay and are never sent to or stored by your site. - Webhooks: Razorpay sends payment and subscription event notifications to the webhook URL shown in the plugin settings. No data is sent from your site in this step.
Razorpay Terms of Service: https://razorpay.com/terms/
Razorpay Privacy Policy: https://razorpay.com/privacy/
This plugin is developed by Code and Core and is not affiliated with, endorsed by or sponsored by Razorpay.
Àwọn àwòrán ìbòjú





subscription.charged webhook.

Ìgbéwọlẹ̀
Install the plugin
- In your WordPress admin, go to Plugins Add New Plugin and search for “AutoRenewly Subscriptions for Razorpay”, or upload the plugin ZIP from Plugins Add New Plugin Upload Plugin.
- Click Activate. WooCommerce must already be installed and active.
Connect Razorpay
- Go to WooCommerce Settings Payments AutoRenewly Subscriptions for Razorpay, or click Settings under the plugin on the Plugins page.
- Tick Enable AutoRenewly Subscriptions for Razorpay.
- In the Razorpay Dashboard, open Account & Settings API Keys and generate a key pair. Paste the Key ID and Key Secret into the Test fields (test mode) or the Live fields (live mode).
- Optionally change the checkout Title and Description, and choose a Brand Logo.
- Click Save changes.
Set up the webhook (required for subscriptions)
- Copy the Webhook URL from the plugin settings. It looks like
https://example.com/?wc-api=autorenewly_razorpay. - In the Razorpay Dashboard, open Account & Settings Webhooks and click Add New Webhook.
- Paste the Webhook URL and choose a strong Secret.
- Enable these events:
subscription.authenticated,subscription.activated,subscription.charged,subscription.pending,subscription.halted,subscription.paused,subscription.resumed,subscription.cancelledandsubscription.completed. - Save the webhook, then paste the same secret into the pluginÌtumọ̀ Yorùbá: ’s Webhook Secret field and save.
Test mode and live mode have separate webhooks in Razorpay, so repeat these steps when you go live.
Go live
- Place a test order and a test subscription with RazorpayÌtumọ̀ Yorùbá: ’s test cards or UPI test IDs.
- Enter your live keys, set up the live webhook, untick Test Mode and save.
FAQ
-
Do I need WooCommerce Subscriptions?
-
Only for recurring payments. Without it, the plugin is a regular Razorpay gateway for one-time payments on simple, variable and other standard products. With WooCommerce Subscriptions active, subscription support switches on automatically.
-
Which Razorpay credentials do I need?
-
A Key ID and Key Secret for each mode you use (test and/or live), plus a Webhook Secret. Generate the keys under Account & Settings API Keys in the Razorpay Dashboard. You choose the Webhook Secret yourself when you create the webhook.
-
Why do I need to set up a webhook?
-
Razorpay, not WooCommerce, charges subscription renewals. The webhook is how Razorpay tells your store that a renewal was charged, is pending, has failed, or that the subscription was paused, resumed, cancelled or completed. Without it, renewal orders stay pending and subscription statuses wonÌtumọ̀ Yorùbá: ’t update. One-time payments are confirmed at checkout and donÌtumọ̀ Yorùbá: ’t need the webhook.
-
Which webhook events should I enable?
-
subscription.authenticated,
subscription.activated,subscription.charged,subscription.pending,subscription.halted,subscription.paused,subscription.resumed,subscription.cancelledandsubscription.completed. Other events are accepted and safely ignored. -
My host blocks query-string URLs. Is there another webhook URL?
-
Yes. The settings page also shows an alternative endpoint,
https://example.com/wp-admin/admin-post.php?action=autorenewly_webhook. Either URL works. -
How are renewals charged?
-
At sign-up, the customer authorises a Razorpay Subscription (for example a card mandate or UPI AutoPay). From then on, Razorpay charges each cycle automatically. When WooCommerce Subscriptions creates the renewal order, the plugin keeps it pending until Razorpay confirms the charge by webhook, then marks it paid.
-
What happens when a renewal payment fails?
-
When Razorpay reports the payment as pending, the subscription goes on hold while Razorpay retries. If Razorpay gives up (the subscription is halted), the renewal order is marked failed and the subscription stays on hold. The customer can pay the failed renewal order from their account, and the existing Razorpay subscription is reused, so no duplicate subscription is created.
-
How do “until cancelled” subscriptions work, given Razorpay needs a fixed number of cycles?
-
Open-ended subscriptions are created in Razorpay with a long billing horizon. As each charge comes in, the plugin extends the Razorpay subscription well before the horizon runs out. Customers keep seeing “until cancelled” and never need to resubscribe.
-
Are free trials and sign-up fees supported?
-
Yes. With a trial, the first recurring charge is scheduled for the end of the trial. A sign-up fee is added to the first payment as a Razorpay add-on.
-
What happens when a subscription is cancelled, suspended or reactivated?
-
Cancelling a subscription in WooCommerce, whether by the customer or the store manager, cancels it in Razorpay right away, so no further charges are made. Suspending it (on-hold) pauses the Razorpay subscription, and reactivating it resumes it. Changes made in the Razorpay Dashboard are synced back to WooCommerce by webhook.
-
Which subscription setups are supported?
-
To match what Razorpay Subscriptions accepts, the gateway is offered for a subscription cart when:
- the cart has exactly one subscription product, with quantity 1, and no other products
- the billing period is day, week, month or year, and daily billing has an interval of at least 7 days
- for fixed-length subscriptions, the length divides evenly by the billing interval (for example, every 2 months for 12 months)
If a cart doesnÌtumọ̀ Yorùbá: ’t meet these rules, the gateway is hidden at checkout so customers canÌtumọ̀ Yorùbá: ’t hit an error.
-
If I change a productÌtumọ̀ Yorùbá: ’s price, are existing subscribers charged the new price?
-
No. Existing Razorpay subscriptions keep billing at the plan they signed up with. New sign-ups at the new price automatically get a new Razorpay Plan.
-
Can customers change their payment method?
-
Razorpay doesnÌtumọ̀ Yorùbá: ’t let a payment instrument be swapped on an existing subscription. Store managers can view and correct the stored Razorpay subscription details from the Edit Subscription screen in WooCommerce.
-
Does it work with the block-based checkout?
-
Yes. It works with both the WooCommerce Cart & Checkout blocks and the classic shortcode checkout, and it is compatible with HPOS.
-
Which currencies are supported?
-
INR, USD, EUR, GBP, SGD, AUD, CAD, CHF, HKD, SEK, DKK, NOK, NZD, ZAR, MXN, BRL, PLN, CZK, HUF, ILS, MYR, PHP, THB, AED, SAR, QAR, LKR, NPR, BDT, MMK, CNY and TWD. The gateway is hidden for other store currencies. International currencies must also be enabled on your Razorpay account.
-
Why isnÌtumọ̀ Yorùbá: ’t the gateway showing at checkout?
-
Check that:
- the gateway is enabled
- API keys are entered for the active mode (test or live)
- the store currency is in the supported list
- the order total is above zero
- a subscription cart meets the rules above
-
Can I test before going live?
-
Yes. Test mode is on by default and uses your test API keys. Each order and subscription remembers the mode and Key ID it was created with, so test subscriptions keep working after you switch to live, and the other way round.
-
Where can I find logs?
-
Turn on Debug Log in the plugin settings, then go to WooCommerce Status Logs and pick the
autorenewly-subscriptions-for-razorpaysource. Order and subscription notes also record every Razorpay action and webhook event. -
Does the plugin store card or bank details?
-
No. Customers enter payment details directly into Razorpay Checkout. Your site only stores Razorpay reference IDs (order, payment, subscription, plan and customer IDs) on the WooCommerce order and subscription.
-
What happens to my data if I delete the plugin?
-
Your settings and the Razorpay references stored on orders and subscriptions are kept, so payment history stays intact if you reinstall.
-
Is this an official Razorpay plugin?
-
No. AutoRenewly is developed by Code and Core. It is not affiliated with, endorsed by or sponsored by Razorpay.
Àwọn àgbéyẹ̀wò
Kò sí àwọn àgbéyẹ̀wò fún plugin yìí.
Àwọn Olùkópa & Olùgbéejáde
“AutoRenewly Subscriptions for Razorpay” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa sí plugin yìí.
Àwọn OlùkópaTúmọ̀ “AutoRenewly Subscriptions for Razorpay” sí èdè rẹ.
Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?
Ṣàwárí koodu, ṣàyẹ̀wò ibi ìpamọ́ SVN, tàbí ṣe àgbékalẹ̀ sí àkọsílẹ̀ ìdàgbàsókè nípasẹ̀ RSS.
Àkọsílẹ̀ àwọn àyípadà
1.0.0
- Initial release.
- Razorpay payment gateway for WooCommerce one-time payments using Razorpay Orders and Checkout.
- WooCommerce Subscriptions support using native Razorpay Plans, Customers and Subscriptions.
- Automatic renewal recording, failed-payment handling and status sync via signed webhooks.
- Support for fixed-length and open-ended (“until cancelled”) subscriptions, free trials and sign-up fees.
- Cancel, suspend and reactivate subscriptions from WooCommerce, synced to Razorpay.
- Separate test and live API keys, with each order keeping the credentials it was created with.
- Custom brand logo in the Razorpay Checkout window.
- Block-based checkout and HPOS compatibility.
