Logo
Deploy Now

Stars

4,357

Forks

495

Watchers

9

Developer links

Flexprice

Flexprice is a developer-first billing platform built specifically for AI-native and SaaS companies that need usage-based, credit-based, and hybrid pricing models without building custom billing infrastructure. The metering engine ingests millions of usage events in real time through HTTP APIs or SDK calls, supporting sum, count, unique count, latest value, and multiplier aggregation strategies across custom event schemas like API calls, token counts, compute minutes, and GPU time. Credit management handles prepaid wallets with promotional grants, rollover caps, auto top-ups, and priority-based credit application during invoice generation. The pricing engine supports per-unit, tiered, volume, package, and flat-rate models with per-customer overrides, committed minimums, and enterprise contract terms. Feature entitlements enforce boolean toggles, metered usage limits, and configuration values per plan, enabling applications to gate functionality through simple API checks. Automated invoicing calculates charges from real-time usage data with proration for mid-cycle upgrades and downgrades, generating detailed line items linked to tracked consumption. The architecture separates event ingestion through Kafka from billing computation via Temporal workflow orchestration, allowing each layer to scale independently with ClickHouse handling high-performance usage aggregation. Stripe Connect integration processes payments and manages customer payment methods. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. AGPLv3 licensed.

Flexprice
Flexprice
Flexprice
Flexprice
Flexprice

Benefits

  • Real-Time Usage Event Metering
  • Ingest millions of custom usage events through HTTP APIs or SDKs with sum, count, unique, and multiplier aggregation strategies, calculating billing from actual consumption in real time.
  • Credit Wallets with Auto Top-Ups
  • Prepaid and promotional credit systems with rollover caps, expiry dates, priority-based application during invoicing, and automatic balance replenishment when thresholds are reached.
  • Any Pricing Model in One Platform
  • Configure usage-based, seat-based, tiered, volume, package, flat-rate, and hybrid pricing models with per-customer overrides and committed minimums through the no-code UI.
  • Feature Entitlement Enforcement
  • Gate product features through boolean toggles, metered usage limits, and configuration values tied to plans, enforced via simple API checks without custom entitlement logic.

Features

  • Kafka Event Ingestion
  • Apache Kafka message broker handles high-volume event streaming with consumer group scaling, separating ingestion from billing computation for independent layer scaling.
  • ClickHouse Usage Analytics
  • Columnar ClickHouse database performs high-performance usage aggregation across custom event tables, powering real-time metering dashboards and invoice line item calculations.
  • Temporal Workflow Orchestration
  • Temporal engine orchestrates billing cycles, invoice generation, subscription lifecycle management, and scheduled background tasks with built-in retry and failure handling.
  • Stripe Payment Integration
  • Stripe Connect processes payments, manages customer payment methods, handles refunds, and synchronizes subscription state between Flexprice and the payment processor.
  • Multi-Language SDKs
  • Official Go, Python, and JavaScript SDKs for event ingestion, subscription management, entitlement checks, and billing API integration with typed client libraries.