Razorpay
Keys, the webhook, and going live.
Razorpay takes the money. It is the one integration you cannot launch without.
Before you start
- Create an account at razorpay.com.
- Complete KYC — PAN, bank account, business proof. This is a review by humans and takes days, not minutes.
- Until KYC is approved you can only use Test mode.
Start KYC on day one. It is the single most common reason a launch slips: everything else is ready and the payment account is still under review.
Getting your keys
- Razorpay Dashboard → Settings → API Keys.
- Generate a key. You get a Key ID and a Key Secret.
- The secret is shown once. Copy it before closing the dialog.
- Test mode and Live mode have different keys. Note which you are using.
Entering them
Integrations → Razorpay:
| Field | Value |
|---|---|
| Key ID | From Settings → API Keys. Starts rzp_test_ or rzp_live_. |
| Key secret | The one shown once when you generated the key. |
| Webhook secret | A secret you invent. You will paste the same value into Razorpay in the next step. |
Save, then press Test. It should pass before you go further.
The webhook — do not skip this
The webhook is what marks an order paid. The customer being redirected back after payment proves nothing — they might close the tab, or someone could forge the return. Without the webhook, people will pay and their orders will sit unpaid.
- Razorpay Dashboard → Settings → Webhooks → Add New Webhook.
- Webhook URL: copy it from the Razorpay card in your store. It ends
/webhooks/razorpay/. - Secret: the exact same value you entered as "Webhook secret".
- Active events: tick at least
payment.capturedandpayment.failed. - Save.
Incoming webhooks are signature-verified against your secret before they are believed, so a forged callback cannot mark an order paid.
Testing properly
- While still in Test mode, place an order using Razorpay's test card numbers.
- Check the order appears as paid in your admin. If it stays pending, the webhook is not reaching you.
- Switch to Live keys once KYC is approved.
- Place one real order with a real card and refund yourself. Test mode does not exercise the same path as live.
Going live
- Swap Test keys for Live keys in the integration.
- Add a separate webhook for Live mode in Razorpay — test and live webhooks are configured independently, and forgetting this is a classic launch-day failure.
- Enable the payment methods you want in Razorpay: UPI, cards, net banking, wallets. That is controlled on their side.
Settlement and refunds
Money settles from Razorpay to your bank on their schedule, typically T+2. Refunds are issued from their dashboard against the payment — then update the order in your store so both records agree.
Still stuck? Message us on WhatsApp — we would rather answer than have you guess.