Open-source pricing and billing platform for SaaS, infrastructure and AI companies, covering usage metering, subscriptions, invoicing and quotes.
polarsource/polar
Open-source billing platform for AI and software products, handling usage-based pricing, subscriptions, checkout and merchant-of-record tax duties.
Open-source alternative to:Stripe Billing
Paddle
- Stars
- 10,464
- Forks
- 845
- Open issues
- 154
- Last commit
- yesterday
What is it?
Polar is a billing platform aimed at developers building AI products and other software that charges for usage. It covers metered billing for tokens, API calls, agent runs, GPU time and storage, alongside subscriptions, seats, credits, trials and discounts that can be combined into one pricing model.
Polar acts as the merchant of record, so it handles customer accounts, receipts, dunning and sales tax or VAT on the seller's behalf. The README also describes checkout flows, realtime metrics and a public API with webhooks for integrating billing into existing services.
The project is written mainly in Python with a TypeScript and Next.js frontend, and is built as a Turborepo monorepo. Official SDKs are provided for JavaScript and Python.
Key features
- 01Usage-based billing for tokens, API calls, agent runs and GPU time.
- 02Subscriptions, seats, credits, trials and discounts that can be combined.
- 03Checkout flows with worldwide tax handled by the merchant of record.
- 04Public API and webhooks for integrating billing into your services.
- 05Official JavaScript and Python SDKs.
Use cases
- An AI startup charging customers per token or per agent run.
- A SaaS product moving from flat subscriptions to hybrid usage pricing.
- A developer selling digital products without handling sales tax directly.
Things to know
- Hosted service takes a per-transaction fee (5.00% + 50¢ on Starter, down to 3.40% + 30¢ on Scale), and additional fees may apply.
Topics
FAQ
- What is polar?
- Open-source billing platform for AI and software products, handling usage-based pricing, subscriptions, checkout and merchant-of-record tax duties. Polar is a billing platform aimed at developers building AI products and other software that charges for usage. It covers metered billing for tokens, API calls, agent runs, GPU time and storage, alongside subscriptions, seats, credits, trials and discounts that can be combined into one pricing model.
- Is polar free to use? What license does it have?
- polar is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is polar still maintained?
- Actively maintained. The last commit to polar was on Nov 6, 2026.
- What can I use polar for?
- An AI startup charging customers per token or per agent run. A SaaS product moving from flat subscriptions to hybrid usage pricing. A developer selling digital products without handling sales tax directly.
- Where can I get polar?
- The source code and installation instructions are on GitHub: https://github.com/polarsource/polar
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source usage-based billing platform that meters events, applies pricing and credits, and generates invoices and payments.
A Laravel package that gives PHP apps an expressive interface to Stripe subscription billing, including coupons, plan swaps, and grace periods.
Open-source subscription billing and payments platform handling catalogs, invoicing, payment gateways, dunning and tax, self-hosted.
A payments engine for Ruby on Rails that adds customers, subscriptions, charges and payment methods across Stripe, Paddle, Braintree and Lemon Squeezy.
Open-source usage-based, credit-based and hybrid billing infrastructure with real-time metering, cloud or self-hosted.