A minimal Razorpay integration deployed on Vercel.
- Clone this repository
- Install dependencies:
npm install - Set up environment variables in Vercel dashboard:
RAZORPAY_KEY_ID: Your Razorpay Key IDRAZORPAY_KEY_SECRET: Your Razorpay Key Secret
- Health check endpoint
- Returns app status
- Creates a new Razorpay order
- Body:
{ "amount": 100, "currency": "INR" } - Returns order details with order_id
- Verifies payment signature
- Body:
{ "razorpay_order_id": "...", "razorpay_payment_id": "...", "razorpay_signature": "..." } - Returns verification status
- Simple health check
- Create
.envfile with your Razorpay credentials - Run
npm run dev - Server will start on port 3000
- Connect your GitHub repo to Vercel
- Add environment variables in Vercel dashboard
- Deploy
Set these in your Vercel deployment dashboard:
RAZORPAY_KEY_ID: Your Razorpay Key IDRAZORPAY_KEY_SECRET: Your Razorpay Key Secret