Payments & Fintech 11 min read

How to Apply for Razorpay Payment Gateway: Documents, KYC Approval and Integration Tutorial

Step-by-step: create a Razorpay account, prepare KYC documents and website policies, get activated, then integrate Orders API, Checkout and signature verification with webhooks — with working code.

Umer Hasan

Umer Hasan

Co-Founder & CTO at Zapprex

How to Apply for Razorpay Payment Gateway: Documents, KYC Approval and Integration Tutorial
Table of contents

What you need before applying

Razorpay lets you sign up and use test mode immediately, but live payments are enabled only after your account is activated through KYC. Most rejections and delays come from an incomplete website, so prepare it first.

  • Business PAN (or personal PAN for proprietorships and individuals).
  • Business proof: GST certificate, Udyam/MSME registration, shop and establishment licence, or incorporation documents depending on business type.
  • Bank account in the business name (current account for companies and LLPs) with a cancelled cheque or bank statement.
  • Identity and address proof of the authorised signatory or directors.
  • A live website or app showing your products or services and prices, with Contact Us, Terms and Conditions, Privacy Policy, Refund/Cancellation Policy and Shipping/Delivery Policy pages.

Tip: Use the same business name and address on your website, GST certificate and bank account. Mismatches are the most common reason for KYC queries.

At a glance: What you need before applying — Business PAN (or personal PAN for…, Business proof, Bank account in the business name (current…, Identity and address proof of the…
At a glance: What you need before applying

Applying and getting activated, step by step

Applying and getting activated, step by step: 6 steps
  1. 1

    Sign up: create an account on the Razorpay Dashboard with your business email and mobile number.

  2. 2

    Choose business type: proprietorship, partnership, private limited, LLP, trust or individual — this decides the documents asked.

  3. 3

    Fill business details: category, website or app URL, expected monthly volume and average ticket size.

  4. 4

    Upload KYC: PAN, business proof, bank details and signatory documents. Some business types complete video or Aadhaar-based verification.

  5. 5

    Respond to queries: the risk team may ask for clarifications or website changes; reply quickly with exactly what was asked.

  6. 6

    Activation: once approved, generate Live API keys from Account & Settings → API Keys and switch the integration from test to live.

How the payment flow works

Razorpay’s recommended flow has three parts. Your server creates an order, the browser opens Razorpay Checkout for that order, and your server verifies the result before marking the order paid. Amounts are always in the smallest currency unit — paise for INR, so ₹499 is 49900.

Server: create an order (Node.js, official razorpay package)javascript
import Razorpay from "razorpay"

const razorpay = new Razorpay({
  key_id: process.env.RAZORPAY_KEY_ID,
  key_secret: process.env.RAZORPAY_KEY_SECRET,  // never expose to the browser
})

app.post("/api/orders", async (req, res) => {
  const amount = priceFromDatabase(req.body.productId)   // never trust the client price
  const order = await razorpay.orders.create({
    amount: amount * 100,          // in paise
    currency: "INR",
    receipt: "rcpt_" + Date.now(),
  })
  res.json({ orderId: order.id, amount: order.amount, keyId: process.env.RAZORPAY_KEY_ID })
})

Open Checkout in the browser

Client: Razorpay Checkouthtml
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<script>
  async function pay() {
    const { orderId, amount, keyId } = await (await fetch("/api/orders", { method: "POST" })).json()
    const rzp = new Razorpay({
      key: keyId,
      order_id: orderId,
      amount,
      name: "Your Business",
      handler: (response) => fetch("/api/verify", {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify(response),   // payment_id, order_id, signature
      }),
    })
    rzp.open()
  }
</script>

Verify the signature and use webhooks

Never mark an order paid just because the browser says so. Verify the signature on your server: it is an HMAC-SHA256 of order_id + "|" + payment_id using your key secret.

  • Webhooks: add a webhook URL in the dashboard for events such as payment.captured, payment.failed and refund.processed, and verify the X-Razorpay-Signature header with your webhook secret.
  • Idempotency: the same webhook can arrive more than once — store processed event IDs and ignore duplicates.
  • Reconciliation: compare settlements with your orders daily using the Settlements API or dashboard reports.
Server: verify payment signaturejavascript
import crypto from "crypto"

app.post("/api/verify", (req, res) => {
  const { razorpay_order_id, razorpay_payment_id, razorpay_signature } = req.body
  const expected = crypto
    .createHmac("sha256", process.env.RAZORPAY_KEY_SECRET)
    .update(razorpay_order_id + "|" + razorpay_payment_id)
    .digest("hex")
  if (expected !== razorpay_signature) return res.status(400).json({ ok: false })
  markOrderPaid(razorpay_order_id, razorpay_payment_id)
  res.json({ ok: true })
})

Go-live checklist

  1. 1

    Test cards, UPI and failures: use Razorpay test mode to simulate success, failure and user cancellation.

  2. 2

    Swap keys: use Live keys from environment variables, never committed to code.

  3. 3

    Set up webhooks: on the live account with a new secret.

  4. 4

    Show clear receipts: order confirmation page, email or WhatsApp receipt and refund policy link.

Topics

RazorpayPayment Gateway IndiaRazorpay IntegrationUPI Payments
Umer Hasan
Written by

Umer Hasan

Co-Founder & CTO at Zapprex

Leads engineering, cloud infrastructure and AI automation at Zapprex Technologies, with 7+ years of full-stack and mobile experience.

FAQ

Questions readers ask

When documents and website policies are complete, activation often takes a few working days. Missing policies, name mismatches or restricted business categories can extend it.

Have a project in mind?

Let's build something that moves your business forward.

Share your idea, process or problem — we will come back with a clear plan, timeline and cost range. No technical spec needed.

  • Founder reply within 1 business day
  • NDA on request · 100% code ownership
  • Talk directly to the engineers