CommetCommet
GitHubDiscordStatus
Introduction

Quickstart

Create an API KeyQuickstart

Learn

Resources

SDK ReferenceAPI VersioningError HandlingTestingCLIExamples

Plugins

Better Auth
DocumentationKnowledge BaseBuild with AIAPI ReferenceWebhooks

Introduction

Measure consumption, manage subscriptions, and accept payments for your SaaS or AI product with Commet.

Commet is a billing and payments platform for SaaS and AI products. It connects what your customers use with what they pay: subscriptions, usage charges, credits, and one-time payments.

You define what you sell and how you price it. Commet manages the billing cycle, invoices, and payment flows. Your application reports consumption and uses Commet's access checks and events to decide what each customer can do.

Quickstart

Go from creating an account to your first subscription and test payment.

Build with an agent

Connect your assistant to Commet's documentation and API through MCP.

What can you build with Commet?

Subscriptions that match your product

Sell a monthly or annual plan with a fixed price, usage charges, or a combination of both. Define features such as API calls, team seats, storage, or access to a capability, then package them into plans.

A subscription connects a customer to a plan. Commet manages its billing cycle and invoices as the subscription renews or changes. You can offer trials, handle upgrades and downgrades, and configure failed-payment recovery.

Pricing based on consumption

An AI request, an API call, and a stored file represent different kinds of usage. Commet lets you define how that usage affects the customer's bill or available allowance.

Each plan has one consumption model:

ModelHow it treats usage
MeteredMeasures usage against each feature's included allowance, with overage charges when configured.
CreditsDeducts credits from a shared pool as customers use features.
BalanceConverts usage into monetary amounts drawn from the customer's balance, with overage behavior defined by the plan.

Your application reports usage to Commet. For AI products, token billing uses the model and token counts you report to calculate consumption with your configured margin. You can also manage team seats and quantities such as stored resources.

One-time purchases and optional extras

Accept a one-time payment without creating a plan or subscription. This is useful for a standalone purchase or service alongside your recurring product.

For subscribers, offer add-ons to extend a plan, credit packs for more consumption, or balance top-ups. These give customers a way to buy more without changing their entire subscription.

A billing experience customers can manage themselves

Use checkout to collect payment and the customer portal to let customers view invoices, update payment methods, and review usage. Configure plan groups to offer self-service plan changes.

You can also create reusable offers, distribute them through promo codes, and configure regional prices for different markets and currencies.

Choose how you accept payments

Use Commet's Merchant of Record offering, or connect your own Stripe or dLocal account.

For payments processed through its Merchant of Record offering, Commet handles tax collection and remittance, compliance, refunds, and disputes on your behalf. With your own Stripe or dLocal account, you remain the merchant and manage funds and payouts with that provider. Commet provides the billing layer in either setup.

The guides cover payment routing, transactions and refunds, and finance and payouts. Before using Commet as Merchant of Record, review supported countries and verification requirements.

Integrate the way you work

Start in the dashboard to configure your product, then connect your application with an API key. Choose a guide for your stack:

StackIntegration guides
JavaScript and TypeScriptNext.js, Nuxt, SvelteKit, Express, or the Node.js SDK reference.
PythonPython, FastAPI, Django, and Flask.
Go, Java, and PHPGo, Java, PHP, and Laravel.

Using Better Auth? The Commet plugin connects customer creation and billing to your authentication flow. For complete applications you can adapt, explore the examples.

Tools for developers and agents

The CLI lets you manage Commet from your terminal and work with billing configuration as code. The REST API reference documents the endpoints available to your own tools and integrations.

For an AI coding assistant, install the Commet skill for integration guidance. Connect the MCP server when the assistant also needs to read documentation and work with resources in your organization. The skill provides guidance; MCP provides access to tools.

Connect billing to your application

Build your first flow in sandbox, where you can exercise checkout and billing without real charges. Use access and usage checks in your application to enforce the plan you sell.

Connect signed webhooks to keep your application in sync with subscription and payment outcomes. Review error handling before moving the integration to production.

Ready to start? Follow the quickstart to create a feature, plan, customer, subscription, and test payment in order.

How is this guide?

Create an API Key

Create a sandbox API key from the dashboard, CLI, or MCP, store it on your server, and rotate it safely.

On this page

What can you build with Commet?
Subscriptions that match your product
Pricing based on consumption
One-time purchases and optional extras
A billing experience customers can manage themselves
Choose how you accept payments
Integrate the way you work
Tools for developers and agents
Connect billing to your application