Monetize your software

Turn your software into a business with 6 lines of code

Payments, Usage & Billing

Create digital products and SaaS billing with flexible pricing models and seamless payment processing.

Subscriptions
Usage Billing
Benefits
Customer Portal
Checkout Links
Metrics

Activity

Profit-$52.13

OpenAI Inference

$0.240

Anthropic Inference

$0.150

Order Paid

-$25

Storage Upload

$0.330

Anthropic Inference

$0.280

OpenAI Inference

$0.240

Anthropic Inference

$0.150

Subscription Upgrade

-$10

Storage Upload

$0.330

Anthropic Inference

$0.210

OpenAI Inference

$0.290

Anthropic Inference

$0.520

OpenAI Inference

$0.780

Trial Started

Customer Acquired

$50

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

import { Checkout } from "@polar-sh/nextjs";

export const GET = Checkout({
  accessToken: 'xxx'
});

LLM Strategy

Capture your Customer's LLM Usage & bill them for it

  • Automatic Token Consumption Ingestion

  • Prompt & Completion Tokens

  • Vercel AI SDK Support

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 }: { prompt: string } = await req.json();

  const model = llmIngestion.client({
    externalCustomerId: "<USER_ID_FROM_YOUR_DATABASE>",
  });

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

  return Response.json({ text });
}

The speed at which Polar is executing on the financial infrastructure primitives the new world needs is very impressive

Guillermo Rauch
Guillermo RauchCEO & Founder of Vercel

Automated Product Benefits

Configure automated benefits which are granted to customers when they purchase your products.

License Keys