Agent skill

Stripe Payments

by jezweb in jezweb/claude-skills

Add Stripe payments to a web app — Checkout Sessions, Payment Intents, subscriptions, webhooks, customer portal, and pricing pages.

MITAuto-check: notesBackend & APIs

Install Stripe Payments

skills CLI
$ npx skills add jezweb/claude-skills --skill stripe-payments -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jezweb/claude-skills stripe-payments --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jezweb/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/integrations/skills/stripe-payments .claude/skills/stripe-payments && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
stripe-payments
GitHub stars
1.1k
Token cost
~2.5k tokens
SKILL.md length
397 words
Files
1
Skills in repo
52
Repo updated
First seen
Licence
MIT

At a glance

Add Stripe payments to a web app — Checkout Sessions, Payment Intents, subscriptions, webhooks, customer portal, and pricing pages.

  • Tasks that involve Webhooks
  • SKILL.md covers Which Stripe API Do I Need?, Setup, One-Time Payment (Checkout… and Subscriptions, plus 6 more sections
  • Calls stripe, npx and npm; reaches dashboard.stripe.com; needs STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET
  • Tasks that involve Landing pages

What it does

Stripe Payments is an agent skill from jezweb/claude-skills. Add Stripe payments to a web app — Checkout Sessions, Payment Intents, subscriptions, webhooks, customer portal, and pricing pages. Covers the decision of which Stripe API to use, produces working integration code, and handles webhook verification. No MCP server needed — uses Stripe npm package directly. Triggers: 'add payments', 'stripe', 'checkout', 'subscription', 'payment form', 'pricing page', 'billing', 'accept payments', 'stripe webhook', 'customer portal'.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: claude-code-only

It sits in Backend & APIs, covering Webhooks and Landing pages. It works with Stripe, Model Context Protocol and npm. The repository describes itself as: Skills for Claude Code CLI such as full stack dev Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.

When your agent uses it

  • Tasks that involve Webhooks
  • Tasks that involve Landing pages

Example prompts

  • “add payments”
  • “stripe”
  • “checkout”
  • “/stripe-payments”

Requirements

  • Node.js
  • A credential in STRIPE_SECRET_KEY
  • A credential in STRIPE_WEBHOOK_SECRET
  • Compatibility (from SKILL.md): claude-code-only
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash, Glob, Grep

What it can do on your machine

Read from SKILL.md and the folder at commit 1260fa7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash
    • Glob
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • stripe
    • npx
    • npm
    • brew

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • dashboard.stripe.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • STRIPE_SECRET_KEY
    • STRIPE_WEBHOOK_SECRET
    • STRIPE_PUBLISHABLE_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    claude-code-only

    From compatibility in the SKILL.md frontmatter.

Context cost

Stripe Payments loads about 2.5k tokens when it runs. Until then it costs about 121 tokens; SKILL.md has 397 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~121
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Edit, Bash, Glob, Grep

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jezweb/claude-skills at commit 1260fa7, republished under its MIT licence (© jezweb). 397 words, ~2,508 tokens.

Download SKILL.mdSave it as .claude/skills/stripe-payments/SKILL.md (or your agent's skills folder).
name
stripe-payments
description
Add Stripe payments to a web app — Checkout Sessions, Payment Intents, subscriptions, webhooks, customer portal, and pricing pages. Covers the decision of which Stripe API to use, produces working integration code, and handles webhook verification. No MCP server needed — uses Stripe npm package directly. Triggers: 'add payments', 'stripe', 'checkout', 'subscription', 'payment form', 'pricing page', 'billing', 'accept payments', 'stripe webhook', 'customer portal'.
allowed-tools
Read, Write, Edit, Bash, Glob, Grep
compatibility
claude-code-only

Stripe Payments

Add Stripe payments to a web app. Covers the common patterns — one-time payments, subscriptions, webhooks, customer portal — with working code. No MCP server needed.

Which Stripe API Do I Need?

You want to...UseComplexity
Accept a one-time paymentCheckout SessionsLow — Stripe hosts the payment page
Embed a payment form in your UIPayment Element + Payment IntentsMedium — you build the form, Stripe handles the card
Recurring billing / subscriptionsCheckout Sessions (subscription mode)Low-Medium
Save a card for laterSetup IntentsLow
Marketplace / platform paymentsStripe ConnectHigh
Let customers manage billingCustomer PortalLow — Stripe hosts it

Default recommendation: Start with Checkout Sessions. It's the fastest path to accepting money. You can always add embedded forms later.

Setup

Install
bash
npm install stripe @stripe/stripe-js
API Keys
bash
# Get keys from: https://dashboard.stripe.com/apikeys
# Test keys start with sk_test_ and pk_test_
# Live keys start with sk_live_ and pk_live_

# For Cloudflare Workers — store as secrets:
npx wrangler secret put STRIPE_SECRET_KEY
npx wrangler secret put STRIPE_WEBHOOK_SECRET

# For local dev — .dev.vars:
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_PUBLISHABLE_KEY=pk_test_...
Server-Side Client
typescript
import Stripe from 'stripe';

// Cloudflare Workers
const stripe = new Stripe(c.env.STRIPE_SECRET_KEY);

// Node.js
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);

One-Time Payment (Checkout Sessions)

The fastest way to accept payment. Stripe hosts the entire checkout page.

Create a Checkout Session (Server)
typescript
app.post('/api/checkout', async (c) => {
  const { priceId, successUrl, cancelUrl } = await c.req.json();

  const session = await stripe.checkout.sessions.create({
    mode: 'payment',
    line_items: [{ price: priceId, quantity: 1 }],
    success_url: successUrl || `${new URL(c.req.url).origin}/success?session_id={CHECKOUT_SESSION_ID}`,
    cancel_url: cancelUrl || `${new URL(c.req.url).origin}/pricing`,
  });

  return c.json({ url: session.url });
});
Redirect to Checkout (Client)
typescript
async function handleCheckout(priceId: string) {
  const res = await fetch('/api/checkout', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ priceId }),
  });
  const { url } = await res.json();
  window.location.href = url;
}
Create Products and Prices
bash
# Via Stripe CLI (recommended for setup)
stripe products create --name="Pro Plan" --description="Full access"
stripe prices create --product=prod_XXX --unit-amount=2900 --currency=aud --recurring[interval]=month

# Or via Dashboard: https://dashboard.stripe.com/products

Hardcode price IDs in your code (they don't change):

typescript
const PRICES = {
  pro_monthly: 'price_1234567890',
  pro_yearly: 'price_0987654321',
} as const;

Subscriptions

Same as one-time but with mode: 'subscription':

typescript
const session = await stripe.checkout.sessions.create({
  mode: 'subscription',
  line_items: [{ price: PRICES.pro_monthly, quantity: 1 }],
  success_url: `${origin}/dashboard?session_id={CHECKOUT_SESSION_ID}`,
  cancel_url: `${origin}/pricing`,
  // Link to existing customer if known:
  customer: customerId, // or customer_email: 'user@example.com'
});
Check Subscription Status
typescript
async function hasActiveSubscription(customerId: string): Promise<boolean> {
  const subs = await stripe.subscriptions.list({
    customer: customerId,
    status: 'active',
    limit: 1,
  });
  return subs.data.length > 0;
}

Webhooks

Stripe sends events to your server when things happen (payment succeeded, subscription cancelled, etc.). You must verify the webhook signature.

Webhook Handler (Cloudflare Workers / Hono)
typescript
app.post('/api/webhooks/stripe', async (c) => {
  const body = await c.req.text();
  const sig = c.req.header('stripe-signature')!;

  let event: Stripe.Event;
  try {
    // Use constructEventAsync for Workers (no Node crypto)
    event = await stripe.webhooks.constructEventAsync(
      body,
      sig,
      c.env.STRIPE_WEBHOOK_SECRET
    );
  } catch (err) {
    console.error('Webhook signature verification failed:', err);
    return c.json({ error: 'Invalid signature' }, 400);
  }

  switch (event.type) {
    case 'checkout.session.completed': {
      const session = event.data.object as Stripe.Checkout.Session;
      // Fulfill the order — update database, send email, grant access
      await handleCheckoutComplete(session);
      break;
    }
    case 'customer.subscription.updated': {
      const sub = event.data.object as Stripe.Subscription;
      await handleSubscriptionChange(sub);
      break;
    }
    case 'customer.subscription.deleted': {
      const sub = event.data.object as Stripe.Subscription;
      await handleSubscriptionCancelled(sub);
      break;
    }
    case 'invoice.payment_failed': {
      const invoice = event.data.object as Stripe.Invoice;
      await handlePaymentFailed(invoice);
      break;
    }
  }

  return c.json({ received: true });
});
Register Webhook
bash
# Local testing with Stripe CLI:
stripe listen --forward-to http://localhost:8787/api/webhooks/stripe

# Production — register via Dashboard:
# https://dashboard.stripe.com/webhooks
# URL: https://yourapp.com/api/webhooks/stripe
# Events: checkout.session.completed, customer.subscription.updated,
#          customer.subscription.deleted, invoice.payment_failed
Cloudflare Workers Gotcha

constructEvent (synchronous) uses Node.js crypto which doesn't exist in Workers. Use constructEventAsync instead — it uses the Web Crypto API.

Customer Portal

Let customers manage their own subscriptions (upgrade, downgrade, cancel, update payment method):

typescript
app.post('/api/billing/portal', async (c) => {
  const { customerId } = await c.req.json();

  const session = await stripe.billingPortal.sessions.create({
    customer: customerId,
    return_url: `${new URL(c.req.url).origin}/dashboard`,
  });

  return c.json({ url: session.url });
});

Configure the portal in Dashboard: https://dashboard.stripe.com/settings/billing/portal

Show full SKILL.md (151 more words)Show less

Pricing Page Pattern

Generate a pricing page that reads from Stripe products:

typescript
// Server: fetch products and prices
app.get('/api/pricing', async (c) => {
  const prices = await stripe.prices.list({
    active: true,
    expand: ['data.product'],
    type: 'recurring',
  });

  return c.json(prices.data.map(price => ({
    id: price.id,
    name: (price.product as Stripe.Product).name,
    description: (price.product as Stripe.Product).description,
    amount: price.unit_amount,
    currency: price.currency,
    interval: price.recurring?.interval,
  })));
});

Or hardcode if you only have 2-3 plans — simpler and no API call on every page load.

Stripe CLI (Local Development)

bash
# Install
brew install stripe/stripe-cli/stripe

# Login
stripe login

# Listen for webhooks locally
stripe listen --forward-to http://localhost:8787/api/webhooks/stripe

# Trigger test events
stripe trigger checkout.session.completed
stripe trigger customer.subscription.created
stripe trigger invoice.payment_failed

Common Patterns

typescript
// On first checkout, create or find customer:
const session = await stripe.checkout.sessions.create({
  customer_email: user.email,  // Creates new customer if none exists
  // OR
  customer: user.stripeCustomerId,  // Use existing
  metadata: { userId: user.id },  // Link back to your user
  // ...
});

// In webhook, save the customer ID:
case 'checkout.session.completed': {
  const session = event.data.object;
  await db.update(users)
    .set({ stripeCustomerId: session.customer as string })
    .where(eq(users.id, session.metadata.userId));
}
Free Trial
typescript
const session = await stripe.checkout.sessions.create({
  mode: 'subscription',
  line_items: [{ price: PRICES.pro_monthly, quantity: 1 }],
  subscription_data: {
    trial_period_days: 14,
  },
  // ...
});
Australian Dollars
typescript
// Set currency when creating prices
const price = await stripe.prices.create({
  product: 'prod_XXX',
  unit_amount: 2900,  // $29.00 in cents
  currency: 'aud',
  recurring: { interval: 'month' },
});

Gotchas

GotchaFix
constructEvent fails on WorkersUse constructEventAsync (Web Crypto API)
Webhook fires but handler not calledCheck the endpoint URL matches exactly (trailing slash matters)
Test mode payments not appearingMake sure you're using sk_test_ key, not sk_live_
Price amounts are in cents2900 = $29.00. Always divide by 100 for display
Customer email doesn't match userUse customer (existing ID) not customer_email for returning users
Subscription status staleDon't cache — check via API or trust webhook events
Webhook retriesStripe retries failed webhooks for up to 3 days. Return 200 quickly.
CORS on checkout redirectCheckout URL is on stripe.com — use window.location.href, not fetch

© jezweb, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/integrations/skills/stripe-payments of jezweb/claude-skills.

Open the folder on GitHubat commit 1260fa7

Compare with similar skills

Stripe Payments next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Stripe Payments compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Stripe Payments this skilljezweb/claude-skills1.1k—~2.5kAutomated safety check: NotesMIT
Dashclaw Shipucsandman/DashClaw311—~7.2kAutomated safety check: PassMIT
Stripe Appsfossasia/eventyay1.7k1 repos~3.6kAutomated safety check: PassApache-2.0
Stripe Best Practiceskanchengw/cnllm1732 repos~925Automated safety check: PassApache-2.0
Cashier Stripe Developmentluadotsh/lua3431 repos~1.2kAutomated safety check: PassMIT
X Twitter ScraperXquik-dev/x-twitter-scraper2111 repos~2.6kAutomated safety check: PassMIT

Similar skills

  • Dashclaw Ship

    ucsandman/DashClaw

    The single command that gets a DashClaw change ON MAIN AND LIVE — it resolves everything blocking production, never defers, and never hands back a checklist.

    311 GitHub stars~7.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Stripe Apps

    fossasia/eventyay

    A skill your agent uses when building, modifying, or reviewing a Stripe App — or when the user describes something that implies one (e.g.

    1.7k GitHub starsUsed in 1 repo~3.6k tokens
    Backend & APIsAuto-check passed
  • Stripe Best Practices

    kanchengw/cnllm

    Guides Stripe integration decisions — API selection (Checkout Sessions vs PaymentIntents), Connect platform setup (Accounts v2, controller properties), billing/subscriptions, Treasury financial…

    173 GitHub starsUsed in 2 repos~925 tokens
    Backend & APIsAuto-check passed
  • Handles Laravel Cashier Stripe integration including subscriptions, webhooks, Stripe Checkout, invoices, charges, refunds, trials, coupons, metered billing, and payment failure handling.

    343 GitHub starsUsed in 1 repo~1.2k tokens
    Backend & APIsAuto-check passed
  • X Twitter Scraper

    Xquik-dev/x-twitter-scraper

    Use Xquik to fetch X (Twitter) data or act through a connected account: search, profiles, followers, replies, threads, timelines, media downloads, bulk exports, trends, monitors, signed webhooks…

    211 GitHub starsUsed in 1 repo~2.6k tokens
    Backend & APIsAuto-check passed
  • API Endpoint Contract

    trycompai/comp

    The contract every new or modified API endpoint must follow so it is correct for the public OpenAPI spec, the MCP server (npm @trycompai/mcp-server), the ValidationPipe, and the docs.

    2k GitHub stars~2.7k tokensUpdated today
    Backend & APIsAuto-check passed

More from jezweb/claude-skills

All 52 skills in this repo
  • Favicon Gen

    jezweb/claude-skills

    Generate custom favicons from logos, text, or brand colours.

    1.1k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Tailwind Theme Builder

    jezweb/claude-skills

    Set up Tailwind v4 + shadcn/ui themed UI with dark mode. An agent skill from jezweb/claude-skills.

    1.1k GitHub starsUsed in 1 repo~3.2k tokens
    Auto-check passed
  • Elevenlabs Agents

    jezweb/claude-skills

    Build conversational AI voice agents on the ElevenLabs platform.

    1.1k GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed
  • Responsiveness Check

    jezweb/claude-skills

    Test website responsiveness across viewport widths using browser automation.

    1.1k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • MCP Builder

    jezweb/claude-skills

    Build MCP servers in Python with FastMCP. An agent skill from jezweb/claude-skills.

    1.1k GitHub stars~3.1k tokensUpdated yesterday
    Auto-check: notes
  • GitHub Release

    jezweb/claude-skills

    Prepare and publish GitHub releases. An agent skill from jezweb/claude-skills.

    1.1k GitHub stars~944 tokensUpdated yesterday
    Auto-check: notes

Categories

Questions about Stripe Payments

What does Stripe Payments do?

Add Stripe payments to a web app — Checkout Sessions, Payment Intents, subscriptions, webhooks, customer portal, and pricing pages. Stripe Payments is an agent skill from jezweb/claude-skills. Add Stripe payments to a web app — Checkout Sessions, Payment Intents, subscriptions, webhooks, customer portal, and pricing pages.

When should I use Stripe Payments?

Stripe Payments fits situations like: tasks that involve Webhooks; tasks that involve Landing pages.

How do I install Stripe Payments in Claude Code?

Run `npx skills add jezweb/claude-skills --skill stripe-payments -a claude-code`. Or copy the skill folder (plugins/integrations/skills/stripe-payments in jezweb/claude-skills) into .claude/skills/stripe-payments in your project. Claude Code loads it when a task matches its description.

How do I install Stripe Payments in Codex?

Run `npx skills add jezweb/claude-skills --skill stripe-payments -a codex`. Or copy the skill folder (plugins/integrations/skills/stripe-payments in jezweb/claude-skills) into .agents/skills/stripe-payments in your project. Codex loads it when a task matches its description.

Can I use Stripe Payments in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jezweb/claude-skills --skill stripe-payments -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/stripe-payments, .gemini/skills/stripe-payments, .github/skills/stripe-payments and .opencode/skills/stripe-payments in your project.

What does Stripe Payments need to run?

Going by SKILL.md and its folder, Stripe Payments needs the command-line tools its instructions call (stripe, npx, npm and brew) and credentials named STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET and STRIPE_PUBLISHABLE_KEY. Our summary lists: Node.js; A credential in STRIPE_SECRET_KEY; A credential in STRIPE_WEBHOOK_SECRET. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash, Glob, Grep. Compatibility (from SKILL.md): claude-code-only.

Does Stripe Payments access the network?

SKILL.md names 1 domain. In commands or code: dashboard.stripe.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Stripe Payments safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Stripe Payments use?

Stripe Payments is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Stripe Payments use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Stripe Payments?

Skills that share tags, products or a category with Stripe Payments: Dashclaw Ship (ucsandman/DashClaw, 311 stars), Stripe Apps (fossasia/eventyay, 1.7k stars), Stripe Best Practices (kanchengw/cnllm, 173 stars) and Cashier Stripe Development (luadotsh/lua, 343 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Stripe Payments?

jezweb (a GitHub user) maintains it in jezweb/claude-skills, which has 1,055 GitHub stars. The repository holds 52 skills in this directory. The repository was last updated on October 9, 2026.

Source: jezweb/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.