Why use Lumen?

Lumen makes it easy to build complex pricing plans for your SaaS product.

A Simple Example

Billing will be easy, right? Just charge a credit card.

Example: You're selling a SaaS like ChatGPT to businesses with seat-based pricing. You want to give 100 monthly AI messages for premium models, 1000 for cheaper models, then charge overage at $0.20 per message (premium) or $0.02 per message (cheaper).

Building this with Stripe means building your own entitlement system to track real-time usage per seat, handling mid-cycle changes, refunds, prorations, taxes, and a high-volume event system that aggregates usage before each request.

With Lumen, this works in 5 minutes. We handle real-time event ingestion, usage aggregation, credits, tax, and invoices.

We integrate with any payment provider - keep using Stripe or email us to integrate with your choice.

Features, not plans

With Stripe, developers typically scatter plan-based checks throughout their code:

if (plan === "pro") {
  // give access to expensive feature A here
}
if (plan === "plus" || plan === "pro") {
  // give access to cheaper feature B here
  // also give access to feature C
}

Scenario: Your CRO discovers "advanced analytics" drives conversions and wants it on the free plan with a 7-day trial. Engineers must find and update every conditional without breaking functionality, plus figure out how to implement the trial.

With Lumen, your code checks features, not plans:

if (
  await isFeatureEntitled({ feature: "advanced-analytics", userId: user.id })
) {
  // give access
}

This decouples code from pricing. Change which plans get which features, adjust credits, modify prices, or grant individual customer overrides - all without touching code.

No Webhooks to Manage

Traditional payment processors force you to manage state.

You get a webhook when a subscription is created. You store the customerId and subscriptionId in your database. Another webhook when a payment succeeds - update a status field. Another when payment fails.

Your application becomes a distributed system constantly syncing local state with a remote service.

This is brittle. Miss a webhook and user access might be incorrectly revoked or they won't get access to paid features. Your database is out of sync and requires manual reconciliation. Every pricing change means revisiting this fragile logic.

With Lumen, there are no webhooks to manage and no state to sync. Lumen is the source of truth. Ask our SDK at runtime:

// Is this user entitled to the 'pro-feature'?
const canAccess = await isFeatureEntitled({
  feature: "advanced-analytics",
  userId: user.id,
});

// How many API calls has this user made this month?
const featuresUsage = await getUsage({ userId: "..." });
// returns usage for each feature along with limits based on credits

This removes entire bug categories and simplifies your architecture. No state-management system just to get paid.

What Lumen Handles

  • Flexible Pricing: Model anything - fixed fees, per-seat, usage-based tiers, or combinations with different billing cycles. Your pricing model lives in Lumen, not in code.
  • Credits & Entitlements: Native support for usage credits and monetary discounts. Track entitlements and apply credits without building a separate ledger.
  • Usage & Metering: We ingest high-volume events and handle aggregation. Your app reports events; we do the math.
  • Versioned History: Every plan or subscription change is versioned. Complete, auditable history makes debugging and compliance simple.

You no longer need to build and maintain:

  • A webhook ingestion and state-syncing system
  • An event metering and aggregation pipeline
  • A credit ledger and proration calculator
  • Fragile plan logic scattered across your codebase