Set up Razorpay
Razorpay takes UPI, cards, net banking and wallets. You need your own Razorpay account; payments go straight to it.
1. Get your keys from Razorpay
- Sign up at razorpay.com and complete their verification (KYC). Until it's done you can only use Test Mode.
- In the Razorpay Dashboard, open Account & Settings → API Keys and generate a key. Copy the Key ID and Key Secret (the secret is shown only once; keep it safe).
- Test Mode and Live Mode have different keys. Start with Test Mode.
2. Add Razorpay in CartWhizz
- Open Finance → Payments and click New Payment Method.
- Name: what shoppers see, for example "UPI, Cards & Net Banking". Add a short Description.
- Under How will this method be processed? choose Payment Gateway, then choose Razorpay.
- Paste the Key ID and Key Secret.
- Environment: Test (sandbox) for test keys.
- Leave Webhook Secret for now; you'll set it in the next step.
- Set Status to Active and save.
3. Add the webhook
The webhook lets an order be marked paid even if the shopper closes the page before returning to your store.
- Copy the Webhook URL shown on the payment method's page.
- In the Razorpay Dashboard, open Account & Settings → Webhooks and click Add New Webhook.
- Paste the URL, and type a Secret of your own (any long random text).
- Tick these events: payment.authorized, payment.captured, payment.failed, order.paid and refund.processed.
- Save, then go back to CartWhizz and paste the same text into Webhook Secret. Save.
4. Test, then go live
- Place a test order on your store with Razorpay's test card or test UPI ID (from Razorpay's documentation).
- Check the order shows as paid in Orders.
- When it works, generate Live Mode keys in Razorpay, replace the Key ID and Key Secret, change Environment to Live (production), and add a live-mode webhook the same way (with its own secret).
Good to know
- Authorized payments are captured automatically, then the order moves on to fulfilment.
- If a payment attempt fails, the order stays open so the shopper can pay again.
- Refunds you make from the order page go back through Razorpay. See Refunds and cancellations.
- Your keys are stored encrypted.
- Razorpay's own fees are charged by Razorpay.
Not working? Check that the keys and Environment match (test keys with Test, live keys with Live), and that the webhook secret is the same in both places.