Charging — 5GC Charging (Converged Charging)¶
Learning objectives¶
After reading this page, you will be able to:
- Explain that Charging is "a mechanism for calculating and recording charges based on usage volume, time, and service."
- Explain the difference between online charging (balance / credit control / Quota allocation) and offline charging (usage-record keeping / CDR generation).
- Explain the 5G characteristic of Converged Charging (integrating online/offline into a single NF = the CHF).
- Diagram the flow in which the main charging trigger source is the SMF, which sends requests to the CHF over N40 (Nchf_ConvergedCharging).
- Explain the evolution from 4G's OCS/OFCS (Gy/Rf) to 5G's Converged Charging.
Prerequisites¶
- PDU Session (PDU Session Establishment) — Charging mainly arises against the data usage of a PDU Session.
- QoS (the 5G QoS model) — Charging can be metered per QoS Flow / Rating Group.
- Supplementary: CHF (details of the charging NF) / SMF (the main charging trigger source) / N40 (details of the SMF⇔CHF reference point)
The focus of this chapter
The details of the CHF NF itself are on the CHF page, and the message details of the N40 reference point are on the N40 page. Building on those, this chapter focuses on "how the charging procedure flows across the 5GC as a whole."
Why — Why a charging mechanism is needed¶
A network operator bills subscribers according to their usage volume, usage time, and the services they use. There are two distinct requirements here.
- Prepaid — Check the balance before use and permit communication only within the balance (credit control). Stop when the balance runs out.
- Postpaid — Record actual usage accurately and bill it all together later.
These two differ in operational timing. Prepaid requires managing the balance in real time during communication, while postpaid only needs to record actual usage without omission. In the 5GC, the CHF (Charging Function) takes the central role in handling both.
Analogy: Charging is a "fare meter + accountant." It measures how much has been used (the meter); for prepaid it checks whether the balance is sufficient before allowing use, and for postpaid it records entries in the ledger (the accountant).
What — Online charging, offline charging, and Converged Charging¶
There are broadly two kinds of charging.
| Kind | When it applies | What it does | Handled in 4G by |
|---|---|---|---|
| Online Charging (Online Charging) |
During communication (real time) | Checks the balance and pre-allocates the amount that may be used (Quota). When used up, re-requests; when exhausted, blocks (credit control) | OCS (Gy/Ro) |
| Offline Charging (Offline Charging) |
After communication (usage-based) | Records actual usage and generates a charging record (CDR: Charging Data Record) | OFCS (Gz/Rf) |
In 5G, these two are processed in an integrated way by a single NF (the CHF) rather than by separate systems. This is called Converged Charging (TS 32.240, TS 32.255).
What is a Quota?
In online charging, it is the usable amount (e.g., 100 MB, 10 min) that the CHF pre-allocates to the SMF as "you may use up to this much." The SMF passes traffic within the Quota and, before it is used up, requests the next Quota from the CHF. This removes the need to query the CHF for every byte.
Coexistence of online and offline¶
For the same PDU Session, online charging (credit control) and offline charging (recording) can operate simultaneously. In Converged Charging, the SMF passes both sets of information to the CHF in a single N40 request, and the CHF sorts them internally.
How — Where charging occurs (Architecture)¶
The main charging trigger source is the SMF. The SMF grasps the data usage volume of a PDU Session (via the UPF's metering results) and issues charging requests to the CHF over N40.
graph LR
UE[UE] --- RAN[NG-RAN]
RAN --- UPF[UPF
Meters usage]
UPF -->|Usage report| SMF[SMF
Charging trigger source]
SMF -->|N40 Nchf| CHF[CHF
Converged Charging]
PCF[PCF] -->|N7 charging policy| SMF
CHF -->|CDR| BS[Charging system
Billing Domain]
CHF -->|Balance query| BAL[Balance management
Account Balance]
The role of each Network Function¶
| NF | Role in charging |
|---|---|
| UPF | Meters user-plane packets (Usage Reporting). Reports usage volume to the SMF |
| SMF | The main charging trigger source. Aggregates the UPF's metering results and issues charging requests to the CHF over N40. Receives Quota and sets metering rules on the UPF |
| CHF | The Converged Charging engine itself. Integrates online (balance/Quota) and offline (CDR generation) processing |
| PCF | Instructs the SMF over N7 on the charging policy (e.g., which Rating Group to charge under) |
Main interfaces¶
| Interface | Segment | Role |
|---|---|---|
| N40 (Nchf) | SMF ⇔ CHF | Charging requests. Nchf_ConvergedCharging (TS 32.290). Online/offline integration |
| N7 (Npcf) | SMF ⇔ PCF | Distributes the charging policy (Charging Control) as PCC Rules (TS 29.512) |
| N4 (PFCP) | SMF ⇔ UPF | Setting of metering rules (URR: Usage Reporting Rule) and usage reporting |
Rating Group
It is the unit for classifying charging. For example, traffic is grouped and metered/charged separately, as in "video at a high rate, SNS at a low rate, a specific app at zero-rating (free)." The PCF decides which traffic is assigned to which Rating Group.
Procedure — The Call Flow of charging¶
This is the typical flow of online charging (Quota-based).
sequenceDiagram
participant UPF
participant SMF
participant CHF
Note over SMF,CHF: (1) At PDU Session establishment: initial charging request
SMF->>CHF: N40 ConvergedCharging_Create
(Charging start / Quota request)
CHF->>CHF: Balance check / credit decision
CHF-->>SMF: Quota grant (e.g., 100MB)
SMF->>UPF: N4 URR setup
(Instruct metering to report at 100MB)
Note over UPF: (2) During communication: metering
UPF->>UPF: Meter packets
UPF->>SMF: N4 Usage Report
(Quota consumed: reached 100MB)
Note over SMF,CHF: (3) Before Quota exhaustion: additional request
SMF->>CHF: N40 ConvergedCharging_Update
(Consumption report + next Quota request)
CHF->>CHF: Balance deduction / re-credit
CHF-->>SMF: Next Quota grant or rejection
Note over SMF,CHF: (4) At session termination
SMF->>CHF: N40 ConvergedCharging_Release
(Final consumption report)
CHF->>CHF: Final settlement / CDR generation
CHF-->>SMF: Completion response
Signal Flow (key messages)¶
| # | Message | Segment | Meaning |
|---|---|---|---|
| 1 | Nchf_ConvergedCharging_Create | SMF→CHF | Charging start. Initial Quota request |
| 2 | (response) Quota grant | CHF→SMF | Credit OK. Allocates the usable amount |
| 3 | N4 URR / Usage Report | SMF⇔UPF | Metering-rule setup and consumption report |
| 4 | Nchf_ConvergedCharging_Update | SMF→CHF | Consumption report + next Quota request (repeated during communication) |
| 5 | Nchf_ConvergedCharging_Release | SMF→CHF | Session termination. Final settlement / CDR generation |
On credit rejection (insufficient balance)
If, in online charging, the CHF rejects the next Quota (e.g., insufficient balance), the SMF either releases the PDU Session or applies specific handling (e.g., redirection to a payment page). This behavior is operator-policy- and implementation-dependent.
Comparison with EPC¶
| Item | 4G EPC | 5GC |
|---|---|---|
| Online charging | OCS (Online Charging System), Gy/Ro reference points | CHF (Converged) |
| Offline charging | OFCS (Offline Charging System), Gz/Rf reference points | CHF (Converged) |
| Integration | Online/offline are separate systems | Integrated into a single NF (the CHF) = Converged Charging |
| Main trigger source | PGW (PCEF) | SMF |
| Protocol | Diameter (Gy/Rf) | SBI (HTTP/2, Nchf) |
The biggest change in 5G is that the previously separate OCS/OFCS are integrated into a single NF, the CHF, and moved onto an SBI (HTTP/2) basis.
Release differences¶
| Release | Changes |
|---|---|
| Rel-15 | Introduction of Converged Charging (CHF). Nchf_ConvergedCharging (TS 32.290) |
| Rel-16 and later | Enhancements such as per-slice charging and per-event charging (e.g., Nchf_SpendingLimitControl) |
Spending Limit Control
There is also a mechanism by which the PCF queries the CHF for "whether a subscriber's usage has reached a certain amount (the Spending Limit)" (Nchf_SpendingLimitControl). This lets the PCF trigger policies such as "throttle after the limit is reached." Details to be confirmed (the TS 32.240 series).
Trouble Shooting¶
| Symptom | Where to suspect | Points to check |
|---|---|---|
| Communication works but no charging occurs | URR for offline charging not set | Whether the SMF has set metering rules (URR) on the UPF. Whether CDRs are being generated |
| Connection is rejected despite having balance | Credit failure in online charging | The CHF's balance-query path. Whether the N40 response is a Quota rejection |
| Frequent disconnection due to Quota exhaustion | Quota size too small | The Quota amount allocated by the CHF, and the SMF's re-request timing |
| Zero-rating does not take effect | Rating Group assignment error | The PCF's PCC Rules, and the Rating Group of the target traffic |
3GPP Specification¶
| Spec | Content |
|---|---|
| TS 32.240 | Charging architecture and principles (the overall charging architecture) |
| TS 32.255 | 5G data connectivity domain charging (charging for 5G data connectivity) |
| TS 32.290 | 5G system; Services, operations and procedures of charging using SBI (Nchf) |
Granularity of clause numbers
The TS numbers above are certain as the primary specifications of the charging domain. The detailed clause numbers within each TS (e.g., where specific message definitions sit) differ by version, so for precise citation this is to be confirmed.
FAQ¶
Q. Are online charging and offline charging mutually exclusive?
No. Both can operate simultaneously for the same PDU Session. In Converged Charging, the CHF handles both within a single NF.
Q. Does only the SMF trigger charging?
Charging for data connectivity is triggered mainly by the SMF. However, there are other trigger sources such as SMS charging, and each corresponding NF issues requests to the CHF. This chapter focuses on data-connectivity (PDU Session) charging.
Q. What is a CDR?
A Charging Data Record. It is the usage record generated in offline charging. The charging system later aggregates it and uses it for billing.
Summary¶
- Charging is a mechanism for calculating and recording charges based on usage volume, time, and service.
- Online charging = balance/Quota/credit control (real time); offline charging = usage-record keeping / CDR generation (usage-based).
- 5G integrates both into the CHF = Converged Charging (integration of 4G's OCS/OFCS).
- The main trigger source is the SMF, which requests from the CHF over N40 (Nchf_ConvergedCharging).
- The UPF meters, the SMF aggregates, and the CHF does credit control, settlement, and CDR generation.
Comprehension check¶
Q1. Explain the difference between online charging and offline charging from the perspective of operational timing.
Online charging checks the balance and allocates Quota in real time during communication (credit control). Offline charging records actual usage after communication and generates a CDR. The former can block once the balance is exhausted; the latter's main purpose is recording.
Q2. What is Converged Charging? Explain it in comparison with 4G.
It is the 5G approach of integrating online charging and offline charging into a single NF (the CHF). In 4G, the OCS (Gy/Ro) and OFCS (Gz/Rf) were separate systems, but in 5G the CHF processes both in an integrated way over SBI (Nchf).
Q3. Which NF is the main charging trigger source, and over which interface does it request from the CHF?
The main trigger source is the SMF. It issues charging requests to the CHF over N40 (Nchf_ConvergedCharging). The SMF aggregates the UPF's metering results and reflects them in the requests.
Next Step¶
- Go to Policy (policy control / PCF), which closely coordinates with charging.
- For details of the charging NF, go to CHF; for reference-point details, go to N40.
- Review QoS (the 5G QoS model), which is the metering source for charging.