A license key for every Razorpay payment
Connect a Razorpay webhook to Licers and every paid Payment Link, Checkout order or subscription charge creates a license key and emails it to the buyer. Renewals extend the key, a full refund revokes it, and your app checks the key with a signed answer. There is no code to write and no share of your sales.
Updated by the Licers team
Connect Razorpay
- In Licers, open Store & Portal, add a Razorpay connection and copy its endpoint URL.
- Press Make a secret and save it. Razorpay lets you choose the secret, so the same text goes into both.
- In Razorpay, open Account & Settings → Webhooks → Add New Webhook. Paste the URL and the secret.
- Select these events:
payment_link.paid,order.paid,subscription.charged,refund.processed. - Save. Razorpay asks for a one-time code; in Test Mode it is
754081. - Add a rule: which payment makes a key in which product, with how many devices and for how long.
What a rule can match
| You sell with | Match on | Example |
|---|---|---|
| Payment Links | The link’s id | plink_Pro1 |
| Subscriptions | The plan id | plan_Monthly |
| Checkout with the Orders API | A value your server puts in the order’s notes, or the receipt | notes: { licers_product: "pro" } → pro |
| Payment Pages and Buttons | The price in paise | amount:49900 for ₹499 |
| One product only | Leave the match empty | Every payment makes a key |
Only what your server or your Razorpay dashboard sets is matched. Notes a buyer could change in the browser are never used, so nobody can pay for Lite and get Pro.
Subscriptions and refunds
- The first
subscription.chargedcreates the key, valid until the end of the paid cycle plus your grace days (3 by default). Each next charge extends it. - A cancelled, halted or completed subscription changes nothing at once: the key runs until the end of the period that was paid, then expires.
- A full refund revokes the key. A partial refund keeps it.
- Razorpay may send an event twice or out of order; each is handled once, and a refund that arrives before its payment stops the key being made.
Your own server instead
Already handling Razorpay webhooks yourself? Call the API: create the key after the first payment and send extend_days on each renewal. See subscriptions from your own server.
Then check the key in your app
from pylicensify import LicenseClient, LicenseError, NetworkError client = LicenseClient( public_key="YOUR_PUBLIC_KEY", # safe to ship inside your app product_id="YOUR_PRODUCT_ID", # your product: refuses keys for your other products app_version="2.4.1", # shows in Analytics -> App versions)key = "XXXX-XXXX-XXXX-XXXX" # the customer's license key try: result = client.validate(key)except NetworkError: # Offline, or the server is down. That is not "unlicensed": try again, or # allow a few days since the last good check. raise SystemExit("Could not reach the license server. Please try again.")except LicenseError as e: # A forged or replayed answer, or a key for another of your products. raise SystemExit("License check failed: %s" % e) if not result: # Expired, revoked, device limit reached... the server says which. raise SystemExit("Not licensed: %s" % result.error) print("Licensed. Expires:", result.expires_at or "never")Using something else? See all eight SDKs, or the WordPress kit.
Questions and answers
Does Licers take a share of my sales?
No. Payments go to your own Razorpay account. Licers only receives Razorpay’s notifications.
Does it work with UPI?
Yes. Licers does not care how the customer paid: every captured payment of a matching link, order or plan makes a key.
How is the webhook checked?
Every delivery must carry Razorpay’s HMAC-SHA256 signature made with your secret, and events older than seven days are ignored.
Can I test it first?
Yes. Make a second connection for Razorpay’s Test Mode with its own webhook and secret.
What if the buyer has no email?
The key is created and shown in Store & Portal → Orders, but it cannot be emailed. Ask for an email on your Payment Link or checkout.
What does it cost?
Nothing today. Every feature is free and unlimited: products, keys, devices, validations, offline files and floating seats. See pricing.