Agent skill

stripe-subscription

Stripe Checkout for recurring subscriptions with Customer Portal. Auto-creates plans if not configured.

Stars 4
Forks 1

Install this agent skill to your Project

npx add-skill https://github.com/rebyteai-template/rebyte-skills/tree/main/stripe-subscription

SKILL.md

Stripe Subscription

Stripe Checkout integration for recurring subscriptions with Customer Portal. No webhook configuration required.

Tech Stack

  • Backend: Express.js
  • Payments: Stripe Checkout + Customer Portal
  • Language: JavaScript
  • Package Manager: npm
  • Port: 4242

Setup

1. Clone the Template

bash
git clone --depth 1 https://github.com/Eng0AI/stripe-subscription.git .

If the directory is not empty:

bash
git clone --depth 1 https://github.com/Eng0AI/stripe-subscription.git _temp_template
mv _temp_template/* _temp_template/.* . 2>/dev/null || true
rm -rf _temp_template

2. Remove Git History (Optional)

bash
rm -rf .git
git init

3. Install Dependencies

bash
npm install

4. Setup Environment Variables

bash
cp .env.example .env

Required:

  • STRIPE_SECRET_KEY - Your Stripe secret key (sk_test_xxx)
  • STRIPE_PUBLISHABLE_KEY - Your Stripe publishable key (pk_test_xxx)

Optional (auto-created if not set):

  • BASIC_PRICE - Price ID for Starter plan ($12/month default)
  • PRO_PRICE - Price ID for Professional plan ($18/month default)

5. Start the Server

bash
npm start

Server runs at http://localhost:4242. If price IDs are not set, it auto-creates subscription plans.

Deploy to Vercel

Step 1: Create Serverless API Wrapper

Create api/index.js with the Stripe subscription logic (see full deploy guide).

Step 2: Create Vercel Config

Create vercel.json:

json
{
  "version": 2,
  "buildCommand": "",
  "outputDirectory": "client/html",
  "rewrites": [
    { "source": "/config", "destination": "/api" },
    { "source": "/checkout-session", "destination": "/api" },
    { "source": "/create-checkout-session", "destination": "/api" },
    { "source": "/customer-portal", "destination": "/api" }
  ]
}

Step 3: Set Environment Variables

bash
printf "YOUR_SECRET_KEY" | vercel env add STRIPE_SECRET_KEY production -t $VERCEL_TOKEN
printf "YOUR_PUBLISHABLE_KEY" | vercel env add STRIPE_PUBLISHABLE_KEY production -t $VERCEL_TOKEN

Step 4: Deploy

bash
vercel --prod -t $VERCEL_TOKEN --yes

Deploy to Netlify

Create netlify/functions/api.js and netlify.toml with similar configuration, then:

bash
netlify deploy --prod

Testing

Use test card numbers:

  • Success: 4242 4242 4242 4242
  • Decline: 4000 0000 0000 0002

Customer Portal Configuration

Before going live, configure at Stripe Dashboard > Settings > Billing > Customer Portal:

  • Enable: Update payment method, Cancel subscription, Switch plans

Going Live

  1. Replace test keys with live keys (sk_live_/pk_live_)
  2. Create subscription products in Stripe Dashboard Live mode
  3. Complete Stripe account verification (KYC)
  4. Configure Customer Portal for live mode
  5. Test with a real subscription

Expand your agent's capabilities with these related and highly-rated skills.

rebyteai-template/rebyte-skills

natural-language-postgres-presentation

Presentation-focused Natural Language to SQL app with PPT-style visualizations.

4 1
Explore
rebyteai-template/rebyte-skills

formsmd-builder

Build stylish, Typeform-like multi-step forms and surveys using Forms.md library. Use when user asks to: create a form, build a survey, make a questionnaire, create an onboarding flow, build a feedback form, or any multi-step data collection UI. Outputs standalone HTML files with embedded CSS/JS that can be deployed anywhere.

4 1
Explore
rebyteai-template/rebyte-skills

financial-deep-research

Conduct enterprise-grade financial research with multi-source synthesis, regulatory compliance tracking, and verified market analysis. Use when user needs comprehensive financial analysis requiring 10+ sources, verified claims, market comparisons, or investment research. Triggers include "financial research", "market analysis", "investment analysis", "due diligence", "financial deep dive", "compare stocks/funds", or "analyze [company/sector]". Do NOT use for simple stock quotes, basic company lookups, or questions answerable with 1-2 searches.

4 1
Explore
rebyteai-template/rebyte-skills

gatsby-ecommerce-netlify

Gatsby e-commerce starter with styled components for Netlify.

4 1
Explore
rebyteai-template/rebyte-skills

market-data

Access US stock market data including price bars, news with sentiment, and company details via eng0 data API. Use when user asks for stock prices, OHLCV data, price history, stock news, or company information. Triggers include "stock price", "price history", "OHLCV", "stock news", "company info", "market data", "ticker data". Do NOT use for SEC filings (use sec-edgar-skill instead).

4 1
Explore
rebyteai-template/rebyte-skills

tailadmin-nextjs

Next.js 16 admin dashboard with 30+ components, Tailwind CSS 4, ApexCharts, dark mode.

4 1
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results