Building Your App › Integrations
Razorpay Integration
Accept payments in India with Razorpay
What is Razorpay?
Razorpay is India's leading payment gateway. It supports UPI, cards, wallets, net banking, and 100+ payment methods popular in India.
Perfect for:
- E-commerce in India
- Accepting payments in INR
- UPI payments (PhonePe, Google Pay, etc.)
- Indian credit/debit cards
- Subscriptions and recurring billing
What You'll Need
Razorpay Account
Sign up at razorpay.com
Business Verification
Complete KYC (for live payments)
API Keys
Get your test keys to start
10 Minutes
Quick to get started!
Tip
Here's a helpful video to get you started.
Step 1: Get Your Razorpay Keys
Create Account
- Go to razorpay.com
- Click Sign Up
- Enter business details
- Verify email and phone
Get Test Keys (For Development)
- Login to Razorpay Dashboard
- Make sure you're in Test Mode (toggle at top)
- Go to Settings → API Keys
- Click Generate Test Key
- Copy both keys:
Key ID
Starts with: rzp_test_
Example: rzp_test_1A2B3C4D5E6F
Safe to use in frontend
Key Secret
Random string
Keep secret! Backend only
Example: abcdef123456
Step 2: Tell the Agent What You Want
Describe your payment needs:
Example 1: Basic Payment Gateway
I need to accept payments with Razorpay for Indian customers.
Razorpay credentials:
- Key ID: rzp_test_xxxxx
- Key Secret: xxxxx
What I'm selling:
- Product 1: ₹999
- Product 2: ₹1,499
- Product 3: ₹2,999
Payment methods needed:
- UPI (PhonePe, Google Pay, etc.)
- Credit/Debit cards
- Net banking
- Wallets (Paytm, PhonePe, etc.)
Please set this up.
Example 2: Subscription Billing
I need Razorpay for monthly subscriptions.
Razorpay credentials:
- Key ID: rzp_test_xxxxx
- Key Secret: xxxxx
Subscription plans:
- Basic: ₹299/month
- Pro: ₹999/month
- Premium: ₹2,999/month
Features:
- Auto-recurring charges
- Cancel anytime
- Upgrade/downgrade plans
- Retry failed payments
Please build this.
Example 3: E-commerce Checkout
Integrate Razorpay for my online store.
Razorpay credentials:
- Key ID: rzp_test_xxxxx
- Key Secret: xxxxx
Checkout flow:
1. User adds items to cart
2. Goes to checkout
3. Sees Razorpay payment options
4. Pays with UPI/card/wallet
5. Gets order confirmation
Features:
- Save payment methods
- Order tracking
- Email receipts
Please set this up.
Tip
**That's it - **The agent will create the payment flow, handle webhooks, everything.
Step 3: Test Payments
After setup:
Click Preview
In Emergent, click Preview
Add Item to Cart
Or go to whatever triggers payment
Click Pay
Should see Razorpay payment modal
Use Test Card
Card: 4111 1111 1111 1111
CVV: Any 3 digits
Expiry: Any future date
Complete Payment
Payment should succeed!
Check Dashboard
See payment in Razorpay dashboard
Test Payment Methods
Step 4: Go Live (Accept Real Payments)
Complete KYC Verification
Submit Documents
In Razorpay Dashboard → Account Settings
Upload:
- PAN card
- Business documents
- Bank account details
- Identity proof
Wait for Approval
Usually takes 24-48 hours
Get Live Keys
Once approved, switch to Live Mode
Generate live API keys
Update App
Tell the agent:
Switch to live Razorpay keys:
- Key ID: rzp_live_xxxxx
- Key Secret: xxxxx
Test Real Payment
Make a small real payment to verify
Common Questions
Standard rates (India):
2% + ₹2 per transaction
Examples:
- ₹100 sale = You get ₹96
- ₹1,000 sale = You get ₹978
- ₹10,000 sale = You get ₹9,798
No setup fees or monthly charges!
T+3 settlement (3 business days after payment)
Money goes directly to your bank account.
You can see pending settlements in dashboard.
Tell the agent:
I need to be able to refund payments.
Add a refund feature where I can:
- View all payments
- Issue full refund
- Issue partial refund
Yes! Razorpay Route allows this. Tell the agent:
I need to split payments:
- 80% to seller
- 20% platform fee to me
Set up Razorpay Route.
Something Not Working?
Payment Modal Not Opening
Tell the agent:
When I click "Pay Now", nothing happens.
Can you debug the Razorpay integration?
Payment Succeeds But Order Not Created
Tell the agent:
Payment goes through but order isn't created.
Can you check the webhook handling?
Wrong Amount Charged
Tell the agent:
The payment amount is wrong.
Should charge ₹999 but charging different amount.
Can you fix this?
Real Examples
Example 1: Course Platform
I'm selling online courses.
Razorpay credentials: [will provide]
Courses:
- Beginner: ₹2,999
- Intermediate: ₹4,999
- Advanced: ₹7,999
Features:
- One-time payment
- Instant access after payment
- Payment confirmation email
- Invoice generation
Please set this up.
Example 2: Food Delivery App
Integrate Razorpay for food orders.
Razorpay credentials: [will provide]
Payment flow:
1. Customer places order
2. Sees total with delivery fee
3. Pays via UPI/card
4. Order confirmed to restaurant
Features:
- COD option toggle
- Apply coupon codes
- Save payment methods
Please build this.
Quick Checklist
Before going live:
- Tested with test card
- Tested UPI payment
- Payment appears in Razorpay dashboard
- Order is created correctly
- Customer gets confirmation
- Completed KYC verification
- Switched to live keys
- Made a real test payment
Remember
Perfect for India - Supports all popular payment methods
Simple pricing - 2% + ₹2 per transaction
Test mode first - Use test keys for development
KYC required - For accepting real payments
Quick settlements - Money in 3 business days
Info
Stuck? Tell the agent: "I need help with Razorpay payments" and describe the issue.
