Pricing & Credits
Understanding and configuring BetterLearn's credit-based system for AI-powered features.
💳 Credit System
BetterLearn uses a credit-based system for AI features. Users purchase credits and spend them on:
- Quiz Generation: Creating quizzes from documents or topics
- AI Tools: Using Educator and Student tools
- AI Assistant: Chat interactions and generations
- Image Generation: AI-generated images
🎛️ Managing Pricing Plans
Admin Panel
Pricing plans are managed entirely from the Admin Panel → Pricing section. No code changes needed!
Creating Plans
- Go to Admin Panel → Pricing
- Click "Add New Plan"
- Configure: Name, Credits, Price, Features
- Save and the plan auto-syncs with Stripe
Plan Configuration
| Field | Description |
|---|---|
| Name | Display name (e.g., "Starter Pack") |
| Credits | Number of credits included |
| Price | USD price (Stripe handles conversion) |
| Features | Feature list shown on pricing card |
| Popular | Mark as recommended/highlighted |
| Active | Show/hide on pricing page |
⚡ Credit Costs
Default credit costs per action:
| Action | Credits |
|---|---|
| Quiz generation (per quiz) | 1-3 credits |
| AI Tool usage | 1 credit |
| AI Assistant message | 1 credit |
| Image generation | 2 credits |
Credit Cost Configuration
Credit costs are defined in the codebase. Modify lib/credit-validation.ts to adjust costs.
🔄 Stripe Integration
When a user purchases credits:
- User selects a plan on the Subscription page
- Redirected to Stripe Checkout
- Payment processed by Stripe
- Webhook triggers credit addition
- Credits appear in user's wallet
🎁 Free Credits
New users receive free credits on signup (configurable in Site Settings).
Admin Credit Management
Admins can manually adjust user credits:
- Admin Panel → Users
- Find user and click "Manage Credits"
- Add or remove credits
📊 Credit Analytics
Track credit usage in Admin Panel → Analytics:
- Total credits purchased
- Credits consumed by feature
- Revenue trends
- User spending patterns