Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 918 Bytes

File metadata and controls

34 lines (25 loc) · 918 Bytes

Stripe Setup Instructions

Environment Variables

Add these variables to your .env.local file:

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

Stripe Dashboard Setup

  1. Create Products in Stripe Dashboard:

    • Monthly Plan: $29/month
    • Quarterly Plan: $79/3 months
    • Semi-Annual Plan: $149/6 months
  2. Set up Webhooks:

    • Endpoint: https://yourdomain.com/api/stripe/webhooks
    • Events: customer.subscription.created, customer.subscription.updated, customer.subscription.deleted
  3. Get API Keys:

    • Secret Key: Dashboard → Developers → API Keys
    • Publishable Key: Dashboard → Developers → API Keys
    • Webhook Secret: Dashboard → Developers → Webhooks → Select endpoint → Signing secret

Installation

npm install stripe @stripe/stripe-js