payments
Skill4 starsChanged 32 days agoMITView on GitHub
This skill should be used when adding payments, subscriptions, billing, or pricing to a SaaS — Stripe integration, checkout, plans, the customer portal, webhooks, or deciding a pricing model. Trigger phrases include "add Stripe", "accept payments", "add a subscription", "charge users", "pricing tiers", "checkout", "billing portal", "handle the webhook", "set up plans", "monetize", "free trial". It wires Stripe correctly (checkout to webhook to fulfillment) and sets a sane pricing model.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- otisbase/otis-agent-plugintheir own version, first seen Nov 1, 2026
- whawkinsiv/solo-founder-skillstheir own version, first seen Oct 25, 2026
- whawkinsiv/claude-code-skillstheir own version, first seen Oct 17, 2026
- vietnamtrainingpilot-oss/ateliertheir own version, first seen Oct 17, 2026
- openai/pluginstheir own version, first seen Oct 13, 2026
- jholhewres/devclaw-skillstheir own version, first seen Oct 9, 2026
Used with
Projects with it also use journey and seo.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MeshJSSkilljourney
Create session learning logs that persist institutional memory across Claude Code sessions.
Also in 4 projects that use this
nilssonrSkillseo
Full SEO workflow for auditing pages and creating SEO-optimized content. Provides checklists with educational explanations aligned with Google Search Central documentation.
Also in 3 projects that use this
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- openai/plugins★ 7.8ksame name
- butterbase-ai/butterbase-plugin★ 535same name
- butterbase-ai/butterbase-skills★ 535same name
- whawkinsiv/solo-founder-skills★ 260same name
- whawkinsiv/claude-code-skills★ 258same name
- jholhewres/devclaw-skills★ 4same name
- leonardoaraujosantos/my_ai_skills★ 1same name
- vietnamtrainingpilot-oss/atelier★ 1same name
- muxammadmamajonov/dot-claude★ 0same name
- otisbase/otis-agent-plugin★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- accessibilitySkill
- ai-featuresSkill
- api-designSkill
- architecture-primerSkill
- authSkill
- data-modelingSkill
- deploymentSkill
- design-taste-frontendSkill
- frontend-performanceSkill
- image-to-codeSkill
- integrationsSkill
- landing-pageSkill
- multi-tenancySkill
- pre-ship-securitySkill
- product-discoverySkill
- pwaSkill
- rls-auditSkill
- saas-routerSkill
- secure-codingSkill
- technical-seoSkill
- ui-designSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
If no MCP is present, create the catalog by hand in the Stripe dashboard or via the SDK.
- Distinctive: line 27
Do you want the fastest path (hosted Checkout) or a fully custom in-page card form (Elements)?
- Distinctive: line 51
Use the Customer Portal: create a Billing Portal Session server-side and redirect.
- Distinctive: line 70
The token's prefix: Check that a key stored as "test" is a test key before it charges anyone.
- Very specific: line 76
Failed renewal: keep access while the provider is retrying.
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Payments
This skill turns an app into a SaaS that actually collects money — and does it without the classic bugs (fulfilling on the client redirect, double-granting access, unverified webhooks).
Analogy: the checkout redirect is the customer saying "I'll pay." The webhook is the bank confirming the money arrived. You ship the product when the bank confirms, not when the customer promises. Trusting the redirect is shipping on a promise.
The Stripe MCP split (read this first)
A Stripe MCP may be available (mcp__stripe__*). It is control-plane only: it creates products, prices, and payment links, and reads/updates subscriptions and customers. It cannot create Checkout Sessions or process webhooks.
So the architecture is hybrid:
- Delegate the catalog to the MCP — use it to create products, prices, and one-off payment links (the lowest-effort path for an MVP).
- Embed the integration code — Checkout Session creation, the webhook handler, and fulfillment must live in your shipped code, because the MCP can't do them.
If no MCP is present, create the catalog by hand in the Stripe dashboard or via the SDK; everything else below is identical.
Backend delegation: if you're on InsForge (see the data-modeling skill), its insforge / insforge-cli skills wire Stripe checkout, subscriptions, the customer portal, and the webhook handler for you — let them own the plumbing. The rules below still hold regardless (fulfill only on the webhook, verify the signature, stay idempotent); InsForge automates the wiring, it doesn't change what "correct" means. On Vercel/Node you write the handler yourself as shown. Never block on a missing skill.
Discovery (max 3 questions, only if unknown)
- One-time payments, subscriptions, or both?
- Do you want the fastest path (hosted Checkout) or a fully custom in-page card form (Elements)?
- What's the backend for the webhook — Vercel functions, a Node server, or a BaaS?
Step 1 — Pick the integration
- Default: Stripe Checkout (hosted). Fastest, PCI-lightest. Reach for Elements only when you need a custom in-page card form.
- Zero-backend MVP: a Payment Link (creatable via
mcp__stripe__create_payment_link) needs no code at all.
Step 2 — The correct flow (Checkout → webhook → fulfill)
- Create the Checkout Session server-side (e.g.
/api/checkout): passmode: 'subscription'(or'payment'), thepriceID,success_url,cancel_url, andclient_reference_id= your app's user id. Redirect the browser tosession.url. The secret key never touches the client. - Fulfill ONLY on the
checkout.session.completedwebhook — never on the success redirect. A user can hitsuccess_urlwithout paying; the webhook is the source of truth. - Verify the webhook signature:
stripe.webhooks.constructEvent(rawBody, sig, endpointSecret). On Vercel you must read the raw body (disable body parsing) or verification fails. - Make fulfillment idempotent — Stripe retries webhooks; key on
event.idor the subscription id so double-delivery doesn't double-grant access. - Store
stripe_customer_idandstripe_subscription_idon the user row.
Step 3 — Subscribe to the events that matter
checkout.session.completed→ provision access.customer.subscription.updated/.deleted→ plan change / cancel.invoice.paid/invoice.payment_failed→ renewals and dunning.
Step 4 — Self-serve billing
Use the Customer Portal: create a Billing Portal Session server-side and redirect. Let Stripe handle upgrades, cancels, and card updates instead of building billing UI.
Step 5 — Test before going live
stripe listen --forward-to localhost:3000/api/webhook and stripe trigger checkout.session.completed. Never ship without a real end-to-end webhook test.
Pricing model defaults
- 3 tiers (anchor / target / premium), middle one flagged "Most popular."
- Charge per value metric (seats, usage, projects), not per feature.
- Offer monthly + annual (annual ≈ 2 months free) to cut churn.
- Stripe is the catalog source of truth — set prices there, reference the IDs in code.
Other providers (Mercado Pago and similar)
The flow is the same — create the charge server-side, fulfill on the webhook, stay idempotent — but verify these against a real payment, because sandboxes differ from production:
- Which object carries which field. A subscription event can arrive with the payer's email empty while the payment object has it. Treat empty as missing (
||, not??) and fetch the object that holds the data. - Whether the sandbox is usable at all. Some require both parties to be test accounts. A real plan at the minimum amount is a legitimate test.
- The token's prefix. Check that a key stored as "test" is a test key before it charges anyone.
- The cancellation event may not identify the user. Store the provider's customer and subscription ids against your user at sign-up.
Subscription lifecycle (decide before launch)
- Trial: store an explicit
trial_ends_at, set when the trial actually starts — not derived fromcreated_at. - Failed renewal: keep access while the provider is retrying; move to
past_dueonly when it gives up. - Resubscribe: cancel the previous subscription at the provider.
- Provisioning is idempotent: the second event for the same customer changes nothing — in particular, it does not issue new credentials.
- Conversion tracking fires once, when the account is created — not on every webhook.
Field notes
references/field-notes.md holds 16 payment failures from production apps, each with symptom, cause and what fixed it. Read it before the first real charge. The three that cost the most:
- The first paying customer got no account, because a field was empty in one object and present in another.
- Checkout died with a "connection" error that was a trailing newline in the secret key.
- Trial access was measured from sign-up instead of activation, locking out people who verified late.
Output
Deliver: the integration choice, the /api/checkout and /api/webhook handlers with signature verification + idempotent fulfillment, the customer-portal redirect, the lifecycle-event handling, and the pricing tiers.
Reference
stripe-samples (checkout-single-subscription, subscription-use-cases, accept-a-payment ~800-900⭐ each, active), Stripe Customer Portal + Build-subscriptions docs, Stripe MCP (stripe/ai ~1.6k⭐), InsForge Stripe integration (agentic-native, via insforge skills).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

