- Notifications
You must be signed in to change notification settings - Fork3
🌟Open source pricing and billing infrastructure to support any pricing model, from usage-based to subscription and everything in between.👨💻No more building billing in house. ❌Say goodbye to revenue cuts by stripe and chargebee.
License
flexprice/flexprice
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
🌟 Built with developers in mind, so you don’t have to createbilling and metering from scratch. 🌟
Flexprice is adeveloper first answer to building and launching any pricing model and collecting usage data in real-time.
We have one goal - our friends should never have to write a billing system from scratch again.
In-house Billing Systems are a nightmare for Engineers. With rising use of AI workloads internally and building new AI features, it has become necessary to build metering and billing systems to track usage and costs.
Frequency of changes in pricing models is also increasing. These changes make it hard to manage existing subscriptions and require a lot of manual effort in terms of migrations and testing.
Usage metering, subscription management and infra cost into one stack
Developers don't need to spendmonths building internal metering and rating systems.
Flexprice offers APIs, SDKs, self serve UI widgest, internal dashboards and more to help you get started in minutes. With Flexprice, you can:
Evolve your pricing with flexibility: We support Usage-based pricing, Minimum commitments, Volume discounts, Prepaid Credits, Upgrades and downgrades, etc.
Real-time overview AI Infrastructure Costs: Optimize revenue operations and measure LLM Token Usage, GPU Time, Compute Hours, API Call Frequency and Duration, etc
Custom Invoice and Billing logic: Raise invoices, manage billing cycles, apply discounts, taxes, grace period, payment terms, etc
To run Flexprice for local development or running from source, you will need
- Golang
- Docker andDocker Compose
- Any of the below supported platform environments:
- Linux based environment
- OSX (Darwin) based environment
- WSL under Windows
The easiest way to get started is using our Docker Compose setup:
# Clone the repositorygit clone https://github.com/flexprice/flexpricecd flexprice# Set up the complete development environmentmake dev-setup
This will:
- Start all required infrastructure (PostgreSQL, Kafka, ClickHouse, Temporal)
- Build the FlexPrice application image
- Run database migrations and initialize Kafka
- Start all FlexPrice services (API, Consumer, Worker)
Once complete, you can access:
- FlexPrice API:http://localhost:8080
- Temporal UI:http://localhost:8088
- Kafka UI:http://localhost:8084 (with profile 'dev')
- ClickHouse UI:http://localhost:8123
# Restart only the FlexPrice servicesmake restart-flexprice# Stop all servicesmake down# Clean everything and start freshmake clean-start# Build the FlexPrice image separatelymake build-image# Start only the FlexPrice servicesmake start-flexprice
If you prefer to run the application directly:
# Start the required infrastructuredocker compose up -d postgres kafka clickhouse temporal temporal-ui# Run the application locallygo run cmd/server/main.go
SeeCONTRIBUTING.md for more details on the code architecture and design principles.
Whether you're a newbie coder or a wizard 🧙♀️, your perspective is golden. Take a peek at our:
About
🌟Open source pricing and billing infrastructure to support any pricing model, from usage-based to subscription and everything in between.👨💻No more building billing in house. ❌Say goodbye to revenue cuts by stripe and chargebee.