Settled balance comes from committed credit movements. If a customer receives 100 USD and consumes 30 USD, the settled balance is 70 USD.
+ 100 funded
- 30 consumed
--------------
70 settled balance
If you query a balance at a timestamp, Metering & Billing includes the movements booked at or before that timestamp, because a settled balance references a point in time.
The booking time is when a movement takes effect on the balance, which isn’t always when it’s recorded.
Future movements, including future expiration, don’t affect an earlier balance.
Example:
T1: grant 100 credits
T5: consume 30 credits
T10: expire unused credits
The settled balance changes depending on the query timestamp:
|
Query time
|
Settled balance
|
|
T1
|
100
|
|
T5
|
70
|
|
T10
|
0
|
Movements can be booked with a time in the past.
For example, usage-based consumption can be recorded after the usage it covers, once late usage events have been collected.
If you query the same past timestamp again later, the settled balance can be different. This is expected: the balance reflects every movement booked at or before that time, including movements recorded since your earlier query.
The settled balance model is useful for audit and history, because every change to it is a recorded movement.
The settled balance can be negative.
This happens when credit_only usage exceeds the available credits, as described in Negative balances.