• Pricing
  • Blog
Log inBook a demo

Metered Template

Usage-based billing with included amounts and end-of-period overage. Track API calls, storage, and email sends.

Templates
Live DemoSource
Metered Template

Next.js SaaS template for products that charge by usage — API calls, storage, email sends. Two plans (Starter, Pro) with included usage amounts per feature.

Usage above the included limits is billed as overage at the end of each billing period. Your customers keep a predictable base price and pay more only when they use more.

Stack: Next.js 16, Better Auth, Drizzle ORM, PostgreSQL, Commet SDK

Quick Start

commet create my-app -t metered
cd my-app
pnpm install
pnpm dev

What's Included

  • Two plans with monthly and yearly prices
  • Three metered features: API Calls, Storage, Email Sends
  • Included usage per plan with overage billing
  • Usage tracking via Commet SDK
  • Usage overview dashboard showing current vs included
  • Customer billing portal
  • Pricing page with included amounts

Key Files

  • lib/auth/auth.ts — Better Auth + Commet plugin with usage module
  • lib/payments/commet.ts — Checkout session creation
  • app/(dashboard)/dashboard/page.tsx — Usage overview with current vs included
  • app/pricing/page.tsx — Dynamic pricing with included amounts
  • app/api/commet/portal/route.ts — Customer portal redirect

Learn More

  • Consumption Models — Metered model details
  • Track Usage
  • Customer Portal

Run commet create my-app -t metered to start from this template, or browse the source on GitHub.

Subscription billing built for developers and agents

Get startedBook a demo

Accept global payments, handle usage-based pricing, subscriptions, and seats — without building your own infrastructure.

Status unavailable

Frameworks

  • Next.js
  • Remix
  • Nuxt
  • SvelteKit
  • Astro
  • Express
  • Hono
  • Django
  • FastAPI

Resources

  • Documentation
  • Guides
  • Blog
  • Templates
  • Changelog
  • Glossary
  • Billing for AI models

Company

  • Solutions
  • About
  • Open Source

Compare

  • Stripe Billing
  • Orb
  • Chargebee
  • Lago
  • Autumn
  • Yuno

AI

  • Commet Agents
  • MCP Server
  • Skills
  • Claude Code
  • Codex
  • Cursor
Follow us
© 2026 Commet Co.TermsPrivacy PolicyCookie Policy