Flexprice: Open-Source Usage-Based Billing Toolkit
Flexprice: Open-Source Usage-Based Billing Toolkit
Hey HN, I’am Koshima, co-founder of Flexprice ( https://flexprice.io/ ). Flexprice is an open source monetization platform for AI & Agentic companies. You can build usage-based, credit-based, or hybrid pricing models with full control. Usage-based billing works on paper, but breaks fast in production: (1) High-volume data (e.g., 10k API calls/sec from AI inferences) breaks naive pipelines, dropping events and causing underbilling or customer complaints. (2) Backfilling missing events or retroactive discounts screws up invoices, forcing 3 AM log stitching to avoid revenue leaks. (3) Prepaid credits and trials are a mess because it requires you to handle expirations, partial deductions, and priority rules. (4) Product teams want real-time, per-customer usage reports (e.g., “How many tokens did user X consume?”), but querying raw events requires slow, custom SQL hacks. (5) Webhook integrations for invoicing or CRMs fail on duplicates, out-of-order events, or time zone bugs, risking customer disputes. (6) What works for 100 users fails at 10,000 because rate limits, and idempotency leads to urgent rewrites. This week, we’re doing a 5-day launch week, where we’re shipping a new set of billing features every day. Today’s launch includes: (1) Fire-and-forget event ingestion with SDKs (Python, JS, Go) and auto retry handling (2) Real-time event debugger for tracking ingestion status, filtering payloads, and inspecting failures (3) Usage analytics API providing billing-grade summaries with filters, groupings, and time-bucketed results (4) Prepaid credit system supporting trial credits, expirations, and configurable priority on deduction (5) Webhook system to automate billing workflows like invoicing or subscription changes We’re shipping new features daily. It’s early, actively evolving, and contributions are welcome. If you’ve dealt with usage-based billing, broken credit logic, or event ingestion at scale, your feedback would help. You can read the details of the launch at https://flexprice.io/blog/the-developer-toolkit . You can clone the project and explore the repo at https://github.com/flexprice , and demo at https://www.youtube.com/watch?v=SFARthC7JXc Would love to hear your technical critiques, edge case concerns, or how you’ve handled billing infrastructure in your own stack.
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
Lago: Open-source metering and usage-based billing
StripeMeter – Open-Source Usage Metering for Stripe Billing
StripeMeter – Open-Source Usage Metering for Stripe Billing
Usage-Based Billing Toolkit for SaaS Developers
InvokeAI, an open source Stable Diffusion toolkit and WebUI
ARR-Medic-CYP3A4 – Open-Source Drug Interaction Toolkit
Open-Source outcome- / usage-based billing engine for AI Agents
Usage-based billing API
SyncLite – Open Source Data Consolidation Toolkit
bframe – An open source billing library based in SQL