Home›Telecom›Deep dives›Online Charging & Prepaid← All deep dives
Deep dive

Online Charging & Prepaid

How real-time charging works: balances, reservations, free units, vouchers and the notifications that keep subscribers informed.

Real-time ratingBalances & bucketsReservationsVouchersSpending limits
< 50 msTypical charging decision budget
24 × 7No batch window, always on
MillionsCharging requests per hour at peak

What online charging is

Online charging decides, before or during a call, data session or purchase, whether a subscriber may use a service and how much it costs. The network asks the charging system for permission, the charging system reserves part of a balance, and the network reports what was actually used. Prepaid is the classic example, but modern converged charging applies the same real-time control to postpaid plans, shared allowances and enterprise spending caps.

Offline charging, by contrast, collects usage records after the event and rates them later in batch. Most operators now run one converged charging engine for both, so that a bundle, a discount or a spending limit behaves the same way whatever the payment type.

A data session, step by step

The reserve, use and report cycle used by every real-time charging protocol.

  1. 1
    Session starts

    The packet core asks the charging system to authorise a new data session for the subscriber.

  2. 2
    Rate & reserve

    The rating engine finds the applicable tariff and reserves a quota, for example 50 MB or 10 minutes, from the right bucket.

  3. 3
    Grant

    The quota is granted with a validity time; the network lets traffic flow.

  4. 4
    Update

    When the quota is nearly used, the network reports usage and asks for more. Unused reservation is returned.

  5. 5
    Exhaustion

    When balances run out, the network is told to redirect to a top-up page, throttle or stop.

  6. 6
    Session ends

    Final usage is reported, the balance is debited and a charging record is written for billing and analytics.

Building blocks

The main concepts every online charging system has to model.

Balances and buckets

Monetary balances, unit buckets (MB, minutes, SMS) and counters, each with its own validity, priority and rollover rules.

Consumption order

Rules that decide which bucket is used first: free units, then bundle allowance, then main balance.

Vouchers and top-ups

Voucher generation, activation and redemption, plus top-ups from cards, wallets and retailers, with fraud controls on failed attempts.

Spending limits

Daily, monthly or per-service caps for consumers, children's lines and enterprise users, enforced in real time.

Notifications

Threshold alerts such as 80% used, low balance or bundle expired, sent by SMS, push or USSD.

Life cycle

Account states such as active, grace, suspended and recycled, driven by balance expiry and inactivity.

Online vs offline charging

Online (real time)Offline (batch)
When ratedDuring the eventAfter the event
Credit controlYes: can block or redirectNo: usage is billed later
Typical usePrepaid, caps, shared allowancesPostpaid usage, wholesale, interconnect
InterfacesDiameter Ro/Gy, 5G NchfDiameter Rf/Ga, charging data records
AI opportunity

Where AI helps

Charging is rich in real-time data, which makes it a natural place for machine learning.

Top-up propensity

Predict when a prepaid subscriber is about to run out and offer the right top-up or bundle at the right moment.

Fraud detection

Spot voucher abuse, SIM-box traffic and unusual spending patterns in near real time.

Charging health

Detect rises in charging failures or latency before they become customer-visible outages.

Design tips

Standards & references

3GPP TS 32.240Charging architecture and principles
3GPP TS 32.299Diameter charging applications (Ro/Rf)
3GPP TS 32.296Online charging system (OCS)
TMF654Prepay Balance Management API

Related pages

This page describes generic industry practice and public standards. It is not based on, and does not describe, any particular vendor's product or operator's systems.