billing

billing is a command for coding agents from get-convex/convex-agent-plugins. It costs 24 tokens per session (929 once invoked), scanned A, original, MIT.

A command for adding Stripe payments and subscriptions to a Convex app. Stripe is a payment service; the setup includes checkout, a webhook for payment events, and subscription-based access checks.

In plain words
What is it for?
Use it to install the Stripe component, configure keys, receive verified Stripe webhooks, create checkout flows, store subscription state, and gate server-side features.
Why use it?
It connects payment status to server-side access rules, so paid features can be restricted based on a user’s subscription.

Command

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.

agentmods
npx agentmods add commands/get-convex/convex-agent-plugins/billing
Clone the repo
git clone --depth 1 https://github.com/get-convex/convex-agent-plugins

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 billing

README.md
[![agentmods](https://agentmods.dev/badge/commands/get-convex/convex-agent-plugins/billing.svg)](https://agentmods.dev/commands/get-convex/convex-agent-plugins/billing)
Your own site
<a href="https://agentmods.dev/commands/get-convex/convex-agent-plugins/billing"><img src="https://agentmods.dev/badge/commands/get-convex/convex-agent-plugins/billing.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 929 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00024 $0.00929
Opus 5 $0.00012 $0.00464
Sonnet 5 $0.00005 $0.00186
Haiku 4.5 $0.00002 $0.00093

Measured 4d ago against content hash 7b0d8cf3cf8a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

billing 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 4d 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.

commands/billing.md · 65 lines

How it starts

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

Add billing / payments

Wire Stripe to Convex using @convex-dev/stripe: a checkout action, an httpAction webhook registered by the component (signature-verified automatically), subscription state stored in the component's tables, and server-side gating via a query.

Steps

  1. Install the component: npm install @convex-dev/stripe.
  2. Create convex/convex.config.ts:
    import { defineApp } from 'convex/server';
    import stripe from '@convex-dev/stripe/convex.config.js';
    const app = defineApp();
    app.use(stripe);
    export default app;
    
  3. Store Stripe keys in Convex env (use the env micro power): STRIPE_SECRET_KEY (sk_test_… / sk_live_…) and STRIPE_WEBHOOK_SECRET (whsec_…).
  4. Create convex/http.ts to register the webhook route (the component handles signature verification automatically):
    import { httpRouter } from 'convex/server';
    import { components } from './_generated/api';
    import { registerRoutes } from '@convex-dev/stripe';
    const http = httpRouter();
    registerRoutes(http, components.stripe, { webhookPath: '/stripe/webhook' });
    export default http;
    
  5. Create convex/billing.ts with a checkout action and a subscription-gate query:
    import { action, query } from './_generated/server';
    import { components } from './_generated/api';
    import { StripeSubscriptions } from '@convex-dev/stripe';
    import { v } from 'convex/values';
    const stripeClient = new StripeSubscriptions(components.stripe, {});
    export const createSubscriptionCheckout = action({
      args: { priceId: v.string() },
      returns: v.object({ sessionId: v.string(), url: v.union(v.string(), v.null()) }),
      handler: async (ctx, args) => {
        const identity = await ctx.auth.getUserIdentity();
        if (!identity) throw new Error('Not authenticated');
        const customer = await stripeClient.getOrCreateCustomer(ctx, { userId: identity.subject, email: identity.email, name: identity.name });
        return await stripeClient.createCheckoutSession(ctx, { priceId: args.priceId, customerId: customer.customerId, mode: 'subscription', successUrl: `${process.env.SITE_URL ?? 'http://localhost:3000'}/?success=true`, cancelUrl: `${process.env.SITE_URL ?? 'http://localhost:3000'}/?canceled=true`, subscriptionMetadata: { userId: identity.subject } });
      },
    });
    export const isSubscribed = query({
      args: {},
      returns: v.boolean(),
      handler: async (ctx) => {
        const identity = await ctx.auth.getUserIdentity();
        if (!identity) return false;
        const subscriptions = await ctx.runQuery(components.stripe.public.listSubscriptionsByUserId, { userId: identity.subject });
        return subscriptions.some((sub) => sub.status === 'active' || sub.status === 'trialing');
      },
    });
    
  6. Run npx convex dev --once — it will install the component and push the functions. Verify output shows ✔ Installed component stripe.
  7. In Stripe Dashboard → Webhooks: add endpoint https://<deployment>.convex.site/stripe/webhook, subscribe to checkout.session.completed, customer.subscription.*, invoice.*, payment_intent.*. Copy the signing secret as STRIPE_WEBHOOK_SECRET.

Read the full file on GitHub · 65 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. 4d ago First seen · 65 lines · 24 tokens per session scan A 7b0d8cf3cf8a

Subscribe to this mod's changes

billing is a command published in the GitHub repository get-convex/convex-agent-plugins (112 stars, last pushed 6d ago), licensed MIT. It adds 24 tokens to every session and 929 once invoked, about $0.0001 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-30.

Related

Other commands, from other repositories

mp-integrate

Scaffold a Mercado Pago integration via the mp-integrate wizard. Supports Checkout Pro, Checkout API, Bricks, QR, Point, Subscriptions, Marketplace, Wallet Connect, Payouts, and SmartApps. Also migrates legacy Instore QR/Point integrations to the Orders API.

mercadopago/mercadopago-claude-marketplace · 58 tokens

payments

Invoke the butterbase-skills:payments skill. The user is about to recommend or use a payment gateway — default to Stripe via managebilling unless region constraints force a fallback.

butterbase-ai/butterbase-skills · 0 tokens

auto-purchase

Cashu ecash の BTC を使って、Lightning 支払いでギフトカードを自動購入します。.

cachet-jp/ln-agent-poc-v2 · 0 tokens

add-checkout

Create comprehensive shopping cart and checkout flow. Implement cart state management with Context API or Zustand. Create cart UI component with item list, quantity controls, and remove buttons. Calculate totals including subtotal, tax, shipping, and discounts. Add shipping address form with validation. Implement…

LarouexNonprofitConsulting/larouex-fullstack-plugin · 0 tokens

add-stripe

Integrate Stripe payment processing. Set up Stripe account and obtain API keys. Implement checkout flow using Stripe Checkout or Payment Element. Create payment API endpoints in Azure Functions or Express. Add webhook handling for payment events: succeeded, failed, refunded. Implement subscription billing with…

LarouexNonprofitConsulting/larouex-fullstack-plugin · 0 tokens

add-checkout

Create comprehensive shopping cart and checkout flow. Implement cart state management with Context API or Zustand. Create cart UI component with item list, quantity controls, and remove buttons. Calculate totals including subtotal, tax, shipping, and discounts. Add shipping address form with validation. Implement…

Ashikparvez89/larouex-fullstack-plugin · 0 tokens