agentleFS
whawkinsivwhawkinsiv/claude-code-skills/skills/payments/SKILL.md

payments

Skill258 starsChanged 28 days agoMITView on GitHub

Use this skill to take money: 'set up Stripe,' 'add subscriptions,' 'payment link,' 'billing,' 'customer portal,' 'webhooks,' 'failed payments,' 'sales tax or VAT,' or 'refunds.' Starts with a payment link or invoice for the first customers, then sets up Stripe Checkout, the customer portal, and webhooks that grant access, with test and go-live checklists. Not for deciding what to charge (use pricing).

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use integrations.

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.
  • rohinipachantaSkill

    integrations

    Use when connecting Claude to external apps (Slack, GitHub, Gmail, etc.) using the Composio Connect framework.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use a Stripe Payment Link or an invoice.

    line 14
  2. Distinctive:

    Create products and prices in the Stripe Dashboard,: not in code. Reference them by price ID or lookup key.

    line 18
  3. Distinctive:

    When registration is required depends on the place and on sales volume.

    line 60

“Common” is measured: kept by at least 6 in 10 of the 8 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Payments

Take money with the least code that works. Stripe is the default for a solo founder: hosted checkout, a hosted billing portal, and good test tools.

Stage 1: The first customers

Use a Stripe Payment Link or an invoice. No billing code. The founder grants access by hand after each payment. This works for the first 10 customers and often longer. Build billing in the app when granting access by hand starts taking real time.

Stage 2: Billing in the app

  1. Create products and prices in the Stripe Dashboard, not in code. Reference them by price ID or lookup key.
  2. Use Stripe Checkout (the hosted payment page). Do not build a card form.
  3. Use the Customer Portal for card updates, plan changes, cancellations, and invoices. Do not build a billing page. Set cancellation to happen at the end of the billing period, and turn on the cancellation-reason question.
  4. Store each customer's subscription status in the database, updated only from webhooks.
  5. Set trials when you create the Checkout session or the subscription.

Webhooks

Grant access from the verified webhook, never from the redirect page. The redirect can fail, and anyone can load it. Handle at least:

EventDo
checkout.session.completedActivate the subscription and grant access
customer.subscription.updatedUpdate the plan and status
customer.subscription.deletedRemove paid access
invoice.payment_failedShow an "update your card" banner

Every webhook endpoint:

  • verifies the signature before acting
  • returns a success response quickly, and does slow work afterwards
  • handles duplicate events safely: store the event ID and skip repeats
  • logs the event type and ID, so failures can be traced

Subscription states

StatusThe app should
activeGive paid access
active, set to cancel at period endKeep access until the period ends
past_dueKeep access for now, and show the update-card banner
canceled or unpaidRemove paid access. Keep the data.

Failed payments

Turn on Stripe's automatic retries and its emails about failed payments and expiring cards. Show the banner in the app. Failed cards cause a large share of churn, and most of it is recoverable.

Tax

Decide before the first sale in a new country or state:

  • Stripe Tax calculates and collects tax. Registering and filing are still the founder's job.
  • A merchant of record (such as Paddle or Lemon Squeezy) sells on the founder's behalf and handles registration and filing, for higher fees.

When registration is required depends on the place and on sales volume. Check the current rules for where customers are, and ask an accountant once revenue starts.

Test before going live

In test mode:

  • A successful purchase (card 4242 4242 4242 4242)
  • A declined card (4000 0000 0000 0002)
  • A card that needs authentication (4000 0025 0000 3155)
  • Cancel, upgrade, and downgrade
  • Each webhook arrives and updates the database (check the webhook logs in Stripe)

Going live:

  • Live keys in production's environment variables
  • A live webhook endpoint with its own signing secret
  • One real purchase with your own card, then a refund

Rules

  • Prices live in Stripe, not in code. Changing a price should not need a deploy.
  • Never store card numbers. Checkout keeps card data off your server.
  • Check current fees on Stripe's pricing page. Fees change, so do not rely on numbers in old notes.

Output

The working payment flow for the founder's stage, the completed test checklist, and a note on the tax decision.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.