No Stripe headaches.
SDK + UI + usage billing included.
Complete billing system for Next.js. CLI setup, pre-built components, and automatic webhook handling. Stop wrestling with Stripe docs.
3 ways to bill your customers
Start with a complete example, customize from there
SaaS Starter
Complete SaaS template with auth, pricing page, and customer dashboard. Deploy in 10 minutes.
API Billing
Usage-based billing for APIs. Track requests, bill by usage tier, manage API keys.
AI Credits
Credit-based billing for AI apps. Pre-purchase credits, track consumption, top-up flows.
How it works
From zero to billing in 3 simple steps
Run the CLI
One command detects your framework, installs dependencies, and sets up your database.
Connect Stripe
Paste your Stripe keys. We create products, set up webhooks, and configure everything.
Ship your pricing page
Pre-built components ready to customize. Deploy and start accepting payments.
Why not just use Stripe?
You can. But here's what you're signing up for:
Database schema for subscriptions
Stripe Only
Build yourself
@drewsepsi/billing
✓ Included
Webhook handling & retries
Stripe Only
Build yourself
@drewsepsi/billing
✓ Automatic
Customer portal UI
Stripe Only
Build yourself
@drewsepsi/billing
✓ Pre-built
Usage-based billing
Stripe Only
Complex API calls
@drewsepsi/billing
✓ One line
Subscription state management
Stripe Only
Manual sync
@drewsepsi/billing
✓ Automatic
Time to first payment
Stripe Only
2-3 weeks
@drewsepsi/billing
10 minutes
| What you need to do | Stripe Only | @drewsepsi/billing |
|---|---|---|
| Database schema for subscriptions | Build yourself | ✓ Included |
| Webhook handling & retries | Build yourself | ✓ Automatic |
| Customer portal UI | Build yourself | ✓ Pre-built |
| Usage-based billing | Complex API calls | ✓ One line |
| Subscription state management | Manual sync | ✓ Automatic |
| Time to first payment | 2-3 weeks | 10 minutes |
@drewsepsi/billing uses Stripe under the hood. We just handle the hard parts so you don't have to.
Everything you need to bill customers
A complete subscription platform that handles the complexity so you can focus on your product.
Process events exactly once
Our idempotency layer prevents duplicate subscription updates, ensuring your database stays in perfect sync with Stripe.
- Automatic deduplication by event ID
- Subscription lifecycle state machine
- Automatic retry with exponential backoff
Code that writes itself
Full autocomplete and type checking right out of the box. Your editor shows you exactly what's available—no guessing needed.
Never lose a webhook
Failed webhooks don't mean lost data. Our retry system runs every 5 minutes with exponential backoff up to 5 attempts.
Clean, predictable APIs
RESTful endpoints that return exactly what you need. No surprises.
/api/checkoutCreate Stripe checkout session
/api/subscription/:userIdGet subscription status
/api/entitlements/:userIdCheck feature access