add-payments
Skill1 starsChanged 10 months agoMITView on GitHub
Add Stripe subscription payments to any Jack project. Use when: user wants payments, subscriptions, billing, or checkout. Stack-agnostic: works with any framework (Hono, Next.js, Express) and auth library.
- Reads credentials
- Sends data out
2 other projects use a version of this.
Adopted by
Most recently taken up by
- diegovasquez-ai/skills-apptheir own version, first seen Oct 25, 2026
- daniilganiev/telegram-devtheir own version, first seen Oct 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- diegovasquez-ai/skills-app★ 14same name
- daniilganiev/telegram-dev★ 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 repositoryOne other file it gives its agents.
- jack-cloudSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 16 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Ask questions to understand their needs
- Distinctive: line 42
No webhook handlers for subscription events
- Distinctive: line 59
Read the project to understand:
- Distinctive: line 85
Create these (adapt to their stack):
- Very specific: line 138
After deploy, note the URL (e.g., https://username-project.runjack.xyz).
- Distinctive: line 186
If user doesn't have products, create them based on what they need:
- Distinctive: line 190
Ask: "What's the product name and price?"
- Distinctive: line 206
Ask: "What's your plan name and monthly price?"
- Distinctive: line 223
Ask: "What plans do you want?
- Distinctive: line 225
Create each plan with the user's specified names and prices.
- Distinctive: line 251
Check subscription status (should be free/none):
- Distinctive: line 256
Create a checkout session:
- Distinctive: line 265
After checkout, verify subscription is active:
- Very specific: line 270
If subscribed: true, you're done!
- Very specific: line 277
Check STRIPE_WEBHOOK_SECRET matches the endpoint
- Distinctive: line 278
Ensure using raw body (not parsed JSON) for verification
- Distinctive: line 281
Check Stripe Dashboard → Webhooks → Recent deliveries
- Distinctive: line 282
Look for errors in webhook response
- Very specific: line 285
Verify STRIPE_SECRET_KEY is correct
- Distinctive: line 286
Check price ID exists in Stripe
≈ “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.
Files
Add Stripe Payments to Jack Project
You are guiding a user through adding Stripe subscription payments. This is a hands-on guided workflow, not a reference doc.
Your Role
- Ask questions to understand their needs
- Explain what you're doing and why
- Execute actions confidently (don't ask permission for standard steps)
- Guide them through the two-deploy process
Phase 1: Gather Requirements
Before writing any code, ask the user:
- "What type of payments do you need?"
- One-time payment - Customer pays once (e.g., buy a product, lifetime access)
- Single subscription - One recurring plan (e.g., "Premium at $10/month")
- Multiple tiers - Different plans (e.g., "Pro at $19/month, Enterprise at $99/month")
- "Do you have a Stripe account with API keys ready? I'll need your secret key (starts with
sk_test_orsk_live_). Test keys are recommended for initial setup." - "Do you already have products/prices in Stripe, or should I create them?"
Wait for their answers before proceeding.
Adapt Based on Payment Type
One-time payments:
- Simpler schema (no subscription table, just payment records)
- Checkout mode:
paymentinstead ofsubscription - No webhook handlers for subscription events
- Endpoint:
/api/checkout/createreturns one-time checkout URL
Single subscription:
- One price ID in secrets (
STRIPE_PRICE_ID) - Simpler code (no plan comparison logic)
- Standard subscription webhooks
Multiple tiers:
- Multiple price IDs (
STRIPE_PRO_PRICE_ID,STRIPE_ENTERPRISE_PRICE_ID, etc.) - Plan comparison logic in subscription status
- Full subscription webhooks
Phase 2: Analyze Their Stack
Read the project to understand:
- Framework (Hono, Next.js, Express, etc.)
- Auth system (Better Auth, custom, none)
- Database (D1, Drizzle, Prisma, none)
Choose the appropriate reference:
- Hono + Better Auth →
reference/hono-better-auth.md - Hono + custom/no auth →
reference/hono-custom.md - Next.js →
reference/nextjs.md
Phase 3: Implementation
Tell the user what you're creating:
"I'll set up:
- Webhook handler - receives payment events from Stripe
- Checkout endpoints - creates payment sessions
- Subscription endpoints - checks subscription status
- Database schema - stores subscription data
Let me get started."
Required Files
Create these (adapt to their stack):
- Webhook handler at
/api/webhooks/stripe- Verifies Stripe signatures
- Handles:
checkout.session.completed,customer.subscription.*,invoice.* - Uses async signature verification (required for Jack Cloud)
- Checkout endpoint at
/api/checkout/create- Creates Stripe Checkout Session
- Returns redirect URL
- Subscription endpoint at
/api/subscription/status- Returns current subscription state
- Database schema with tables:
user(addstripe_customer_idcolumn)subscription(subscription data)stripe_webhook_event(idempotency)
- Secrets template
.secrets.json.example
Secrets Required
| Secret | Format | When Needed |
STRIPE_SECRET_KEY | sk_test_... or sk_live_... | Always |
STRIPE_WEBHOOK_SECRET | whsec_... | After first deploy |
STRIPE_PRICE_ID | price_... | Single plan/product |
STRIPE_PRO_PRICE_ID | price_... | Multiple tiers only |
STRIPE_ENTERPRISE_PRICE_ID | price_... | Multiple tiers only |
Adapt secret names based on what the user needs. For a single subscription, just use STRIPE_PRICE_ID. For multiple tiers, use descriptive names like STRIPE_PRO_PRICE_ID.
Phase 4: First Deploy
Explain to the user:
"Now I'll deploy the app. Here's what happens next:
- First deploy - Gets us a live URL
- Create Stripe webhook - Points to that URL
- Second deploy - Adds the webhook secret
This two-step process is required because Stripe needs your live URL to create the webhook, and we need the webhook secret for signature verification."
Then deploy:
jack shipAfter deploy, note the URL (e.g., https://username-project.runjack.xyz).
Phase 5: Stripe Webhook Setup
Tell the user:
"Your app is live. Now I'll create the Stripe webhook pointing to your URL."
If user wants you to create it (API):
For one-time payments:
curl -X POST https://api.stripe.com/v1/webhook_endpoints \
-u "STRIPE_SECRET_KEY:" \
-d "url=https://YOUR_URL/api/webhooks/stripe" \
-d "enabled_events[]=checkout.session.completed"For subscriptions:
curl -X POST https://api.stripe.com/v1/webhook_endpoints \
-u "STRIPE_SECRET_KEY:" \
-d "url=https://YOUR_URL/api/webhooks/stripe" \
-d "enabled_events[]=checkout.session.completed" \
-d "enabled_events[]=customer.subscription.created" \
-d "enabled_events[]=customer.subscription.updated" \
-d "enabled_events[]=customer.subscription.deleted" \
-d "enabled_events[]=invoice.paid" \
-d "enabled_events[]=invoice.payment_failed"Extract the secret from the response - it starts with whsec_.
If user prefers Dashboard:
Guide them:
- Go to https://dashboard.stripe.com/webhooks
- Click "Add endpoint"
- Enter URL:
https://YOUR_URL/api/webhooks/stripe - Select events (list them)
- Copy the signing secret
Phase 6: Create Stripe Products (if needed)
If user doesn't have products, create them based on what they need:
One-time payment (single product)
Ask: "What's the product name and price?"
curl -X POST https://api.stripe.com/v1/products \
-u "STRIPE_SECRET_KEY:" \
-d "name=YOUR_PRODUCT_NAME"
curl -X POST https://api.stripe.com/v1/prices \
-u "STRIPE_SECRET_KEY:" \
-d "product=PRODUCT_ID" \
-d "unit_amount=PRICE_IN_CENTS" \
-d "currency=usd"Single subscription
Ask: "What's your plan name and monthly price?"
curl -X POST https://api.stripe.com/v1/products \
-u "STRIPE_SECRET_KEY:" \
-d "name=YOUR_PLAN_NAME"
curl -X POST https://api.stripe.com/v1/prices \
-u "STRIPE_SECRET_KEY:" \
-d "product=PRODUCT_ID" \
-d "unit_amount=PRICE_IN_CENTS" \
-d "currency=usd" \
-d "recurring[interval]=month"Multiple tiers
Ask: "What plans do you want? (e.g., 'Pro at $19/month, Enterprise at $99/month')"
Create each plan with the user's specified names and prices.
Note the price ID(s) for .secrets.json.
Phase 7: Second Deploy
Update .secrets.json with:
STRIPE_WEBHOOK_SECRET(from webhook creation)- Price IDs (if created)
jack shipPhase 8: Verification
Tell the user:
"Everything is deployed. Let's verify it works."
Test the flow:
- Check subscription status (should be free/none):
curl "https://YOUR_URL/api/subscription/status?email=test@example.com"- Create a checkout session:
curl -X POST "https://YOUR_URL/api/checkout/create" \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com"}'- Ask user to complete checkout with test card
4242 4242 4242 4242 - After checkout, verify subscription is active:
curl "https://YOUR_URL/api/subscription/status?email=test@example.com"If subscribed: true, you're done!
Troubleshooting
Webhook returns 400
- Check
STRIPE_WEBHOOK_SECRETmatches the endpoint - Ensure using raw body (not parsed JSON) for verification
Subscription not created
- Check Stripe Dashboard → Webhooks → Recent deliveries
- Look for errors in webhook response
Checkout fails
- Verify
STRIPE_SECRET_KEYis correct - Check price ID exists in Stripe
Reference Examples
Stack-specific code examples (adapt to project's patterns):
- reference/hono-better-auth.md
- reference/hono-custom.md
- reference/nextjs.md
Stripe Documentation
For current API reference: https://docs.stripe.com/llms.txt
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.

