Echo

Stripe Setup

Set up Stripe for payments and webhooks in your Echo website

What is Stripe?

Payment processing made simple

Stripe handles payments, subscriptions, and webhooks. Echo uses Stripe for one-time payments for CLI access. Webhooks notify your application when payments are completed.

1

Create Stripe Account

Set up your Stripe account

  1. Go to stripe.com and create an account
  2. Complete business verification
  3. Get your API keys from DevelopersAPI keys
2

Get API Keys

Copy your Stripe credentials

From Developers → API keys:

  • Secret keySTRIPE_SECRET_KEY Keep secret!
  • Publishable keyNEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
# Add to .env.local:
STRIPE_SECRET_KEY=sk_test_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
3

Create Product and Price

Set up your CLI access product

  1. Go to ProductsCreate product
  2. Name: "Echo Boilerplate CLI Access"
  3. Set price: $99 (one-time payment)
  4. Copy the Price IDSTRIPE_PRICE_ID
STRIPE_PRICE_ID=price_...
4

Set Up Webhook

Configure webhook endpoint for payment events

Your webhook endpoint:

Production: https://yourdomain.com/api/stripe/webhook
Local: http://localhost:3000/api/stripe/webhook
  1. Go to DevelopersWebhooks
  2. Click Add endpoint
  3. Enter your webhook URL
  4. Select events to listen to:
    • checkout.session.completed
    • customer.subscription.created
    • customer.subscription.updated
  5. Click Add endpoint
  6. Copy the Signing secretSTRIPE_WEBHOOK_SECRET

Important:

The webhook secret starts with whsec_. Make sure to copy it completely and add it to your Vercel environment variables.

Testing Webhooks Locally

Use Stripe CLI for local development

Install Stripe CLI:

# Windows (using Scoop)
scoop install stripe
# Or download from:
https://stripe.com/docs/stripe-cli

Forward webhooks:

stripe listen --forward-to localhost:3000/api/stripe/webhook

This will give you a new webhook secret for local testing.

Complete Environment Variables

# Stripe Configuration
STRIPE_SECRET_KEY=sk_test_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_PRICE_ID=price_...
STRIPE_WEBHOOK_SECRET=whsec_...