Lago
Trusted by Mistral AI, PayPal, Groq, and Synthesia with over 10,300 GitHub stars and Y Combinator backing, Lago is the open-source billing engine that handles usage-based, subscription-based, and hybrid pricing models through a single API-first platform — replacing the need to build custom billing logic or depend on opaque SaaS pricing infrastructure. Real-time event ingestion via ClickHouse processes billable events with deduplication and multiple aggregation methods including count, sum, unique count, max, and weighted sum, while graduated pricing tiers, package-based billing, and percentage-based fees model any pricing strategy from simple subscriptions to complex marketplace commission structures. Automated invoice generation calculates charges according to configurable billing cycles with grace periods, proration for mid-cycle changes, and credit note issuance for refunds and adjustments. Prepaid credits enable pay-in-advance models where customers purchase credit blocks and draw down as usage accumulates, while entitlements tie feature access directly to billing plans for automated provisioning and de-provisioning. Payment orchestration integrates natively with Stripe, Adyen, and GoCardless with automatic retry logic, dunning workflows for failed payments, and multi-gateway routing. Revenue analytics provide cross-stream visibility into MRR, usage trends, churn, and revenue drivers through dedicated API endpoints. The customer portal embeds into your application for self-service invoice access and usage monitoring. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. AGPL-3.0 licensed.
Polar
Used by Tailwind Labs and recognized as an official GitHub funding partner, Polar is the open-source billing infrastructure that lets developers ship production-ready monetization in hours instead of weeks. Meter tokens, API calls, agent runs, GPU seconds, and storage with event-level precision, then compose usage billing with subscriptions, seats, credits, trials, and discounts into whatever pricing model your product requires. As Merchant of Record, Polar handles sales tax, VAT, chargebacks, receipts, and regulatory compliance across all supported countries so you receive clean payouts without building tax infrastructure. Integrate via the full REST API with official SDKs for JavaScript, Python, PHP, and Go, plus framework adapters for Next.js, Astro, Remix, SvelteKit, and Laravel enabling checkout integration in minutes. Automatically deliver benefits upon purchase including GitHub repository access, Discord roles, license keys, file downloads, and meter credits through configurable automation rules. The built-in customer portal provides subscription management, payment method updates, invoice history, and benefit access with full white-label branding. Monitor revenue, costs, and margins through real-time analytics dashboards showing the unit economics every AI startup needs to scale. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. Apache License 2.0 licensed.