Documentation index for AI agents (llms.txt)
Skip to main content

Razorpay

Take payments in India with UPI, cards, netbanking and wallets through Razorpay Checkout. Money goes straight to your Razorpay account.

Connect​

Razorpay connects with your Key ID and Key Secret.

  1. Open Settings > Connectors, click Razorpay, then Connect.
  2. Razorpay's API Keys page opens, under Account & Settings. Click Generate Key.
  3. Copy the Key ID, then the Key Secret. Each is picked up when you come back to WebTwizz, then checked with Razorpay and connected. You can also paste them into the fields yourself.

Test keys, starting rzp_test_, take test payments only. Live keys take real payments once Razorpay activates your account.

Then ask the AI for what you need, like "add a Pay now button for the ₹499 workshop".

What you see​

  • Payments, last 30 days: what came in after refunds (Collected) and how many payments, then your latest payments with what they were for, how they were paid and when. A tag shows when one is partly refunded, or isn't captured, like Failed or Refunded. In test mode the heading says so. Refund on a captured payment opens an amount field in place, filled with all that's left on it: lower it to refund part. The line under it says how much goes back to whom, and that it reaches them in 5 to 7 working days, or with test keys that no real money moves. Confirm with Refund and the amount. Show more loads ten older ones. Each row opens in Razorpay, and All payments opens your payments.
  • Disputes: shown when a customer disputes a payment and Razorpay is waiting on your reply, with the amount, the reply-by date and the reason. Respond on Razorpay opens it. All disputes opens Razorpay.
  • Settlements: your latest settlements to the bank with their date, fees and UTR, and a tag while one is on the way or if it failed. All settlements opens Razorpay. It shows when your keys can read settlements.
  • Payment links: shown once you have an open payment link, with what it's for, its price and its short link, and Partly paid when some of it is paid. Copy link copies it. Cancel link asks first, then the link stops taking payments for good. Show more loads ten more. All links opens Razorpay.
  • Account: the Key ID, with Test keys or Live keys.
  • Settings:
    • Webhook: the address that tells your site about each payment, with a copy button. Add it in Razorpay under Accounts & Settings > Webhooks, for payments and refunds. It shows After you publish until the site is live.
    • Webhook secret: paste it into Razorpay with the webhook, so your site knows the events are real. It shows once the site is published.
  • Open Razorpay, at the top next to the name, opens your payments.

What the AI can do​

  • Build checkout into your site: the order is created on the server, Razorpay Checkout takes the payment, and the order is confirmed on the server before anything is fulfilled
  • Read your payments and what they collected, for any period up to 90 days
  • Make a payment link to share. It asks first.
  • Refund a payment, in full or in part. It asks first.

Secrets​

  • NEXT_PUBLIC_RAZORPAY_KEY_ID: your Key ID, safe to use in the browser
  • RAZORPAY_KEY_ID: the same Key ID, for server code
  • RAZORPAY_KEY_SECRET: your Key Secret, server-side only
  • RAZORPAY_WEBHOOK_SECRET: checks that payment events really come from Razorpay, server-side only

Good to know​

  • Razorpay makes a new Key ID with every new secret, so there's no Replace key. To switch keys, connect the new pair as another account, then switch the project to it under Account.
  • Until you add the webhook in Razorpay, your site only hears about a payment when the buyer comes back to it.
  • Removing Razorpay from a project takes its secrets out. Your Razorpay account and payments are untouched.