Introducing the Polar Startup Program

Integrate Polar

Wire billing in from your agent, your framework or your terminal

M

Mia in Claude Code

execute_tool list_customer_meters

·

Atlas, Northwind and Lumen crossed zero

MCP

Agents included

Polar as a tool your agent can call

A remote MCP server with OAuth, so there are no keys to paste. Three meta-tools keep the context small, so the agent only loads the operations it needs.

zsh

claude mcp add --transport http polar https://mcp.polar.sh/mcp/polar-mcp

M

Mia in Claude Code

search_tools "customers with a negative credit balance"

describe_tools list_customer_meters

execute_tool list_customer_meters balance < 0

Three customers crossed zero: Atlas, Northwind and Lumen. Want me to grant a top-up or send each of them a checkout link?

search_tools

Search

The agent describes what it wants to do and gets back the operations that fit.

describe_tools

Inspect

It loads the exact inputs for the best matches, and nothing else.

execute_tool

Execute

It runs the operation with validated arguments and reads the result.

100 operations

Everything underneath

Products, customers, subscriptions, orders, benefits, refunds and metrics.

SDK

Built for your framework

Typed clients underneath

Start with an adapter for your framework. Underneath sit the typed TypeScript and Python clients for everything else.

Adapters

One file in your framework gives you a checkout route, a customer portal and verified webhooks. Pick yours to see the checkout handler.

app/checkout/route.ts

import { Checkout } from '@polar-sh/nextjs'

export const GET = Checkout({
accessToken: process.env.POLAR_ACCESS_TOKEN,
successUrl: 'https://myapp.com/welcome',
})

Clients

The adapters are built on these. Reach for them when you need the rest of the API.

TypeScript

For Node, Bun, Deno and the browser. The import path pins your API version and everything after that is autocomplete.

npm install @polar-sh/sdk

index.ts

import { createPolar } from '@polar-sh/sdk/2026-04'

const polar = createPolar({
accessToken: process.env.POLAR_ACCESS_TOKEN,
})

// every entitlement and balance, one call
const state = await polar.customers.getStateExternal('lumen')

Python

Sync and async clients for Django, Flask and FastAPI, typed end to end.

pip install polar-sdk

main.py

from polar.v2026_04 import Polar

polar = Polar(os.environ["POLAR_ACCESS_TOKEN"])

# every entitlement and balance, one call
state = polar.customers.get_state_external("lumen")
CLI

Localhost, wired in

The whole API from the terminal

Sign in, tunnel webhooks, fire events and call any endpoint without leaving the terminal. Every command can speak JSON.

macOS, Linux and WSL

curl -fsSL https://polar.sh/install.sh | bash
  • polar auth login --sandbox

    Sign in through the browser and pick an organization

  • polar listen http://localhost:3000/webhooks

    Webhooks tunneled to your machine, signed

  • polar trigger order.paid --override data.subtotal_amount=99900

    Fire any event with realistic fixtures, shaped how you need them

  • polar customers list --email=alice@example.com

    Every API resource as a command, in the active organization

  • polar update

    Signed builds for macOS, Linux and Windows

zsh

% polar listen http://localhost:3000/webhooks

✔ Select Organization … Lumen

Connected Lumen
Forwarding http://localhost:3000/webhooks
Waiting for events...

% polar trigger order.paid --seed 7

order.paid 200 12ms

% polar auth whoami --json

{ "organization": { "slug": "lumen" }, ... }

--json

Built for agents

Auth, trigger and the API commands print JSON on request, so a coding agent can drive the CLI.

trigger --list

Every event

The full webhook catalog with descriptions. Pick one interactively or pass it by name.

--override --seed

Shaped fixtures

Change any field in the payload and get the same IDs on every run.

21 resources

The API, as commands

Customers, products, subscriptions, orders, meters and more, generated from the OpenAPI spec.

API

One REST API

Everything the dashboard can do

Every resource the dashboard touches, behind versioned endpoints and organization tokens.

From usage to revenue

Integrate in an afternoon