subscription

subscription is a skill for Claude Code from Venkateshwar-Reddy-Jambula/razorpay-integration-plugin. It costs 57 tokens per session (2,784 once invoked), scanned A, original, MIT.

A guide for creating Razorpay subscriptions, which charge customers repeatedly on a schedule. It uses Razorpay’s hosted checkout page and covers customer records, duplicate pending subscriptions, and blocked checkout popups.

In plain words
What is it for?
Adding recurring billing, hosted subscription checkout, customer creation, and fallback handling to a web application.
Why use it?
It helps avoid duplicate subscriptions and checkout failures across browsers without adding Razorpay’s browser-side software to the app.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the razorpay plugin — 15 skills, 9 agents, 1 hook shipped together

Good fit Adding recurring billing, hosted subscription checkout, customer creation, and fallback handling to a web application.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/venkateshwar-reddy-jambula/razorpay-integration-plugin/subscription
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Venkateshwar-Reddy-Jambula/razorpay-integration-plugin --skill subscription
Clone the repo
git clone --depth 1 https://github.com/Venkateshwar-Reddy-Jambula/razorpay-integration-plugin

Made for: Claude Code.

Or install razorpay, the plugin that ships this one along with the rest of its 15 skills, 9 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for subscription

README.md
[![agentmods](https://agentmods.dev/badge/skills/venkateshwar-reddy-jambula/razorpay-integration-plugin/subscription/github.svg)](https://agentmods.dev/skills/venkateshwar-reddy-jambula/razorpay-integration-plugin/subscription)
Your own site
<a href="https://agentmods.dev/skills/venkateshwar-reddy-jambula/razorpay-integration-plugin/subscription"><img src="https://agentmods.dev/badge/skills/venkateshwar-reddy-jambula/razorpay-integration-plugin/subscription/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for subscription

Your own site · 80×15
<a href="https://agentmods.dev/skills/venkateshwar-reddy-jambula/razorpay-integration-plugin/subscription"><img src="https://agentmods.dev/badge/skills/venkateshwar-reddy-jambula/razorpay-integration-plugin/subscription.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,784 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.02784
Opus 5 $0.00028 $0.01392
Sonnet 5 $0.00011 $0.00557
Haiku 4.5 $0.00006 $0.00278

Measured 10d ago against content hash 5ce03201d1ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

subscription scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/subscription/SKILL.md · 325 lines

How it starts

The opening of the file, as written. The whole thing — 325 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Razorpay Subscription Creation

Build a production-grade subscription creation flow. This handles customer creation, duplicate prevention, hosted checkout, and popup-blocked fallback.

Architecture: Hosted Checkout (Not JS SDK)

Use Razorpay's hosted checkout (short_url) instead of the JS SDK popup. Why:

  • Works on all browsers (no popup blockers)
  • No client-side SDK bundle needed
  • Razorpay handles the entire payment UI
  • Mobile-friendly by default

API Route: Create Subscription

// app/api/billing/create-subscription/route.ts
import { razorpay } from "@/lib/razorpay";
import { planIdFor, totalCountFor } from "@/lib/billing/plans";

export async function POST(request: Request) {
  // 1. Authenticate user (your auth system)
  const user = await getAuthenticatedUser(request);
  if (!user) return new Response("Unauthorized", { status: 401 });

  const { planKey } = await request.json();

  try {
    // 2. Check for pending subscription (prevent duplicates)
    const existing = await getSubscriptionByUserId(user.id);
    if (existing) {
      const isPending = ["created", "authenticated", "pending"].includes(existing.status);
      const isRecent = Date.now() - existing.createdAt.getTime() < 3600_000; // 1 hour

      if (isPending && isRecent) {
        // Return existing checkout URL — user may have abandoned and returned
        return Response.json({
          shortUrl: null, // Cannot retrieve short_url after creation
          subscriptionId: existing.razorpaySubscriptionId,
          error: "Subscription already pending. Complete existing checkout or wait 1 hour.",
        }, { status: 409 });
      }

      if (isPending && !isRecent) {
        // Stale pending — cancel on Razorpay (best-effort)
        try {
          await razorpay.subscriptions.cancel(existing.razorpaySubscriptionId, false);
        } catch {
          // Ignore — may already be cancelled
        }
      }
    }

    // 3. Create or reuse Razorpay customer
    //    fail_existing: 0 = return existing customer if email matches (upsert)
    const customer = await razorpay.customers.create({
      name: user.name || "Customer",
      email: user.email,
      ...(user.phone ? { contact: user.phone.replace(/[^\d+]/g, "") } : {}),
      fail_existing: 0 as 0 | 1,  // TypeScript SDK quirk — needs explicit cast
    });

    // 4. Create subscription
    const planId = planIdFor(planKey);
    const subscription = await razorpay.subscriptions.create({
      plan_id: planId,
      total_count: totalCountFor(planKey),
      quantity: 1,
      customer_notify: 1,
      notes: {
        userId: user.id,
        planKey,
      },
      ...(user.email ? {
        notify_info: {
          notify_email: user.email,
          ...(user.phone ? { notify_phone: user.phone.replace(/[^\d+]/g, "") } : {}),
        },
      } : {}),
    });

    // 5. Save to database
    await createSubscriptionRecord({
      userId: user.id,
      planKey,
      razorpaySubscriptionId: subscription.id,
      razorpayPlanId: planId,
      razorpayCustomerId: customer.id,
      status: "created",
    });

    // 6. Return hosted checkout URL
    return Response.json({
      shortUrl: subscription.short_url,
      subscriptionId: subscription.id,
    });
  } catch (error) {
    console.error("Failed to create subscription:", error);
    return Response.json({ error: "Something went wrong" }, { status: 500 });
  }
}

Read the full file on GitHub · 325 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 325 lines · 57 tokens per session scan A 5ce03201d1ae

Subscribe to this mod's changes

subscription is a skill published in the GitHub repository Venkateshwar-Reddy-Jambula/razorpay-integration-plugin (6 stars, last pushed 5mo ago), licensed MIT. It adds 57 tokens to every session and 2,784 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

asc-ppp-pricing

Set territory-specific pricing for subscriptions and in-app purchases using current asc setup, pricing summary, price import, and price schedule commands. Use when adjusting prices by country or implementing localized PPP strategies.

rorkai/app-store-connect-cli-skills · 45 tokens

stripe

Stripe API integration with managed OAuth. Manage customers, subscriptions, invoices, products, prices, and payments. Use this skill when users want to process payments, manage billing, or handle subscriptions with Stripe. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).…

CraftOS-dev/CraftBot · 79 tokens

etsy-pricing-strategy

Etsy pricing — cost calculation, competitor pricing, perceived value, shipping cost integration, sales and coupons.

nexscope-ai/eCommerce-Skills · 26 tokens

amazon-wholesale-sourcing

Wholesale product sourcing — supplier discovery, negotiation, MOQ optimization, margin analysis.

nexscope-ai/Amazon-Skills · 20 tokens

ai-slop

Operational rubric that turns "don't make AI slop" into observable properties, severity levels, evidence requirements, and repair actions for interface design. Use as the reference rubric when building or reviewing marketing sites, product interfaces, dashboards, portfolios, or e-commerce pages, especially alongside…

waybarrios/opencode-power-pack · 61 tokens

payment-processor

Skill "payment-processor" from Signal-Execution-Labs/forex-trading-ai-agent, covering payment processor skill, supported services, capabilities, view balances and get all balances.

Signal-Execution-Labs/forex-trading-ai-agent · 0 tokens