Skip to main content
Polar Hero Light

Focus on building, we handle the payments

Polar is an open source payments infrastructure and merchant of record platform designed for developers who want to monetize digital products and SaaS without the complexity of traditional payment systems. As your merchant of record, Polar handles the entire payment infrastructure:
  • Payment processing with Stripe integration
  • Tax compliance including sales tax and VAT calculations
  • Customer billing with invoices and receipts
  • Subscription management with automated renewals
  • Regulatory compliance so you can focus on building

Why Polar?

Developer-First API

Full REST API with TypeScript, Python, PHP, and Go SDKs. Integrate checkout in minutes with framework adapters for Next.js, Astro, Remix, SvelteKit, and Laravel.

Flexible Pricing Models

Support one-time purchases, subscriptions, pay-what-you-want, usage-based billing, and seat-based pricing. All from a single platform.

Rich Digital Benefits

Grant benefits automatically: GitHub repository access, Discord roles, license keys, file downloads, meter credits, and custom integrations.

Merchant of Record

We handle sales tax, VAT, compliance, and regulatory requirements across all supported countries. You receive clean payouts.

Usage-Based Billing

Ingest events, define meters, and bill customers based on actual usage. Perfect for API platforms and consumption-based pricing.

Customer Portal

Built-in customer portal for subscription management, payment methods, invoices, and benefit access. Fully brandable.

Real-Time Webhooks

Comprehensive webhook events for all checkout, subscription, and order lifecycle changes. Build powerful automations.

Open Source

Fully open source with Apache 2.0 license. Self-hostable, transparent, and community-driven development on GitHub.

Quick Example

Create a checkout session with our API:
import { Polar } from "@polar-sh/sdk";

const polar = new Polar({
  accessToken: process.env.POLAR_ACCESS_TOKEN,
});

const checkout = await polar.checkouts.create({
  productPriceId: "prp_...",
  successUrl: "https://example.com/success",
});

console.log(checkout.url); // Send customer to this URL

Core Concepts

Products & Prices

Products represent what you’re selling. Each product can have multiple prices with different billing models:
  • One-time purchases - Single payment for lifetime access
  • Subscriptions - Recurring billing (monthly/yearly)
  • Pay-what-you-want - Customer chooses the price
  • Usage-based - Bill based on meter consumption
  • Seat-based - Price per seat/user
Learn more about Products →

Checkouts

Checkouts are hosted payment pages where customers complete purchases. Polar handles the entire checkout flow, including:
  • Payment collection via Stripe
  • Tax calculation and collection
  • Customer account creation
  • Benefit fulfillment
  • Receipt generation
Learn more about Checkout →

Benefits

Benefits are what customers receive after purchasing. Polar supports:
  • GitHub Repository Access - Automatic invites to private repos
  • Discord Roles - Auto-assigned roles in your Discord server
  • License Keys - Generate and manage license keys
  • File Downloads - Secure download links for digital files
  • Meter Credits - Usage allowances for consumption billing
  • Custom Benefits - Webhook-based integrations for any benefit
Learn more about Benefits →

Subscriptions & Orders

  • Subscriptions are recurring purchases that renew automatically
  • Orders represent completed transactions (one-time or subscription)
Polar handles subscription renewals, prorations for upgrades/downgrades, dunning for failed payments, and automatic benefit grants/revocations. Learn more about Subscriptions →

Pricing

Polar charges a simple percentage fee on successful transactions: 4% + 40¢ per transaction
  • No monthly fees
  • No setup costs
  • Additional Stripe fees apply
View detailed fee structure →

Architecture

Polar is built as a modern, scalable monorepo:
  • Backend: FastAPI (Python) with PostgreSQL, Redis, and Dramatiq workers
  • Frontend: Next.js with TypeScript, TanStack Query, and Tailwind CSS
  • Infrastructure: Stripe for payment processing, S3 for file storage
The entire codebase is open source and available on GitHub. You can self-host Polar or use our hosted service at polar.sh.

Integration Paths

Choose the integration approach that fits your needs:
1

Checkout Links

Create checkout links in the dashboard and share them directly. Perfect for simple setups with no backend required.View Checkout Links →
2

API Integration

Use our REST API to create checkouts programmatically. Full control over the customer experience with webhook events.View API Reference →
3

SDK Integration

Install our TypeScript, Python, PHP, or Go SDK for type-safe API integration with framework adapters.View SDK Docs →
4

Embedded Checkout

Embed the checkout flow directly in your application using our JavaScript SDK.View Checkout SDK →

Next Steps

Quickstart Guide

Get from zero to first checkout in under 5 minutes

Migrate to Polar

Moving from another platform? We’ll help you migrate

API Reference

Explore the complete API documentation

Integration Guides

Framework-specific guides for Next.js, Laravel, and more

Community & Support

GitHub Discussions

Ask questions and share feedback

Discord Community

Join our community of developers

Report Issues

Found a bug? Let us know

Follow Updates

Stay updated on new features

Build docs developers (and LLMs) love