Razorpay

Keys, the webhook, and going live.

Razorpay takes the money. It is the one integration you cannot launch without.

Before you start

  1. Create an account at razorpay.com.
  2. Complete KYC — PAN, bank account, business proof. This is a review by humans and takes days, not minutes.
  3. 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

  1. Razorpay Dashboard → Settings → API Keys.
  2. Generate a key. You get a Key ID and a Key Secret.
  3. The secret is shown once. Copy it before closing the dialog.
  4. Test mode and Live mode have different keys. Note which you are using.

Entering them

Integrations → Razorpay:

FieldValue
Key IDFrom Settings → API Keys. Starts rzp_test_ or rzp_live_.
Key secretThe one shown once when you generated the key.
Webhook secretA 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.

  1. Razorpay Dashboard → Settings → Webhooks → Add New Webhook.
  2. Webhook URL: copy it from the Razorpay card in your store. It ends /webhooks/razorpay/.
  3. Secret: the exact same value you entered as "Webhook secret".
  4. Active events: tick at least payment.captured and payment.failed.
  5. Save.

Incoming webhooks are signature-verified against your secret before they are believed, so a forged callback cannot mark an order paid.

Testing properly

  1. While still in Test mode, place an order using Razorpay's test card numbers.
  2. Check the order appears as paid in your admin. If it stays pending, the webhook is not reaching you.
  3. Switch to Live keys once KYC is approved.
  4. 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.