DM founders:
[email protected]
The fastest way to add billing and feature access to your SaaS. Lumen is PSP agnostic and support merchants in India, United States and Europe through our integrations with Stripe & Dodo Payments. Integrations for Paddle, checkout.com, Razorpay and Adyen coming soon.
Lumen is a modern billing and entitlements platform that eliminates the complexity of implementing subscription management and feature access control. Unlike traditional approaches that scatter plan-based logic throughout your codebase, Lumen focuses on features instead of plans, making it trivial to modify pricing strategies without touching your code.
Most developers implement Stripe with plan-based checks scattered throughout their codebase:
if (plan === "gold") {
// give access to feature A
}
if (plan === "gold" || plan === "enterprise") {
// give access to advanced analytics
// also give access to feature B
}
When your business needs change (like moving a feature to a different plan or adding a free trial), engineers must hunt down and update every conditional without breaking existing functionality.
Lumen eliminates plan-based logic by focusing on features:
if (
await isFeatureEntitled({ feature: "advanced-analytics", userId: user.id })
) {
// give access
}
With this approach, your CRO can add the "advanced-analytics" feature to any plan with any trial period via the Lumen Dashboard, and everything just works!
- Feature-First Architecture: Structure your code around features, not plans
- No Webhook Management: We handle all the complex Stripe webhook orchestration
- Built-in UI Components: Ready-to-use React components for pricing tables and usage tracking
- Usage-Based Billing: Track and bill for feature usage automatically
- High Rate Limits: Call our APIs as much as you need without worrying about limits
- Dashboard Management: Non-technical team members can manage pricing without code changes
npm install @getlumen/server
npx shadcn@latest add https://getlumen.dev/pricing-table.json
import { PricingTable } from "@/components/ui/pricing-table";
export default function PricingPage() {
return (
<PricingTable
lumenPublishableKey={process.env.NEXT_PUBLIC_LUMEN_PUBLISHABLE_KEY}
userId={session?.user?.id}
loginRedirectUrl="/login"
/>
);
}
import { sendEvent, isFeatureEntitled } from "@getlumen/server";
export async function POST(request: NextRequest) {
const { user } = await getUser();
if (
await isFeatureEntitled({
feature: "ai-chat-requests",
userId: user.id,
})
) {
// Your feature logic here...
// Track usage after completion
await sendEvent({
name: "ai-chat-requests",
userId: user.id,
});
}
}
- 📖 Full Documentation: docs.getlumen.dev
- 🚀 Getting Started Guide: docs.getlumen.dev/getting-started
- 🎨 UI Components:
- 📊 API Reference: docs.getlumen.dev/api-reference
- 🆚 Lumen vs Stripe: docs.getlumen.dev/lumen-vs-stripe
- Start all services:
bun run dev
- Install ALL dependencies:
bun install
(at root) - Clean node modules and install everything fresh:
bun run npm:delete-all && bun install
- Clean DB, generate new schema and apply:
bun run db:reset-schema
- Generate changes to the better-auth schema in the correct location:
bun run better-auth:generate-schema
- Stop Docker services:
bun run docker:down
- Base URL: http://localhost:8000
- Next.js Frontend: http://localhost:3000
-
PostgreSQL: localhost:5432
- Database Name: lumen
- Username: lumen
- Password: lumen_local
-
MinIO:
- API: http://localhost:9000
- Console: http://localhost:9001
- Access Key: lumen_minio
- Secret Key: lumen_minio_local
-
pgAdmin: http://localhost:5050
- Email: [email protected]
- Password: lumen_admin
When you first log in to pgAdmin, you'll need to add the PostgreSQL server connection with these details:
- Host: postgres (use the service name from docker-compose)
- Port: 5432
- Database: lumen
- Username: lumen
- Password: lumen_local
- Next.js Frontend: http://localhost:3000
- pgAdmin: http://localhost:5050 (login with
[email protected]
/lumen_admin
) - MinIO Console: http://localhost:9001 (login with
lumen_minio
/lumen_minio_local
)