Announcing our $10M Seed Round, led by Accel

Payment infrastructure for the 21st century

The modern way to sell your SaaS and digital products

Usage Based Billing

Robust Event Ingestion API that enables precise usage-based billing with the use of Ingestion Strategies.

  • LLM Ingestion using AI SDK
  • Delta Time Ingestion
  • S3 Ingestion
  • Stream Ingestion
  • Manual Event Ingestion
const llmIngestion = Ingestion()
  .strategy(new LLM(openai('gpt-4o')))
  .ingest('openai-usage')
  
const model = llmIngestion.client({
  externalCustomerId: "john_doe_123"
});

const { text } = await streamText({
  model,
  prompt,
  system: "You are a helpful assistant"
});
Customer avatar
John Doe
63,529 Prompt Tokens$57.6375,348 Completion Tokens$75.12

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.

Simple Checkouts

Streamlined checkouts for a seamless user experience.

  • Custom Checkout Fields
  • Automatic Tax Calculation
  • Checkout Links & Embeds

Open Source Integrations

We believe in building in public & therefore proud to be open source.

  • Raycast Extension
  • Framer Plugin
  • Zapier Integration