Razorpay subscriptions and payments, after Razorpay's fees

Connect your Razorpay Key ID and Key Secret. Sumly reads subscriptions priced by their plans, captured payments with Razorpay's fee, and refunds.

Drawn with example numbers.

Connected in three steps

A key pasted once. Razorpay keys cannot be limited to reading; Sumly only reads with it.

  1. 1

    In Razorpay (as an Owner or Admin): Account & Settings → API Keys → Generate Key, in Live mode.

  2. 2

    Razorpay keys cannot be limited to reading. Sumly only reads payments, refunds, subscriptions and plans with it, and keeps it encrypted.

  3. 3

    Paste the Key ID and the Key Secret below.

  4. 4

    To trace payments to visits, put sumly_visitor_id: sumly.visitorId in the notes of the order or subscription you create.

Or let your coding assistant do it

Paste this into Claude Code, Cursor or Codex in your project. It fits the code to how your project is built, asks you for the dashboard steps and leaves the keys to you.

See what it says
Set up Razorpay for Sumly in this project.

Sumly (https://sumly.dev) shows revenue next to the visits and app users it came from. The full guide is https://sumly.dev/integrations/razorpay; read it if anything below is unclear.

Steps:
1. In Razorpay (as an Owner or Admin): Account & Settings → API Keys → Generate Key, in Live mode.
2. Razorpay keys cannot be limited to reading. Sumly only reads payments, refunds, subscriptions and plans with it, and keeps it encrypted.
3. Paste the Key ID and the Key Secret into Sumly.
4. To trace payments to visits, put `sumly_visitor_id: sumly.visitorId` in the `notes` of the order or subscription you create.

So each payment shows which visit it came from: Put sumly_visitor_id, set to the sumly_vid cookie, in the notes of the order or subscription you create; Razorpay keeps notes on the payment. Each payment then counts for the source, campaign and country of the visit that started it. In the EU and UK there is a visitor only after they agree.

Keep in mind: Built from Razorpay's API reference and checked against responses shaped like it, not yet against a live Razorpay account. Tell us if a number looks off. Razorpay gives merchants no read-only key; Sumly only reads with it and keeps it encrypted. Razorpay is not the merchant of record and reports no sales tax, so a payment counts what the buyer paid. Payments carry no country. Razorpay has no balance to read, and keeps no time for a pause.

How to work:
- Look at how this project is built first, and fit the code to its framework and its way of doing things; the examples above are a starting point, not something to paste as is.
- Steps that happen in a dashboard (Sumly, or Razorpay's own) are mine: tell me exactly what to click, then wait for me.
- The Razorpay key goes into Sumly (Projects and payments), not into this project: Sumly reads Razorpay itself. Your part in the code is only carrying the visitor into checkout, as above.
- Keys the code needs belong in environment variables, never in the code or the repository. Never ask me to paste a secret key into this chat; tell me which variable to set.
- Change only what this needs, show me the changes before you commit, and tell me how to check that it works.

What you see after connecting

Razorpay next to every other project and provider, on the same pages.

Overview

MRR, ARR, revenue per customer, paying customers and trials.

Payments after Razorpay's fee, with the buyer's e-mail.

Metrics over time, with churn, LTV and quick ratio.

Plans by name, customers, the outlook and a CSV export.

With the visitor in the notes

Revenue by source and campaign, and ROI for each cost.

Which visit paid

Put sumly_visitor_id, set to the sumly_vid cookie, in the notes of the order or subscription you create; Razorpay keeps notes on the payment. Each payment then counts for the source, campaign and country of the visit that started it. In the EU and UK there is a visitor only after they agree.

How attribution works →

Counts toward your plan

Nothing: payments, customers and refunds never count toward your plan. Only the page views and app screens Sumly keeps do. Plans →

The details

What Sumly reads
  • Subscriptions with their plan, quantity and status
  • Captured payments with Razorpay's fee (GST on the fee included)
  • Processed refunds
  • Each payment and subscription change the moment it happens, by webhook
When Sumly reads Razorpay
  • Every 15 minutes, together with the other connections of the project. The first read takes three years of payments.
  • Subscriptions are read whole each time, each plan once for its price.
  • Payments and refunds from shortly before the newest one kept; refunds by their own date, so a refund of an older payment is found too.
  • With the webhook added, each payment and subscription is read again from Razorpay the moment it changes.
How Razorpay money is counted
Monthly value
The plan's amount times the quantity, spread over its period: weekly 52 ÷ 12, quarterly a third, yearly a twelfth.
Trials
An authenticated subscription whose first charge is set for later counts from that day.
Cancellations
A cancelled or completed subscription stops on the day it ended. A halted one (its retries ran out) stops from the start of its current cycle.
Pending
A subscription whose charge failed still counts while Razorpay retries, as past due.
Tax
Razorpay is not the merchant of record and reports no sales tax. Payments count what was paid.
Fees
Razorpay's fee on each payment, with the GST on it. Net revenue is after it.
Refunds
Each processed refund comes off on the day it was made.
Currency
Payments in rupees (or the currency the buyer paid), turned into euros at the ECB rate of that day. MRR converts at today's rate.
Good to know
  • Built from Razorpay's API reference and checked against responses shaped like it, not yet against a live Razorpay account. Tell us if a number looks off.
  • Razorpay gives merchants no read-only key; Sumly only reads with it and keeps it encrypted.
  • Razorpay is not the merchant of record and reports no sales tax, so a payment counts what the buyer paid. Payments carry no country.
  • Razorpay has no balance to read, and keeps no time for a pause.

Razorpay questions

Can Sumly change anything in Razorpay?

Razorpay keys cannot be limited to reading, but Sumly only reads with it. You can regenerate the key at any time to cut Sumly off.

Do I need the webhook?

No. Sumly reads Razorpay every 15 minutes either way. With the webhook, payments show up within seconds.

Which secret do I give the webhook?

Any; Razorpay asks for one, Sumly does not need it. The address holds a secret of its own, and Sumly reads the payment again from Razorpay.

Does Sumly read test mode?

A test Key ID and Secret read test mode.

Why are there no countries?

Razorpay's payments carry no country, only whether the card was international.

Other integrations

Try it with your own projects

Sign in with Google or a code by e-mail and connect your first project. Free for one project, and 14 days of a paid plan with no card.

Start free

Or look around first: open the live demo.