CHF — Charging Function¶
Learning objectives¶
- Understand that the central role of the CHF is charging in the 5GC.
- Be able to explain the difference between online charging (balance management, credit/Quota allocation) and offline charging (usage-record logging, CDR generation).
- Understand the 5G characteristic of Converged Charging (handling online/offline in an integrated manner within a single NF).
- Grasp the flow of coordination with the CHF, whose main charging-trigger source is the SMF.
Prerequisites¶
- Basics of SMF/PDU session → SMF
- The concept of SBA/SBI → Curriculum
- The overall picture of interfaces → Interface dictionary
What you will learn in this chapter¶
- Why: Why the CHF is needed so that operators can charge according to usage volume, time, and service.
- What: That the CHF processes online/offline charging as Converged Charging in an integrated manner and generates CDRs.
- How: The flow in which the CHF receives charging requests from the SMF and others, grants Quota, subtracts balance, and logs usage records, then passes the information to the charging system.
Why — Why it is needed¶
Operators need to charge subscribers according to data usage volume, usage time, and services used. In prepaid, they manage balance and perform credit checks; in postpaid, they accurately record usage. A mechanism that handles both is indispensable, and in the 5GC the CHF takes the central role.
Analogy: The CHF is the "fare meter + accountant" of communication. It measures how much has been used, checks whether the balance is sufficient, and records usage in the ledger. Without the CHF, usage-based charging and credit checking (deciding whether use is allowed) would not be possible.
Overview¶
When the SMF reports the usage volume of a PDU session, the CHF receives it and performs charging processing. In online charging, it grants Quota (available usage) ahead of use and subtracts the balance as it is consumed. In offline charging, it records the usage. It then generates a CDR (Charging Data Record) and passes it to the CGF (Charging Gateway Function) or the charging system.
Converged Charging is the mechanism that handles such online charging and offline charging in an integrated manner within a single NF (the CHF), and it is a characteristic of the 5G charging architecture.
Basic Concept — Explanation for beginners¶
The CHF can be likened to the "cashier" of a store. For a customer shopping with a prepaid card, the cashier checks whether the balance is sufficient (online charging), while at the same time recording in the ledger what and how many items were bought as the register's record (offline charging). Having a single cashier do these two jobs together is the image of Converged Charging. In the communications world, the CHF handles this "usage check" and "recording."
Network Function details¶
| Item | Content |
|---|---|
| Role | Handles 5GC charging processing (online charging and offline charging) in an integrated manner |
| Retained information | Charging session, Quota/balance information, usage counters, charging records |
| Main APIs used | NRF Discovery (discovery/registration of other NFs and itself), etc. |
| Provided APIs | Nchf_ConvergedCharging (Create/Update/Release), Nchf_SpendingLimitControl (used by the PCF for balance-based policy control) — TS 32.290/32.291 |
| Related interfaces | SBI (Nchf) |
| Impact on failure | Charging processing becomes impossible. In configurations that depend on online charging, it can also affect whether communication is allowed (= depends on policy; to be confirmed) |
Architecture¶
flowchart LR
SMF["SMF (usage reporting)"] -->|"Nchf_ConvergedCharging"| CHF["CHF (charging processing)"]
PCF["PCF (policy control)"] -->|"Nchf_SpendingLimitControl"| CHF
CHF -->|"CDR"| CGF["CGF (charging system)"]
How to read the diagram: The SMF reports the usage volume of a PDU session to the CHF (Nchf_ConvergedCharging), and the CHF processes online/offline charging. The PCF references the CHF's information via Nchf_SpendingLimitControl for balance-based policy control. As the result of processing, the CHF generates a CDR and passes it to the CGF (charging system).
Interface¶
| Interface | Connection | Main use |
|---|---|---|
| SBI (Nchf) | SMF/PCF ⇔ CHF | Charging requests and balance control |
For details, see the Interface dictionary.
Appearance in procedures¶
At PDU session establishment/modification/release, the SMF starts/updates/ends a charging session with the CHF. Also, when the charging rate changes due to QoS changes and the like, a charging update from the SMF to the CHF can occur. For the details of the procedure, see PDU Session and PDU Session Modification / Release (the specific message order is to be confirmed).
Comparison with EPC¶
In 4G/EPC, online charging was the OCS (Online Charging System, Gy/Ro) and offline charging was the OFCS (Offline Charging System, Gz/Rf), separated into different systems and interfaces. A characteristic of 5G is that the CHF handles both in an integrated manner as Converged Charging (the details of the integration are to be confirmed).
| Generation | Who handles charging |
|---|---|
| 4G/EPC | Separated into OCS (online) + OFCS (offline) |
| 5G/5GC | CHF (integrates online/offline) |
Release differences¶
- Rel-15: The basics of Converged Charging are defined, introducing integrated online/offline charging by the CHF.
- Rel-16/17: Charging function extensions are specified incrementally (specific differences to be confirmed).
3GPP Specification¶
- TS 32.240 — Charging architecture
- TS 32.290 — 5G charging services (Nchf) (individual section numbers to be confirmed)
- TS 32.291 — Nchf_ConvergedCharging API (to be confirmed)
- TS 23.501 — The CHF does not have an independent section in TS 23.501 §6.2; its definition and charging architecture are described in the charging-family specs (TS 32.240/32.290, etc.) (consistent with the NF dictionary)
Summary¶
- The CHF is the central NF responsible for charging in the 5GC.
- It handles online charging (balance management, Quota allocation) and offline charging (usage-record logging, CDR generation).
- Processing these within a single NF in an integrated manner — Converged Charging — is a characteristic of 5G.
- The 4G/EPC OCS (online) and OFCS (offline) were integrated into the CHF in 5G.
- It coordinates with the SMF as the main charging-trigger source, and the PCF performs balance-based policy control via Nchf_SpendingLimitControl.