Razorpay is the easiest way to accept UPI, cards and netbanking in India. This guide gets you from a new account to verified payments: keys, an order created on your server, Razorpay Checkout in the browser, and a webhook that confirms the payment.
How the pieces fit
Your API creates an order with the amount (server-side, so the browser can't change the price).
The browser opens Razorpay Checkout with that order's id. The customer pays by UPI, card or netbanking.
Razorpay calls your webhook with order.paid . Your API checks the signature and marks the payment paid.
The browser's "payment succeeded" callback is only a hint for the UI. The signed webhook is the only thing you should trust.
1. Generate test keys
In the Razorpay Dashboard, switch to Test mode , then go to Account & Settings → API Keys (under Website and app settings ) and click Generate Key .
You get a Key ID (starts rzp_test_ , safe to send to the browser) and a Key Secret (server only).…