Quick Start
Stripe Dashboard Setup
Option 1: Docker Compose (Easiest)
# Clone the repo
git clone https://github.com/stripe402/stripe402.git
cd stripe402
# Copy the example env file and add your Stripe test keys
cp apps/example/.env.example apps/example/.env
# Edit apps/example/.env with your keys from https://dashboard.stripe.com/test/apikeys
# Start everything
docker compose up -d
# Test a free endpoint
curl http://localhost:3000/api/health
# => {"status":"ok"}
# Test a paid endpoint (returns 402)
curl -i http://localhost:3000/api/joke
# => HTTP/1.1 402 Payment Required
# => payment-required: <base64 JSON>Option 2: Minimal Server
1. Install dependencies
2. Create the server
3. Run it
4. Test it
Minimal Client
Next Steps
Last updated