Skip to content

Revenue attribution

Razorpay revenue attribution: connect Indian payments to the channel that earned them

If you sell in India, your money almost certainly arrives through Razorpay and your analytics almost certainly ignores it. Statsy connects the two: a small script records where each visitor came from, a signed Razorpay webhook reports each captured payment, and revenue shows up next to the search, post or campaign that earned it, in rupees.

Last updated

Razorpay revenue attribution in Statsy

How payments arrive
A signed webhook, verified from the X-Razorpay-Signature header with your webhook secret
Events used
payment.captured, subscription.charged for renewals, refund.processed and subscription.cancelled
How a payment is matched
The visitor id in notes[statsy_vid], then the payer’s email, then the customer id
Currency
Payments are recorded in the currency Razorpay reports, and sites owned from India report in rupees
Models
Last touch, first touch, linear, time decay and position based, with a 1 to 365 day lookback
Price
₹749 a month in India, billed in rupees through Razorpay, after a 14-day free trial

Why is Razorpay attribution so hard to find?

Almost every revenue analytics tool integrates Stripe first and stops there. Indian businesses that collect by UPI, netbanking or RuPay through Razorpay are left sending purchase events from the page, or pasting numbers into a spreadsheet each month. Statsy supports the Razorpay webhook directly.

The gap is not technical. Razorpay has a perfectly good webhook, signs it properly and lets you attach your own metadata to a payment. It is simply that most analytics products are built for a Western checkout stack and never get around to it.

That means an Indian SaaS or D2C founder usually knows total revenue and total traffic, but not which of the two has anything to do with the other. The question “did the YouTube review actually sell anything, or was it the newsletter?” goes unanswered for want of a webhook handler.

How does Statsy connect Razorpay payments to visits?

Razorpay notes carry the visitor across the checkout. Razorpay lets you attach a notes object of key-value pairs to a payment or order, and returns it in the webhook. Statsy reads statsy_vid from there, matches the payment to that visitor and credits the touches before it.

Notes through checkout

Razorpay documents notes on its order and payment entities as a set of key-value pairs, up to 15 pairs of at most 256 characters each, returned with the entity. For hosted payment pages on rzp.io, the Statsy script appends notes[statsy_vid] to the link automatically for visitors in Full mode. For Checkout opened from your own code, set the same key in the notes option.

The signed webhook

Razorpay states that the hash signature is “calculated using HMAC with SHA256 algorithm; with your webhook secret set as the key and the webhook request body as the message”, and sends it in the X-Razorpay-Signature header. Statsy recomputes it and compares in constant time before recording anything.

Four events are used. payment.captured records a payment, subscription.charged records a renewal, refund.processed records a refund as a negative amount, and subscription.cancelled marks the customer as churned. Amounts arrive in paise and are stored in the currency Razorpay reports.

How do you set it up?

Add the script, create one webhook in the Razorpay dashboard, paste its secret into Statsy and tag your campaign links. If your payment buttons point at hosted Razorpay payment pages, nothing else is needed; the visitor identifier is appended to the link when it is clicked.

  1. Add the Statsy script, about 3 KB gzipped, to every page of your site.
  2. In the site’s integrations, choose Razorpay and copy the webhook URL. In the Razorpay dashboard, add a webhook with that URL, select the four events above and set a secret.
  3. Paste that secret back into Statsy. It is encrypted at rest and never shown again.
  4. For Razorpay Checkout opened from your own JavaScript or created on your server, read statsy.visitorId() and pass it as notes.statsy_vid on the order or payment.
  5. Tag campaign links with UTM parameters, for example utm_source=newsletter&utm_campaign=diwali. Referrers need no tagging.

Razorpay references, checked September 2026: webhooks, validating webhooks and the orders entity.

What do the reports show in rupees?

Revenue, customers, conversions, refunds and net revenue by channel, source, campaign, referrer, landing page and individual post. Sites owned from India report in rupees, formatted in the Indian numbering system, so lakhs read as lakhs rather than as awkward thousands.

BreakdownWhat it answers
Channel and sourceWhich categories and specific sources produced paying customers
CampaignWhich tagged campaign earned the money, with refunds subtracted
Landing pageWhich entry page tends to start a buyer’s journey
PostsWhich exact post on X or LinkedIn sent visits, sign-ups and revenue, via its t.co or lnkd.in short link
Search queriesWhich Google queries earn, when Search Console is connected
Visitor journeysOne customer’s touches and payments in order, so you can check a model against reality

Payments in other currencies are recorded as Razorpay reports them and converted for the site’s reporting currency, so an international sale does not quietly become a rupee figure.

Does Statsy itself charge in rupees?

Yes. Customers in India pay in rupees through Razorpay by UPI, card or netbanking, and everyone else pays in US dollars through Lemon Squeezy. The currency is chosen from your country automatically, so an Indian founder never pays a conversion fee to buy analytics.

The Growth plan starts at ₹749 a month at 10,000 monthly events and both plans include every feature: revenue attribution, session replays, heatmaps, funnels, goals, journeys, the live visitor globe and the Posts breakdown. Growth covers up to five websites, Scale an unlimited number. Paying yearly charges for ten months. See pricing for the full ladder in rupees.

What will this not tell you?

Attribution is an estimate everywhere. Ad blockers, browser privacy settings and consent choices reduce what can be measured. Cookieless visitors are not linked across days, so their payments count toward revenue but reach a channel only through a match on email or customer id.

  • Payments collected over a phone call, a QR code in a shop or a payment link shared on WhatsApp have no website visit to attribute.
  • Statsy reads no ad spend, so it reports revenue and refunds but never return on ad spend.
  • Settlements, fees and GST are Razorpay’s business; Statsy records the payment amount as the webhook reports it.
  • Models are rules, not proof of cause. Compare two models and read a few real journeys before moving budget.

Razorpay revenue attribution FAQ

Does Statsy need my Razorpay API keys?

No. Statsy only receives webhooks and verifies them against the webhook secret you paste in. It holds no API key, so it cannot read your account, create payments or issue refunds on your behalf.

Does it work with UPI and netbanking payments?

Yes. The payment method does not matter. Statsy reads the payment.captured webhook, which Razorpay sends for UPI, cards, netbanking and wallets alike, and credits the visit that led to it.

Are Razorpay Subscriptions supported?

Yes. A subscription.charged event is recorded as a renewal and credited to the same customer, and subscription.cancelled marks that customer as churned so your reports stop counting them as active.

Can I see revenue in rupees?

Yes. A site owned from India reports in rupees and formats amounts in the Indian numbering system. Payments in other currencies are converted for the report but recorded as Razorpay sent them.

Can I pay for Statsy in rupees?

Yes. Indian customers are billed in rupees through Razorpay by UPI, card or netbanking, starting at ₹749 a month after the 14-day trial. Everyone else pays in dollars through Lemon Squeezy.

Can I connect Razorpay and Stripe at once?

Yes. A site can connect several providers, each with its own webhook URL and secret, and payments from all of them land in the same revenue and attribution reports without any extra configuration.
Razorpay revenue attribution · Statsy