Define how you charge.
The engine handles the rest.

Open-source billing engine with a double-entry ledger. Write your pricing and settlement logic in code — Meridian handles the bookkeeping, audit trails, and payment collection.

The Problem

Billing starts as a Stripe checkout and a cron job. Then you need usage metering. Then revenue splits. Then your auditor asks for a transaction trail. Then estimates need to reconcile with actuals.

Now you're maintaining a financial system — and you're not a financial company. Meridian is the billing engine you'd build if you had a team of financial engineers.

What You Get

Bill

Define pricing rules, usage metering, and revenue splits in code. Saga orchestration means settlement completes or reverts — no orphaned charges.

Know

Every transaction recorded in a double-entry ledger with an immutable audit trail. When your auditor asks where the money went, you show them.

Collect

Stripe Connect integration handles multi-tenant payment collection. Reconciliation detects variances between expected and actual.

How It Works

You write business logic in Starlark, a deterministic Python subset. No imports, no filesystem, no network — every script is guaranteed to terminate and produce the same result every time.

deposit_saga = saga(name="current_account_deposit")

def execute_deposit():
    amount = Decimal(input_data["amount"])
    account_id = input_data["account_id"]

    step(name="log_position")
    position_keeping.initiate_log(
        position_id=account_id,
        amount=amount,
        currency=input_data["currency"],
        direction="CREDIT",
        transaction_id=input_data["transaction_id"],
    )

    step(name="post_to_ledger")
    financial_accounting.capture_posting(
        account_id=account_id,
        amount=amount,
        currency=input_data["currency"],
        direction="CREDIT",
        transaction_id=input_data["transaction_id"],
    )

execute_deposit()
sequenceDiagram
    participant Client as Your System
    participant Meridian as Meridian
    participant Bank as Payment Network

    Client->>Meridian: 1. Initiate Payment
    Note over Meridian: Validate & Reserve Funds
    Meridian->>Meridian: 2. Record Position
    Meridian->>Bank: 3. Execute Payment
    Bank-->>Meridian: Confirmation
    Meridian->>Meridian: 4. Post to Ledger
    Meridian-->>Client: 5. Complete

    Note over Client,Bank: If anything fails, automatic rollback
        

Built For Complex Billing

Usage Metering

Ingest events, apply pricing rules, produce invoices. Handle time-of-use rates and tiered pricing.

Revenue Splits

Multi-party settlement with automatic distribution. Each participant gets their share, every time.

Estimates → Actuals

Bi-temporal data tracks what you knew and when. Reconcile forecasts against meter reads without re-running history.

Multi-Asset

Currency, kilowatt-hours, carbon credits, compute hours. Same ledger, same rigour, any unit of value.

Source Available

Business Source License 1.1. Use, modify, and deploy for any internal purpose. Converts to Apache 2.0 on February 12, 2030.

Go • Protocol Buffers + gRPC • CockroachDB • Apache Kafka • Kubernetes • Stripe Connect

Looking for Design Partners

Meridian is in active development. Core ledger, saga orchestration, and Stripe Connect are implemented. We're looking for companies with complex billing to build with.