Ruba product infrastructure

Turn metered usage into a prepaid balance

Grant credits, deduct them as events arrive, and decide what happens at zero.

Read the technical guide

A customer funds usage before consuming it. Ruba keeps the balance current while your product decides whether an empty balance triggers overage, throttling, or a top-up prompt.

Execution workflow

A balance has four moments

The ledger stays predictable from purchase through exhaustion.

  1. 01

    Grant

    A subscription cycle or one-time purchase adds credits to a specific meter.

  2. 02

    Consume

    Matching usage events reduce that meter balance as they are processed.

  3. 03

    Reach zero

    The Customer State API exposes the empty balance immediately to your application.

  4. 04

    Continue or stop

    A metered price can bill overage, or your product can require another credit purchase.

Prepayment makes variable usage legible

A pure usage invoice can move sharply from one month to the next. Credits let a customer choose a known spend first while keeping the underlying price connected to real consumption.

Each credit balance belongs to a meter. Token credits, image credits, and storage credits therefore remain independent even when one purchase grants several of them.

Capability matrix

Two ways to fund the ledger

Attach one or more Credits benefits to the product that should create the grant.

Recurring allowance

Refills each billing cycle

A subscription grants credits at the beginning of every billing cycle. Each meter receives its configured amount.

One-time pack

Stacks once at purchase

A standalone purchase adds credits once and can stack on top of the customer’s existing balance.

01

Credits benefit

Connect a product purchase to one or several meter grants.

02

Meter isolation

Keep every unit and balance separate for accurate consumption.

03

Customer State API

Read active subscriptions, meters, and balances in one request.

04

Portal top-ups

Let customers inspect balances and purchase additional packs.

Ruba records the balance. Your product sets access.

Ruba does not block a feature when credits run out. It supplies the authoritative balance and, when configured, moves later usage to the metered price. Your application owns the response because only it knows whether to stop, limit, upgrade, or continue serving the customer.

If you need prepaid-only use, omit the metered price. The empty balance remains visible through the Customer State and Customer Meters APIs for your enforcement rule.

Build with Ruba

Fund a customer meter

Attach a Credits benefit to a subscription or top-up product.