stripe-checkout
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.
How do I install this agent skill?
npx skills add https://github.com/melvynx/ai-maxxing-skills --skill stripe-checkoutIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides a structured workflow for implementing Stripe Checkout payments with a strong focus on security best practices, such as signature verification and safe key management. It retrieves supplementary assets from the author's GitHub repository.
- Socketwarn
1 alert: gptAnomaly
- Snykwarn
Risk: MEDIUM · 1 issue
What does this agent skill do?
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:
- The test keys are in the Stripe Dashboard, sandbox, Developers > API keys. The publishable key (
pk_test_...) is public: the user may paste it in the chat. The secret key (sk_test_...) never goes in the chat: give the user one command to run in their Terminal app from the project folder, which asks for the key hidden and saves it server-side, for exampleread -rs 'K?Clé secrète Stripe : ' && npx convex env set STRIPE_SECRET_KEY "$K"; unset K(zsh, the macOS default;read -rspin bash,Read-Host -MaskInputin PowerShell;wrangler secret putalready asks hidden). Check it is set without printing it (npx convex env get STRIPE_SECRET_KEY | cut -c1-8). Store the secret only server-side (Convex env, Cloudflare secret,.env.local), never in aVITE_/NEXT_PUBLIC_variable, never in git. - 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.
- A server endpoint creates a Checkout Session (
mode: "payment"or"subscription") withclient_reference_id/metadata= the user id and product id,customer_emailwhen known,success_urlwith{CHECKOUT_SESSION_ID},cancel_url. - A webhook endpoint handles
checkout.session.completed, pluscharge.refunded/customer.subscription.deletedwhen 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). - For local or dev webhooks, run
stripe listen --forward-to <url>/api/stripe/webhookand use the printed secret. Ifstripeis missing or not paired, run thesetup-stripeskill first. - 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:
- The user gives the live keys (
pk_live_...in the chat,sk_live_...with the same hidden Terminal command, aimed at the production deployment, e.g.npx convex env set --prod). Set them in the production env only. - 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. - Run the
audit-safetyskill on the checkout and webhook. - 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.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/melvynx/ai-maxxing-skills/stripe-checkout">View stripe-checkout on skillZs</a>