How polarsource/polar works
Polar is an open-source monetization platform and merchant of record. The principal workflow is: a developer’s product sends usage, Polar meters and bills it, customers complete checkout, payments and tax are handled, and the merchant receives payouts. Customers can manage orders and subscriptions through a portal, while merchants use dashboards for analytics, finance, and operations. The tree shows broad product surfaces and integrations; core server implementations are represented by the supported server/polar directory because they were not sampled.
Main entry points: polar Checkout Orchestration · portal Customer Portal · adapters Framework Adapters · checkout.ts Checkout Adapters
Components 27
Integrations
- Framework Adapters
clients/adapters - Usage Ingestion
server/polar - Webhook Delivery
clients/adapters/adapter-utils/src/webhooks/webhooks.ts - Checkout Adapters
clients/adapters/nextjs/src/checkout/checkout.ts
Commerce Platform
- Usage Billing
server/polar - Subscriptions
server/polar - Orders
server/polar - Checkout Orchestration
server/polar - Payment Processing
server/polar - Tax Compliance
server/polar - Merchant Operations
server/polar - Merchant Payouts
server/polar - Analytics Insights
server/polar
Customer Surfaces
- Checkout UI
clients/apps/web/src/app/(embed)/embed/payment-method - Customer Portal
clients/apps/web/src/app/(main)/[organization]/portal
Merchant Surfaces
- Merchant Dashboard
clients/apps/web/src/app/(main)/dashboard/[organization] - Mobile Dashboard
clients/apps/app/app/(authenticated)
Platform Services
- OAuth Service
server/polar/user/oauth_service.py - OAuth Client Store
server/polar/models/oauth2_client.py - Query State
clients/apps/web/src/hooks/useDataTableQueryState.ts
Other components
- Developer
- Product App
- End Customer
- Payment Networks
- Tax Authorities
- Payout Bank
- OAuth Provider
Connections 25
- Developer → Framework Adapters: integrates SDKs
- Product App → Usage Ingestion: sends usage
- Framework Adapters → Checkout Adapters: calls checkout
- Usage Ingestion → Usage Billing: meters events
- Usage Billing → Orders: creates charges
- Usage Billing → Subscriptions: manages plans
- End Customer → Checkout UI: starts checkout
- Checkout UI → Checkout Orchestration: submits purchase
- Checkout Adapters → Checkout Orchestration: opens sessions
- Checkout Orchestration → Payment Processing: captures payment
- Checkout Orchestration → Tax Compliance: calculates tax
- Checkout Orchestration → Orders: records order
- Checkout Orchestration → Merchant Operations: issues receipts
- Payment Processing → Payment Networks: authorizes payment
- Tax Compliance → Tax Authorities: remits tax
- Merchant Operations → Customer Portal: exposes account
- Customer Portal → Orders: reads orders
- Customer Portal → Subscriptions: manages subscriptions
- Analytics Insights → Merchant Dashboard: serves metrics
- Merchant Dashboard → Query State: binds table state
- Mobile Dashboard → Analytics Insights: reads metrics
- Merchant Payouts → Payout Bank: sends payouts
- Webhook Delivery → Product App: delivers events
- OAuth Provider → OAuth Service: authenticates user
- OAuth Service → OAuth Client Store: reads and writes