agentic-ai-engineering/api
artale ea8d6c7e4d fix: live Stripe keys + prices, fixed checkout API Node server 2026-06-04 13:49:38 +02:00
..
README.md feat: Stripe Checkout integration - api/checkout.js, checkout pages, updated buy page with card+gumroad options 2026-06-04 12:51:28 +02:00
checkout.js fix: live Stripe keys + prices, fixed checkout API Node server 2026-06-04 13:49:38 +02:00

README.md

Checkout API

Serverless Stripe Checkout integration for the Agentic Engineering course.

Deploy

npm install -g wrangler
cd api
wrangler deploy checkout.js --name checkout-api
wrangler secret put STRIPE_SECRET_KEY

Vercel

cd api
vercel deploy --prod
vercel secrets add STRIPE_SECRET_KEY sk_live_...

Standalone

export STRIPE_SECRET_KEY="sk_live_..."
node checkout.js
# Listens on port 8787

Price IDs

Create these products in Stripe Dashboard, then update site/checkout.md with the real price IDs:

Product Amount Stripe Price ID
Self-Paced $97 price_self_paced → replace with real ID
Enterprise $199 price_enterprise → replace with real ID
Cohort $247 price_cohort → replace with real ID

How It Works

  1. User clicks "Buy" → redirected to /checkout?plan=self-paced
  2. Frontend calls /api/checkout with the price ID
  3. API creates a Stripe Checkout Session
  4. User is redirected to Stripe's hosted checkout page
  5. After payment, user is redirected to /checkout/success