npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

razorpay-integration-guardrails

v1.21.0

Published

Integration guardrails for Razorpay APIs — India-specific rules for AI coding tools

Downloads

296

Readme

razorpay-integration-guardrails

31 India-specific rules for Razorpay APIs — for AI coding tools

Three rule types in one package:

  • 18 guardrails — stops AI from generating wrong patterns (wrong code → support tickets)
  • 8 workflow recipes — complete API + webhook sequences for common use cases (one-time payment, subscriptions, refunds, Route, UPI, NACH, payment links)
  • 5 product selectors — helps AI pick the right product for the developer's use case

Covers the most common integration mistakes that create support tickets — server-side verification, UPI PENDING state, AFA flows, NACH compliance, API key security, and more.

Install in 30 seconds

Node.js / npm:

npx razorpay-integration-guardrails install

Any language (Go, Python, Ruby, PHP, etc.) — no Node.js required:

curl -fsSL https://raw.githubusercontent.com/razorpay/integration-guardrails/main/install.sh | bash

Both scripts do the exact same thing — the shell version exists so developers on non-JS stacks don't need Node.js installed just to set up guardrails. Requires curl and jq.

Auto-detects your AI tool and installs to the right location:

  • Cursor.cursor/rules/razorpay-integration-guardrails.mdc
  • Claude Code.claude/razorpay-integration-guardrails.md
  • GitHub Copilot.github/copilot-instructions.md

What it fixes

| # | Rule | What it prevents | |---|------|-----------------| | RZP-001 | Verify payments server-side via webhook | Fraudulent orders marked as paid | | RZP-002 | Create order before payment | Amount tampering, capture failures | | RZP-003 | Capture with order_id + payment_id | Double-capture, wrong payment capture | | RZP-004 | Raw body for webhook signature | Signature validation always failing | | RZP-005 | UPI AutoPay AFA for >₹15K | Silent subscription failures | | RZP-006 | NACH 24h pre-debit notification | RBI/NPCI compliance violations | | RZP-007 | Handle UPI PENDING state | False payment failures, angry users | | RZP-008 | UPI Intent on mobile, QR on desktop | Poor UPI UX on wrong device | | RZP-009 | key_secret never in frontend | API key exposure, security incidents | | RZP-010 | Test vs live key separation | Real charges in dev, silent test failures in prod | | RZP-011 | Rotate on exposure | Prolonged key compromise | | RZP-012 | Official checkout.js CDN only | Stale SDK, missed security patches | | RZP-013 | Amount in paise (×100) | ₹500 charged as ₹5 | | RZP-014 | payment.failed handler required | Users stuck with no feedback | | RZP-015 | Handle subscription.halted | Users keep access despite failed billing | | RZP-016 | interval + period, not billing_cycle_anchor | Subscription schedule errors | | RZP-017 | Check Route enablement | Runtime 400 errors in production | | RZP-018 | Transfer after payment.captured only | Transfers from uncaptured payments |

Manual install

Cursor — add to .cursor/rules/razorpay-integration-guardrails.mdc:

See skills/index.json for the full rule set

Claude Code — reference in your CLAUDE.md:

@.claude/razorpay-integration-guardrails.md

GitHub Copilot — add to .github/copilot-instructions.md:

# Razorpay
Follow the rules in razorpay-integration-guardrails when generating Razorpay integration code.

Skills catalog

This package is auto-discoverable at:

https://razorpay.com/.well-known/skills/index.json

AI tools that support skills auto-discovery will pick up Razorpay guardrails automatically when a developer works on a Razorpay integration.

Contributing

Rule validation is critical — each rule is reviewed by Razorpay senior API engineers against real support ticket data.

See CONTRIBUTING.md for the rule authoring guide.


Built by Neha Singhal · Project Synapse P5.1 · Razorpay Developer UX & AI