Stripe Billing .

Evines includes a complete subscription system. You need to link your Stripe products to the definitions in the application configuration.

Test Mode Active

You can simulate payments using Stripe's official test card. No real money will be charged.

Test Card Number

4242 4242 4242 4242

1. API Keys

Get your keys from the Stripe Dashboard and add them to your .env:

STRIPE_SECRET_KEY="sk_test_..."

NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..."

2. Products & Config File

Create your products (Pro & Elite) in Stripe with monthly and yearly prices. Copy the **Price IDs** (e.g., price_...) into your .env.

Names, descriptions, and features displayed on the Pricing page are customizable in:config/plans.ts.

3. Webhooks (Local Dev)

To update your database upon payment, you must listen to Stripe events. Use the Stripe CLI:

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

Note: Use /webhook/stripe (singular). Copy the whsec_... key into STRIPE_WEBHOOK_SECRET.

4. Customer Portal Configuration

In your Stripe Billing Portal settings, ensure you enable:

  • Switch plans: Allow customers to upgrade/downgrade between Pro and Elite.
  • Cancel subscriptions: Set to "Cancel immediately".

Mission Accomplished!

Your SaaS is now production-ready.

You can now customize the UI and build your unique features.