Skip to main content
Credits are prepaid units attached to a Usage Meter. When an event reaches that meter, Ruba consumes the customer’s available units before applying the product’s metered price to any remaining usage.

Balance sequence

  1. Your application sends an event to a Usage Meter.
  2. Ruba evaluates the usage against the customer’s meter balance.
  3. Available credits are consumed first.
  4. After the balance reaches zero, further usage becomes billable overage when the product has a metered price.
If you want a strict credits-only product with no Ruba overage charge, leave the product without a metered price for that meter.

Add credits through a benefit

Create a Credits benefit, choose its meter, and define the number of units. Delivery timing follows the product type:

Read and enforce the balance

Customer State returns the customer’s active meter balances with the rest of their access state. Use the Customer Meters API when you only need meter balances.
A zero balance does not make Ruba block your application’s feature. Your application must reject or limit usage when that is the intended product rule.