Turn Usage Into Revenue

A billing platform built for AI companies

— 01

Payments, Usage & Billing

Sell SaaS with flexible pricing models or bill users for usage like AI token consumption.

— 02

Customer Management

Advanced customer lifecycle management with detailed profiles & analytics.

— 03

Global Merchant of Record

Sit back, relax, while we handle all headaches & tax compliance. No sales tax to worry about.

Billing Pipeline

Event to revenue.
End-to-end.

Polar makes it incredibly easy to monetize your software. Usage billing using event ingestion, SaaS tiers or one-off purchases.

  • CHECKOUT

    Secure & robust checkouts that converts users to customers

  • USAGE EVENTS

    Capture API calls, token consumption & custom events

  • METERING

    Aggregate usage, enforce rate limits & quotas per customer

  • INVOICING

    Generate itemized invoices for each billing period

Pay Now
billing = fn(events)

Usage Billing on Autopilot

terminalnvimapi/ai/route.ts
import { Ingestion } from "@polar-sh/ingestion";
import { LLMStrategy } from "@polar-sh/ingestion/strategies/LLM";
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";

const llmIngestion = Ingestion({ accessToken: 'xxx' })
  .strategy(new LLMStrategy(openai("gpt-4o")))
  .ingest("openai-usage");

export async function POST(req: Request) {
  const { prompt } = await req.json();

  const model = llmIngestion.client({
    externalCustomerId: "user_123",
  });

  const { text } = await generateText({
    model,
    system: "You are a helpful assistant.",
    prompt,
  });

  return Response.json({ text });
}
curl -X POST https://example.com/api/ai \
-H "Content-Type: application/json" \
-d '{"prompt": "Tell me a joke"}'
Live Events
38,471 ingested
INFERENCEopenai-usageuser_123
9,508 tokens
INFERENCEopenai-usageuser_123
9,544 tokens
INFERENCEopenai-usageuser_123
13,893 tokens
INFERENCEopenai-usageuser_123
12,626 tokens
INFERENCEopenai-usageuser_123
7,647 tokens
INFERENCEopenai-usageuser_123
7,782 tokens
INFERENCEopenai-usageuser_123
883 tokens
INFERENCEopenai-usageuser_123
14,362 tokens
U
user_123
Pro
Tier 2 · Token Usage6.1M / 10M
$0.002 / 1k tokens
Pro Subscription$49.00
Token Overages$10.20
Total this period$59.20

Next.js Adapter

Payments and Checkouts made dead simple with Next.js

  • Secure & Simple Checkouts

  • Integrated Customer Portal

  • Granular & Reliable Webhook Handler

  • Global Merchant of Record

terminalnvimapi/checkout/route.ts
import { Checkout } from "@polar-sh/nextjs";

export const GET = Checkout({
  accessToken: 'xxx'
});
~ % pnpm dev
✓ Starting...
✓ Compiled in 135ms
Benefits Engine
9b
user_7f2a9bSubscribed
PRO
Granted automatically
advanced_analytics
priority_support
api.rate_limit_10k

Define tiers.
Ship feature flags.

Define feature flags as benefits and attach them to your subscription tiers. Polar automatically enables and revokes them as customers subscribe and churn.

Cheapest Merchant of Record on the market

One flat rate covers payment processing, global tax compliance, and reliable support. No monthly fees, no setup costs.

4%+ 40¢
per transaction
  • Global tax & VAT compliance included
  • Fraud protection & chargebacks handled
  • Volume discounts for high-growth teams
  • No monthly or setup fees

Modern billing.
Built for the AI era.