agentleFS
MelvynxMelvynx/ai-maxxing-skills/skills/stripe-checkout/SKILL.md

stripe-checkout

Skill32 starsChanged 26 days agoMITView on GitHub

Add Stripe Checkout payments to a web app, test mode first, then production. Use when the user wants to sell, take payments, wire Stripe keys, a checkout, a webhook, a success page, refunds, or move Stripe from test to live.

  • Reads credentials

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If you got this skill from a link instead of a local folder, install nothing else from the repo: fetch a file only when a step needs it, …

    line 8
  2. Very specific:

    Ask the user for the test keys (Stripe Dashboard, sandbox, Developers > API keys): pk_test_...

    line 12
  3. Distinctive:

    Create the product and price (or one per product) with the Stripe API or CLI.

    line 13
  4. Very specific:

    Create the live products and prices, and the live webhook endpoint on the production URL with the same events.

    line 24
  5. Very specific:

    Run the audit-safety skill on the checkout and webhook.

    line 25

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Ship payments that grant access only from a verified Stripe event. Never print, log or commit keys, and never use live keys in dev.

If you got this skill from a link instead of a local folder, install nothing else from the repo: fetch a file only when a step needs it, with curl -fsSL https://raw.githubusercontent.com/Melvynx/ai-maxxing-skills/main/skills/stripe-checkout/<path> -o <scratch>/<file>, and read another skill it names only when you reach it, from https://raw.githubusercontent.com/Melvynx/ai-maxxing-skills/main/skills/<skill-name>/SKILL.md.

Build it in test mode:

  1. Ask the user for the test keys (Stripe Dashboard, sandbox, Developers > API keys): pk_test_... and sk_test_.... Store the secret only server-side (Convex env, Cloudflare secret, .env.local), never in a VITE_/NEXT_PUBLIC_ variable, never in git.
  2. Create the product and price (or one per product) with the Stripe API or CLI; keep the price IDs in config, never trust a price sent by the browser.
  3. A server endpoint creates a Checkout Session (mode: "payment" or "subscription") with client_reference_id / metadata = the user id and product id, customer_email when known, success_url with {CHECKOUT_SESSION_ID}, cancel_url.
  4. A webhook endpoint handles checkout.session.completed, plus charge.refunded / customer.subscription.deleted when relevant. It reads the raw body and verifies the signature with the webhook secret (whsec_...), stores the event or session id to ignore duplicates, grants access from the verified session (never from the success page or a URL parameter), and upserts the buyer in the email tool (subscribed, product tag).
  5. For local or dev webhooks, run stripe listen --forward-to <url>/api/stripe/webhook and use the printed secret. If stripe is missing or not paired, run the setup-stripe skill first.
  6. The success page reads the session server-side and shows "access unlocked" or "payment processing".

Test end to end: logged out, with a new email, pay with 4242 4242 4242 4242, any future date, any CVC. Check the success page, the login code email, the product unlocked in the member area, the order row in the database, and one webhook delivery marked 200 in Stripe. Also try a declined card (4000 0000 0000 0002) and a second delivery of the same event.

Go live only when the user says the test flow works:

  1. The user gives the live keys (pk_live_..., sk_live_...). Set them in the production env only.
  2. Create the live products and prices, and the live webhook endpoint on the production URL with the same events; store its whsec_ secret in production.
  3. Run the audit-safety skill on the checkout and webhook.
  4. Deploy, then ask the user for one real purchase (or a 100 % coupon) and verify the same checks. Refund it if it was a test.

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.