Skip to main content
Connect Razorpay by pasting your live key ID and key secret. CrispStats imports your past payments and refunds, then reads new ones from Razorpay every 2 minutes. Put the visitor id in the order’s or subscription’s notes and each payment is tied to the visit that led to it.

What is recorded

Only captured payments count. Every payment is read from Razorpay’s API with your key, so each one is verified. Amounts are in the currency’s smallest unit (49900 is ₹499.00). Each payment is stored under its payment id (pay_…) and each refund under its refund id (rfnd_…).

Connect Razorpay

1

Open the Razorpay panel

In CrispStats, open the site’s Settings, then Integrations. Select Connect a payment provider and choose Razorpay.
2

Find your key

Under Razorpay key ID, select Open API keys in Razorpay. Then:
  1. Switch to Live mode, then open Account and Settings, then API keys. You need the Owner or Admin role.
  2. Copy the key ID, and the key secret you saved when you created it.
  3. If you no longer have the secret, generate a new one. Choose to keep the old key for 24 hours if Razorpay offers it, and update your checkout before then.
  4. Keep the key active so CrispStats can keep reading payments.
If the link does not open the API keys page, use the menu path in step 1.
3

Paste the key ID and secret

Paste the key ID into Razorpay key ID and the secret into Razorpay key secret. CrispStats checks them with Razorpay at once.
4

Connect

Select Connect Razorpay. The row shows Connected. Checks Razorpay every 2 minutes.
5

Pass the visitor id at checkout

If Razorpay refuses the pair, the panel says “Razorpay did not accept this key ID and secret. Check both are from Live mode and copied in full.” A key ID pasted into the secret field is refused with a message saying which field it belongs in.

What the key can do

Razorpay keys cannot be limited: they can do anything your account can through the API, including refunds. CrispStats only reads payments and refunds with them. The secret is stored encrypted, used only on CrispStats’ servers with Razorpay’s API, and never shown again. The key ID is not secret: Razorpay shows it in your checkout pages.

How fresh the numbers are

Razorpay does not let an account’s own keys create a webhook, so CrispStats reads new payments and refunds every 2 minutes. A sale appears within 2 minutes. Razorpay lists payments by when they were created. A payment created earlier and captured later is caught because each check looks 30 minutes further back, and a daily check reads the last 48 hours again. A payment seen twice is stored once.

Past payments

When you connect, CrispStats imports every captured payment and processed refund since your first. See revenue history.

Test mode

A key ID that starts with rzp_test_ connects in test mode. The panel says “This is a test key. Test payments show with a Test tag and never count as verified revenue.” and offers Connect in test mode or Use a live key.

Pass the visitor id at checkout

Add the id from crispstats.id() to the order’s notes as crispstats_visitor_id. For a subscription, put it in the subscription’s notes:
The notes of the payment, its order, its subscription or invoice, and the refund are all read. A payment without a visitor id is still recorded and counted, without a visit.

Disconnect

Select Disconnect on the Razorpay row. CrispStats stops reading payments and destroys the saved secret. Payments already recorded stay. CrispStats created nothing in your Razorpay account, so there is nothing to delete there. You can regenerate the key in Razorpay if you no longer want it to work.
Connections made earlier with a webhook you added in Razorpay keep working. They cannot import history or verify payments: connect again with your key ID and secret to add both. A payment seen by the webhook and by a check is stored once.

Next steps

Pass the visitor id

When there is no id, and attributing across days.

Refunds and renewals

How payment kinds are recorded across providers.

Revenue history

What the import reads and how it avoids counting twice.
Last modified on November 24, 2026