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:
- Switch to Live mode, then open Account and Settings, then API keys. You need the Owner or Admin role.
- Copy the key ID, and the key secret you saved when you created it.
- 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.
- Keep the key active so CrispStats can keep reading payments.
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
See pass the visitor id at checkout below.
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 withrzp_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 fromcrispstats.id() to the order’s notes as crispstats_visitor_id. For a subscription, put it in the subscription’s notes:
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.