razorpay-integration
Skill0 starsChanged 6 months agoApache-2.0View on GitHub
Integrate Razorpay payment gateway end-to-end. Activate when users mention Razorpay, payment gateway, checkout, order creation, payment verification, webhook handling, or switching to live keys.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- MaheshAwasare/claude-skills-protheir own version, first seen May 4, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- MaheshAwasare/claude-skills-pro★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- auto-mergeSkill
- auto-shipSkill
- backlog-burn-downSkill
- cloud-infra-plannerSkill
- daily-statusSkill
- decision-briefSkill
- deploy-shieldSkill
- eddSkill
- expo-build-and-sdk-upgrade-checkerSkill
- git-workflowSkill
- handle-reviewSkill
- hr-resume-screenerSkill
- img-prompt-genSkill
- instagram-carouselSkill
- integratekitSkill
- investor-deck-builderSkill
- investor-form-fillerSkill
- playwright-test-generationSkill
- qa-handoffSkill
- resume-hiring-managerSkill
- resume-recruiterSkill
- review-queueSkill
- safe-push-workflowSkill
- ship-issueSkill
- skill-fixerSkill
- skill-reviewerSkill
- tech-mentorSkill
- your-skill-nameSkill
- test-case-generatorSkill
- test-case-reviewerSkill
- test-scenario-planningSkill
- triage-issuesSkill
- ui-consistencySkill
- wp-maintenance-conductorSkill
- x-twitter-scraperSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
38 rules. About 0 are common, 35 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈35
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Do NOT activate when: the user is asking about a different payment provider (Stripe, PayPal, PayU) — those require different SDKs and flows
- Distinctive: line 58
Use Glob and Read tools to examine:
- Distinctive: line 66
Ask the user context-specific questions using AskUserQuestion:
- Distinctive: line 70
Do you need recurring payments/subscriptions?
- Distinctive: line 71
Should payment success trigger specific actions?
- Distinctive: line 72
Do you have test/staging environments?
- Very specific: line 78
Read references/payment-flow.md for the full ASCII diagram.
- Distinctive: line 87
Create database schema for orders, payments, transactions
- Distinctive: line 91
Add signature validation helper
- Very specific: line 95
Add Razorpay Checkout.js script
- Distinctive: line 96
Create checkout page/component
- Distinctive: line 99
Add loading states and error handling
- Distinctive: line 100
Create order confirmation page
- Distinctive: line 103
Never expose key_secret to frontend (server-side only)
- Distinctive: line 105
Use HTTPS in production
- Distinctive: line 111
Use Razorpay test mode credentials
- Distinctive: line 112
Test cards: 4111 1111 1111 1111 (success), 4000 0000 0000 0002 (failure)
- Distinctive: line 113
Test UPI: success@razorpay
- Distinctive: line 114
Test webhook events with Razorpay dashboard
- Distinctive: line 115
Verify signature validation logic
- Distinctive: line 116
Test failure scenarios (network errors, timeout, invalid signature)
- Distinctive: line 123
Add transaction receipts/invoices
- Distinctive: line 129
Create a summary document showing:
- Distinctive: line 161
Use TaskCreate to break down implementation into discrete tasks:
- Very specific: line 164
Add RAZORPAY_KEY_ID, RAZORPAY_KEY_SECRET, RAZORPAY_WEBHOOK_SECRET to .env
- Distinctive: line 168
Create orders table (id, user_id, razorpay_order_id, amount, currency, status, created_at)
- Distinctive: line 169
Create payments table (id, order_id, razorpay_payment_id, method, status, verified_at)
- Distinctive: line 174
Create Razorpay service/helper class
- Distinctive: line 183
Update order status, trigger fulfillment
- Distinctive: line 191
Add Razorpay script to HTML/layout
- Distinctive: line 192
Create checkout page with payment button
- Distinctive: line 206
Test with test credentials
- Distinctive: line 207
Verify all failure paths
- Distinctive: line 208
Test webhook locally (ngrok or similar)
- Distinctive: line 214
After implementation is complete, provide:
- Distinctive: line 251
Signatures are HMAC SHA256: - use proper crypto libraries
- Distinctive: line 252
Webhooks are async: - don't rely on them for immediate confirmation
- Distinctive: line 263
Test payment succeeds end-to-end
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Razorpay Payment Gateway Integration
Guide users through a complete Razorpay integration — from tech stack discovery and plan approval to backend order creation, payment verification, and webhook handling.
When to use
- Activate when: the user mentions Razorpay, payment gateway, or checkout flow
- Activate when: the user wants to integrate payments or accept money in their app
- Activate when: the user asks about order creation, payment verification, or webhook handling
- Activate when: the user wants to switch from Razorpay test keys to live keys
- Do NOT activate when: the user is asking about a different payment provider (Stripe, PayPal, PayU) — those require different SDKs and flows
Prerequisites
- A Razorpay account — test mode is free and sufficient to start
- Test API credentials:
key_idandkey_secretfrom the Razorpay dashboard - Access to both backend and frontend of the project codebase
- Database access to create orders and payments tables
- HTTPS configured in production (Razorpay requires it for live keys)
Steps
This skill runs in three phases: discovery, planning, and implementation. Do not write any code until the user explicitly approves the plan at the end of Phase 2.
Phase 1: Project Analysis & Discovery
Step 1: Detect Tech Stack
Analyze the codebase to identify:
- Backend framework: Laravel, Node.js, Express, NestJS, Django, Flask, etc.
- Frontend framework: React, Next.js, Vue, Angular, vanilla JS
- Database: MySQL, PostgreSQL, MongoDB, etc.
- Existing auth system: Session-based, JWT, Sanctum, Passport
- API pattern: REST, GraphQL
- Project type: E-commerce, SaaS, booking system, service marketplace
Use Glob and Read tools to examine:
package.json,composer.json,requirements.txt- Config files:
vite.config.*,next.config.*,config/*.php - Route files, API endpoints
- Database models/schemas
Step 2: Understand Business Flow
Ask the user context-specific questions using AskUserQuestion:
- What triggers payment? (Cart checkout, service booking, subscription, one-time purchase)
- What user data is available at checkout? (Email, phone, address)
- Are there multiple payment amounts or packages?
- Do you need recurring payments/subscriptions?
- Should payment success trigger specific actions? (Order fulfillment, service activation, notifications)
- Do you have test/staging environments?
Phase 2: Technical Roadmap Creation
Step 3: Generate Visual Payment Flow
Read references/payment-flow.md for the full ASCII diagram. Customize the labels to match the user's actual use case — their specific flow triggers, endpoint paths, and post-payment business actions — then share it with the user.
Step 4: Create Detailed Technical Plan
Present a structured implementation plan in markdown format:
A. Backend Setup
- Install Razorpay SDK (specific to detected framework)
- Configure environment variables (keys, webhook secret)
- Create database schema for orders, payments, transactions
- Implement Order Creation endpoint
- Implement Payment Verification endpoint
- Implement Webhook handler endpoint
- Add signature validation helper
- Create payment-related migrations
B. Frontend Setup
- Add Razorpay Checkout.js script
- Create checkout page/component
- Implement payment initialization logic
- Handle success/failure callbacks
- Add loading states and error handling
- Create order confirmation page
C. Security Measures
- Never expose key_secret to frontend (server-side only)
- Validate all webhook signatures
- Use HTTPS in production
- Implement CSRF protection on payment endpoints
- Store sensitive data encrypted
- Log all payment transactions for audit
D. Testing Strategy
- Use Razorpay test mode credentials
- Test cards: 4111 1111 1111 1111 (success), 4000 0000 0000 0002 (failure)
- Test UPI: success@razorpay
- Test webhook events with Razorpay dashboard
- Verify signature validation logic
- Test failure scenarios (network errors, timeout, invalid signature)
E. Production Checklist
- Replace test keys with live keys
- Enable webhook subscriptions in Razorpay dashboard
- Set up proper error monitoring
- Configure payment failure notifications
- Add transaction receipts/invoices
- Implement refund handling (if needed)
- Set up customer support flow for payment issues
Step 5: Present for Approval
Create a summary document showing:
- Detected Configuration: Framework versions, auth system, existing patterns
- Proposed Architecture: Files to create/modify with rationale
- Data Flow Diagram: The ASCII diagram above customized to their use case
- Implementation Timeline: Ordered task list
- Open Questions: Any clarifications needed before proceeding
Get explicit sign-off from the user before writing any code. Payment integrations touch databases, environment config, and real money — misaligned assumptions are expensive to unwind.
Ask user:
I've prepared a Razorpay integration plan tailored to your {PROJECT_TYPE} project.
Summary:
- Backend: {FRAMEWORK}
- Frontend: {FRAMEWORK}
- Payment trigger: {BUSINESS_FLOW}
- Estimated files to create: {COUNT}
- Estimated files to modify: {COUNT}
Please review the detailed flow diagram and technical plan above.
Would you like to:
1. Approve and proceed with implementation
2. Request modifications to the plan
3. Ask questions about specific stepsPhase 3: Implementation (Only After Approval)
Step 6: Execute Implementation
Use TaskCreate to break down implementation into discrete tasks:
- Backend: Environment Configuration
- Add RAZORPAY_KEY_ID, RAZORPAY_KEY_SECRET, RAZORPAY_WEBHOOK_SECRET to .env
- Update config files
- Backend: Database Schema
- Create orders table (id, user_id, razorpay_order_id, amount, currency, status, created_at)
- Create payments table (id, order_id, razorpay_payment_id, method, status, verified_at)
- Run migrations
- Backend: SDK Integration
- Install Razorpay SDK via package manager
- Create Razorpay service/helper class
- Backend: Create Order Endpoint
- Route + Controller for POST /api/orders/create
- Validate request, call Razorpay API, store order
- Backend: Payment Verification Endpoint
- Route + Controller for POST /api/payments/verify
- Signature validation logic
- Update order status, trigger fulfillment
- Backend: Webhook Handler
- Route for POST /api/webhooks/razorpay
- Signature validation
- Event processing (payment.captured, payment.failed, etc.)
- Frontend: Checkout Component
- Add Razorpay script to HTML/layout
- Create checkout page with payment button
- Initialize Razorpay with order details
- Frontend: Payment Handler
- Success callback implementation
- Failure handler
- Redirect logic
- Frontend: Order Confirmation Page
- Display order details
- Show payment status
- Download invoice/receipt option
- Testing & Verification
- Test with test credentials
- Verify all failure paths
- Test webhook locally (ngrok or similar)
Mark each task as completed after implementation and verification.
Step 7: Post-Implementation Guide
After implementation is complete, provide:
- Testing checklist: Step-by-step test scenarios
- Going live guide: Switching from test to live mode
- Monitoring setup: What to track (failed payments, signature mismatches)
- Common issues: Troubleshooting guide for typical problems
- Next steps: Optional enhancements (subscriptions, EMI, international payments)
Output
- Format: Implementation delivered as real code files, plus a final summary message in chat
- Location: Files written directly into the project codebase at paths agreed in the plan; summary appears inline in chat
- Contents of the final summary:
- List of all files created or modified (with paths)
- Environment variables to configure
- Step-by-step testing instructions using test credentials
- Production deployment checklist (switching to live keys, webhook setup)
Example
User says: "I want to add Razorpay payment to my Laravel + React app."
Claude does: Scans composer.json, route files, and models to detect the stack; asks 5–6 targeted questions about the business flow; generates a customized payment-flow diagram; presents a file-by-file implementation plan for approval; then — after the user approves — creates the orders/payments migrations, a RazorpayService class, two API controllers (order creation + payment verification), a webhook route with signature validation, and a React checkout component.
Result: A working end-to-end payment flow: the user can create an order, complete payment in the Razorpay checkout modal, and see the order marked as paid in the database — verified with a test card before going live.
Context-Specific Adaptations
Framework-specific integration notes (Laravel/Forge, Next.js, React SPA, Express/Node) live in
references/framework-adaptations.md. Read it once the tech stack is detected in Phase 1 to
tailor package choices, file locations, and patterns to the project.
Important Conventions
- Always use environment variables for keys - never hardcode
- Amounts are in paise (multiply by 100): ₹100 = 10000 paise
- Currency code: "INR" for Indian Rupees
- Order IDs must be unique per merchant
- Signatures are HMAC SHA256 - use proper crypto libraries
- Webhooks are async - don't rely on them for immediate confirmation
- Test mode vs Live mode - completely separate keys and dashboards
Skill Completion
The skill is considered complete when:
- Payment flow is documented and approved
- Backend order creation works
- Payment verification with signature validation works
- Webhook handler is implemented
- Frontend checkout flow is functional
- Test payment succeeds end-to-end
- User can demonstrate a complete payment cycle
Notes
- HTTPS is mandatory for Razorpay live keys — flag this early if the project isn't already set up for it
- For projects with existing data, recommend a database backup before running schema migrations
- Webhooks are asynchronous; do not rely on them for the immediate post-payment redirect — use the frontend callback for that, and webhooks for reconciliation
- Razorpay test mode and live mode use completely separate key pairs and dashboards — switching is a two-step change (env vars + dashboard webhook URL)
- Payment failures are user-facing; graceful error messages and retry flows matter as much as the happy path
ngrokor a similar tunnel is required to test webhooks locally — flag this during planning
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

