stripe-billing

stripe-billing is a skill for Codex from san-npm/skills-ws. It costs 82 tokens per session (951 once invoked), scanned A, original, MIT.

A guide for adding Stripe payments to Next.js applications, including subscriptions and charges based on usage. It covers payment notifications, customer billing pages, tax, and changing prices over time.

In plain words
What is it for?
Use it to build or review recurring billing, usage-based charges, Stripe webhooks, a customer billing portal, EU VAT handling, and price migrations in a Next.js App Router project.
Why use it?
It helps avoid common billing errors, such as trusting an immediate API response instead of the later payment notification that confirms the real state. It also addresses repeated notifications and subscription changes.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to build or review recurring billing, usage-based charges, Stripe webhooks, a customer billing portal, EU VAT handling, and price migrations in a Next.js App Router project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/san-npm/skills-ws/stripe-billing
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 san-npm/skills-ws --skill stripe-billing
Clone the repo
git clone --depth 1 https://github.com/san-npm/skills-ws

Made for: Codex.

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 stripe-billing

README.md
[![agentmods](https://agentmods.dev/badge/skills/san-npm/skills-ws/stripe-billing/github.svg)](https://agentmods.dev/skills/san-npm/skills-ws/stripe-billing)
Your own site
<a href="https://agentmods.dev/skills/san-npm/skills-ws/stripe-billing"><img src="https://agentmods.dev/badge/skills/san-npm/skills-ws/stripe-billing/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 stripe-billing

Your own site · 80×15
<a href="https://agentmods.dev/skills/san-npm/skills-ws/stripe-billing"><img src="https://agentmods.dev/badge/skills/san-npm/skills-ws/stripe-billing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 951 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.00082 $0.00951
Opus 5 $0.00041 $0.00476
Sonnet 5 $0.00016 $0.00190
Haiku 4.5 $0.00008 $0.00095

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

Security

Grade A, and why

stripe-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 5d 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/stripe-billing/SKILL.md · 44 lines

How it starts

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

Stripe Billing

Disambiguation: this skill = Next.js App Router + Server Actions. For Express/Node backends see saas-billing.

Production patterns for Stripe billing that handle the edge cases tutorials skip. Subscription lifecycle, usage-based billing, webhook idempotency, EU VAT, and price migrations.

Critical principle: Webhooks are your source of truth, not API responses. Always design for eventual consistency.

Clover API invariants (this skill pins 2025-09-30.clover)

2025-09-30.clover is the first release of the Clover major line (majors run Acacia, Basil, Clover, Dahlia; breaking changes are cumulative, so Clover inherits Basil's). The first three invariants below were introduced in 2025-03-31.basil; the flexible billing_mode default is Clover's own change. The code below depends on these, so if you bump the version, re-verify at https://docs.stripe.com/changelog:

  • Initial subscription payment secret lives at latest_invoice.confirmation_secret.client_secret, NOT latest_invoice.payment_intent. Expand latest_invoice.confirmation_secret. (expand: ['latest_invoice.payment_intent'] returns nothing on this version.)
  • Billing period fields moved to the subscription item: use sub.items.data[0].current_period_end / current_period_start. sub.current_period_end no longer exists. billing_cycle_anchor stays on the subscription.
  • Legacy usage-based billing is removed: aggregate_usage and billing_thresholds are gone; UsageRecord/UsageRecordSummary endpoints are deleted. A metered price MUST reference a Billing Meter via recurring.meter. Report usage with billing.meterEvents.create. (Changelog: https://docs.stripe.com/changelog/basil/2025-03-31/deprecate-legacy-usage-based-billing)
  • billing_mode: { type: 'flexible' } is the default for new subscriptions and is what enables confirmation_secret; set it explicitly so behavior is stable across version bumps.

Safety gate

Before executing commands or changing external systems, confirm scope, credentials, target environment, rollback, and required approval. Pin and verify third-party artifacts; never expose secrets to client code or logs.

Read the full file on GitHub · 44 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. 5d ago First seen · 44 lines · 82 tokens per session scan A 321d2fe687d4

Subscribe to this mod's changes

stripe-billing is a skill published in the GitHub repository san-npm/skills-ws (2 stars, last pushed 5d ago), licensed MIT. It adds 82 tokens to every session and 951 once invoked, about $0.0004 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-09-07.

Related

Other skills, from other repositories

x402

Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — "just use it" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing…

browser-use/browser-use · 175 tokens

tushare

A Python interface for Tushare, a financial data service that provides market and company information for stocks, funds, futures, and digital assets. It returns queried data as pandas tables.

HKUDS/Vibe-Trading · 79 tokens

stripe-best-practices

Guides Stripe integration decisions across development and test environment planning (separate sandboxes vs the shared test mode sandbox), API selection (Checkout Sessions vs PaymentIntents), Connect platform setup (Accounts v2, controller properties), billing/subscriptions, tax and registrations (Stripe Tax…

stripe/ai · 161 tokens

pinme-uniwebpay

Use when generating, modifying, or reviewing PinMe Worker (Cloudflare Worker TypeScript) code that accepts payments through UniwebPay — payment links, products/prices, checkout sessions, payment status reads, refunds, subscriptions, or handling UniwebPay webhooks with @uniwebpay/sdk in a PinMe project.

glitternetwork/pinme · 71 tokens

erp-xpp

X++ code development lifecycle for Finance and Operations — scaffold models, author classes, custom services/APIs, and data entities, install matching SDKs, compile deployable packages, deploy packages, synchronize databases, and verify deployed artifacts. Use when the user explicitly requests creating, building…

microsoft/Dataverse-skills · 86 tokens

kalshi-api

Kalshi exchange mechanics — RSA-PSS auth, order schema, YES/NO orderbook convention, WebSocket, and endpoint surface. Market-type-agnostic shared layer for all Kalshi skills.

agiprolabs/claude-trading-skills · 44 tokens