- Go to Stripe Dashboard
- Copy your Publishable key (starts with
pk_test_) - Copy your Secret key (starts with
sk_test_)
Add these to your .env file:
# Stripe API Keys
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key_here
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret_here
# Base Application URL (used for Stripe redirects)
DOMAIN_SERVER=http://164.92.145.114:3080 # Your production URL
# DOMAIN_SERVER=http://localhost:3080 # For local development
# Simplified Stripe Price IDs
STRIPE_EVE_PRO=price_your_pro_price_id # $29/month Pro tier
STRIPE_EVE_MAX=price_your_max_price_id # $99/month Max tier
STRIPE_EVE_PRO_YEARLY=price_your_pro_yearly_id # Pro tier yearly (17% discount)
STRIPE_EVE_MAX_YEARLY=price_your_max_yearly_id # Max tier yearly (17% discount)The system automatically generates Stripe redirect URLs based on DOMAIN_SERVER:
- Success URL:
${DOMAIN_SERVER}/pricing?success=true - Cancel URL:
${DOMAIN_SERVER}/pricing?canceled=true - Billing Portal Return URL:
${DOMAIN_SERVER}/pricing
This ensures your Stripe integration works across different environments (development, staging, production) without hardcoding URLs.
Simplified to 2 pricing tiers with monthly and yearly options:
| Tier | Monthly Price | Yearly Price | Monthly Variable | Yearly Variable | Credits |
|---|---|---|---|---|---|
| Pro | $29 | $290 (17% off) | STRIPE_EVE_PRO | STRIPE_EVE_PRO_YEARLY | Configurable in librechat.yaml (default: 15M) |
| Max | $99 | $990 (17% off) | STRIPE_EVE_MAX | STRIPE_EVE_MAX_YEARLY | Configurable in librechat.yaml (default: 60M) |
You need to create products in Stripe Dashboard for the simplified tiers:
- Eve Pro Monthly - $29/month - Configurable credits (default: 15,000,000)
- Eve Pro Yearly - $290/year - Configurable credits (default: 15,000,000) - 17% discount
- Eve Max Monthly - $99/month - Configurable credits (default: 60,000,000)
- Eve Max Yearly - $990/year - Configurable credits (default: 60,000,000) - 17% discount
- Go to Stripe Products
- Click + Add product
- For each product:
- Eve Pro Monthly: Name: "Eve Pro", Description: "Monthly subscription with configurable credits, request custom apps and tools, priority support", Price: $29/month
- Eve Pro Yearly: Name: "Eve Pro", Description: "Yearly subscription with configurable credits, request custom apps and tools, priority support", Price: $290/year
- Eve Max Monthly: Name: "Eve Max", Description: "Monthly subscription with configurable credits, request custom apps and tools, priority support", Price: $99/month
- Eve Max Yearly: Name: "Eve Max", Description: "Yearly subscription with configurable credits, request custom apps and tools, priority support", Price: $990/year
- Save the Price ID (starts with
price_) - you'll need these
After creating each product, copy the Price ID and add it to your .env file:
- Eve Pro Monthly →
STRIPE_EVE_PRO=price_xxxxx - Eve Pro Yearly →
STRIPE_EVE_PRO_YEARLY=price_xxxxx - Eve Max Monthly →
STRIPE_EVE_MAX=price_xxxxx - Eve Max Yearly →
STRIPE_EVE_MAX_YEARLY=price_xxxxx
- Go to Stripe Webhooks
- Click + Add endpoint
- Set endpoint URL:
http://localhost:3080/api/stripe/webhook - Select events to send:
checkout.session.completedcustomer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedinvoice.payment_succeededinvoice.payment_failed
- Copy the Signing secret and add to
.envasSTRIPE_WEBHOOK_SECRET
✅ Completed:
- Stripe service created
- Checkout routes implemented
- Webhook handlers set up
- Pricing page integration
- Environment configuration
- Test Mode: Make sure you're using test keys (
sk_test_andpk_test_) - Test Cards: Use Stripe test cards
- Success:
4242424242424242 - Decline:
4000000000000002
- Success:
- Webhook Testing: Use Stripe CLI for local webhook testing
- ✅ Complete Stripe product setup in dashboard
- ✅ Get your API keys and add to
.env - ✅ Set up webhooks
- ✅ Test the payment flow
- 🔄 Ready to test! - The integration is complete
- Use test mode for development (keys start with
sk_test_andpk_test_) - Webhooks are crucial for handling subscription events
- Store subscription data in your database to track user plans
- Implement proper error handling for failed payments
- Security: Never expose secret keys in frontend code