payment-integration

payment-integration is a skill for Claude Code, Codex from travisjneuman/.claude. It costs 40 tokens per session (3,740 once invoked), scanned A, original, MIT.

A guide to adding payment processing and recurring subscriptions to web and mobile applications. It covers Stripe, RevenueCat, payment webhooks, refunds, taxes, usage-based billing, and PCI compliance, which is the set of rules for protecting card payments.

In plain words
What is it for?
Use it to build checkout and subscription flows, process payment webhooks, handle failed payments and refunds, calculate tax, support mobile purchases, and review PCI scope.
Why use it?
It helps avoid common billing errors and reduces the amount of sensitive card information an application handles. It also explains how to keep subscription status accurate when payment events arrive more than once.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build checkout and subscription flows, process payment webhooks, handle failed payments and refunds, calculate tax, support mobile purchases, and review PCI scope.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/travisjneuman/.claude/payment-integration
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 travisjneuman/.claude --skill payment-integration
Clone the repo
git clone --depth 1 https://github.com/travisjneuman/.claude

Made for: Claude Code, 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 payment-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/travisjneuman/.claude/payment-integration/github.svg)](https://agentmods.dev/skills/travisjneuman/.claude/payment-integration)
Your own site
<a href="https://agentmods.dev/skills/travisjneuman/.claude/payment-integration"><img src="https://agentmods.dev/badge/skills/travisjneuman/.claude/payment-integration/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 payment-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/travisjneuman/.claude/payment-integration"><img src="https://agentmods.dev/badge/skills/travisjneuman/.claude/payment-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,740 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.00040 $0.03740
Opus 5.5 $0.00016 $0.01496
Sonnet 5.5 $0.00008 $0.00748
Haiku 4.5 $0.00004 $0.00374

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

Security

Grade A, and why

payment-integration 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/payment-integration/SKILL.md · 475 lines

How it starts

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

Payment Integration

Overview

This skill covers implementing payment processing and subscription billing in web and mobile applications. It addresses Stripe integration (Checkout, Elements, PaymentIntents), subscription lifecycle management, webhook handling with idempotency, PCI compliance, metered and usage-based billing, tax calculation, refund processing, and RevenueCat for mobile subscriptions.

Use this skill when adding payment processing, building subscription billing, handling Stripe webhooks, implementing pricing pages, managing payment failures, or integrating mobile in-app purchases.


Core Principles

  1. Never handle raw card data - Use Stripe Elements or Checkout to keep card numbers off your servers entirely. This keeps you at PCI SAQ-A (the simplest compliance level) rather than SAQ-D.
  2. Webhooks are the source of truth - Never trust client-side payment confirmation. A successful PaymentIntent on the client means nothing until your webhook handler confirms payment_intent.succeeded. Build your system around webhook events.
  3. Idempotency everywhere - Webhooks can be delivered multiple times. Every webhook handler must be idempotent. Use Stripe's event ID as a deduplication key.
  4. Handle failure gracefully - Payments fail for many reasons (insufficient funds, expired cards, fraud detection). Build retry flows, dunning emails, and graceful degradation into the subscription lifecycle.
  5. Test with Stripe's test mode - Use test API keys, test card numbers, and test clocks for subscription lifecycle testing. Never test with real payment methods.

Key Patterns

Pattern 1: Stripe Checkout for Subscriptions

When to use: When you want Stripe to handle the entire checkout UI, including payment form, coupon codes, and tax calculation.

Implementation:

// Server - Create Checkout Session
// app/api/checkout/route.ts
import Stripe from "stripe";
import { NextRequest, NextResponse } from "next/server";

const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
  apiVersion: "2024-06-20",
});

export async function POST(req: NextRequest) {
  const { priceId, userId, email } = await req.json();

  // Get or create Stripe customer
  let customerId = await getStripeCustomerId(userId);
  if (!customerId) {
    const customer = await stripe.customers.create({
      email,
      metadata: { userId },
    });
    customerId = customer.id;
    await saveStripeCustomerId(userId, customerId);
  }

  const session = await stripe.checkout.sessions.create({
    customer: customerId,
    mode: "subscription",
    line_items: [{ price: priceId, quantity: 1 }],
    success_url: `${process.env.NEXT_PUBLIC_URL}/dashboard?session_id={CHECKOUT_SESSION_ID}`,
    cancel_url: `${process.env.NEXT_PUBLIC_URL}/pricing`,
    subscription_data: {
      metadata: { userId },
      trial_period_days: 14,
    },
    // Enable automatic tax calculation
    automatic_tax: { enabled: true },
    // Allow promo codes
    allow_promotion_codes: true,
    // Collect billing address for tax
    billing_address_collection: "required",
    // Customer portal for self-service management
    customer_update: {
      address: "auto",
      name: "auto",
    },
    // Auto-renewal disclosure next to the pay button + express consent
    // (California ARL, FTC ROSCA). terms_of_service needs a ToS URL set in the Dashboard.
    custom_text: {
      submit: { message: "Renews automatically each month at the listed price after your 14-day trial until you cancel. Cancel anytime online in Billing settings." },
    },
    consent_collection: { terms_of_service: "required" },
  });

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

Read the full file on GitHub · 475 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 Changed · +13 lines 602c74cc7107
  2. 17d ago First seen · 462 lines · 40 tokens per session scan A a0928b7f8a24

Subscribe to this mod's changes

payment-integration is a skill published in the GitHub repository travisjneuman/.claude (101 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 3,740 once invoked, about $0.0002 per session on Opus 5.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-30.