Products & Prices
Set up and manage your subscription products in Stripe.
Setup Steps
- Log into Stripe Dashboard
- Enable Test Mode (top-right toggle)
- Create products with exact names below
- Add metadata for each product
- Copy price IDs to your .env file
Required Product Names
# Free PlanName: prod_freeDescription: Basic features for individualsPrice: $0/month# Basic PlanName: prod_basicDescription: Essential features for small teamsPrices:- Monthly: $10/month- Yearly: $100/year (save ~17%)# Pro PlanName: prod_proDescription: Advanced features for growing businessesPrices:- Monthly: $25/month- Yearly: $250/year (save ~17%)# Enterprise PlanName: prod_enterpriseDescription: Custom solutions for large organizationsPrice: Contact Sales# Lifetime PlansName: prod_lifetime_tier1Description: One-time payment for Basic features foreverPrice: $299 (one-time)Name: prod_lifetime_tier2Description: One-time payment for Pro features foreverPrice: $699 (one-time)
Adding Product Metadata
Each product requires specific metadata in Stripe. Follow these steps:
Steps to Add Metadata
- Go to Products in Stripe Dashboard
- Select the product you want to edit
- Scroll to "Metadata" section
- Click "Add metadata"
- Add "features" as the key
- Add the features array as a JSON string, example:
["Basic dashboard", "Limited API calls", "Email support"]
Important
The features array must be a valid JSON string with double quotes. Make sure to use the exact product names as shown above.
Adding New Products
1. Add to Database
Run these queries in Supabase SQL editor:
-- Add new productINSERT INTO products (id, active, name, description, metadata)VALUES ('prod_new_tier',true,'New Plan','Description here','{"features": ["Feature 1", "Feature 2"]}');-- Add pricesINSERT INTO prices (id, product_id, active, description, unit_amount, currency, type, interval)VALUES('price_new_monthly', 'prod_new_tier', true, 'Monthly', 2000, 'usd', 'recurring', 'month'),('price_new_yearly', 'prod_new_tier', true, 'Yearly', 20000, 'usd', 'recurring', 'year');
2. Create in Stripe
- Create product with exact name matching database
- Add monthly and yearly prices if needed
- Add features metadata as JSON array
- Update price IDs in database
Changing Prices
Important: Update Both Systems
Always update database first, then create new prices in Stripe. Never modify existing prices.
1. Update Database
- Open Supabase Table Editor
- Find price in 'prices' table
- Update unit_amount (in cents)
2. Update Stripe
- Create new price in Stripe Dashboard
- Archive old price
- Update stripe_price_id in database
Existing Subscriptions
Price changes don't affect existing subscriptions. Consider grandfathering or migration strategy.