Inside the telecommunications networks, SS7 signalling, USSD gateways, aggregators, banking APIs and systems behind everyday transactions.
Your phone has no mobile data, and you urgently need to make a call.
So, you dial your bank's USSD code, select Buy Airtime, enter ₦1,000 and confirm the purchase.
A few seconds later, your bank account is debited, and your airtime balance increases.
Nothing unusual, right?
But here's something interesting.
Your SIM belongs to a telecommunications company, not your bank. So how does your bank even know you dialled that code?
Your mobile network operator doesn't maintain your bank balance. Your bank doesn't own the telecommunications network. And the company responsible for delivering your airtime isn't necessarily the same company processing your payment.
Yet somehow, all these systems communicate to complete your transaction.
Banks such as GTBank, Access Bank, UBA and FirstBank offer USSD banking through different service codes, even though their customers may use the same mobile networks.
So how does a mobile operator know which bank should receive your request?
Does your phone communicate directly with the bank?
What happens inside the telecom network?
And what exactly are SS7, MAP, MSC, HLR, MSISDN and USSD aggregators?
Let's follow a typical ₦1,000 airtime purchase from your phone through the telecommunications network, into the banking infrastructure and finally to the system that delivers your airtime.
We'll also explore what happens when your account is debited but the airtime never arrives.
1. First, What Exactly Is USSD?
USSD stands for Unstructured Supplementary Service Data.
It's a telecommunications protocol that allows mobile phones to exchange interactive messages with service applications through a mobile network.
Unlike a conventional mobile banking application, which typically communicates with the bank over HTTPS using an internet connection, USSD uses the mobile network's service and signalling infrastructure.
That's why you can use supported USSD services without an active mobile data subscription.
You don't even need a smartphone. A basic feature phone can access them.
You've probably used USSD to check your airtime balance, purchase data, transfer money, check an account balance or pay a bill.
One important characteristic of USSD is that it's session-based.
When you dial a USSD code, the network establishes an interactive session.
For example, a simplified banking menu might look like this:
Welcome to USSD Banking 1. Transfer Money 2. Buy Airtime 3. Check Balance 4. Other Services You select 2.
Another screen appears:
Buy Airtime 1. For Yourself 2. For Another Number You select an option, enter an amount and complete any required authentication.
The interaction continues within the same USSD session until it finishes, you exit, or the session times out.
Unlike SMS, which uses a store-and-forward messaging model, USSD is designed for interactive communication.
But here's the important distinction:
USSD doesn't know how to transfer money or purchase airtime. It only provides the communication channel.
The actual banking functionality exists in applications and backend systems connected to that channel.
To understand how those applications receive your request, we need to look inside the telecommunications network.
2. How Does Each Bank Have Its Own USSD Code?
You may have encountered codes such as:
-
*737#— GTBank -
*901#— Access Bank -
*919#— UBA -
*894#— FirstBank
These are examples of banking service codes, not separate telecommunications networks.
A USSD code acts as a service identifier within the mobile network's configured routing environment.
For a financial institution to offer USSD banking, the necessary regulatory, technical and commercial arrangements must be established.
In Nigeria, the Nigerian Communications Commission (NCC) regulates the telecommunications environment, including applicable short-code arrangements.
The Central Bank of Nigeria (CBN) regulates the financial-services aspects.
Once a code is provisioned for a participating service, the relevant mobile operators configure how requests for that code reach the appropriate destination.
When a customer on MTN dials a banking USSD code, MTN's network routes the request according to its service configuration.
When an Airtel customer dials the same code, Airtel's network needs a corresponding routing arrangement.
Both customers may eventually reach the same bank's USSD application.
The bank operates the banking service; the participating mobile networks provide the access channel.
But what does the request encounter before reaching the bank?
3. Inside the Telecom Network: SIM, MSISDN and IMSI
Let's start with three terms that are often used interchangeably but mean different things.
What is a telco or MNO?
A telco is a telecommunications company.
An MNO, or Mobile Network Operator, operates a mobile network and provides connectivity to subscribers.
Examples in Nigeria include MTN, Airtel and Glo.
An MNO operates infrastructure such as radio access networks, mobile core systems and subscriber-management services.
When you dial a USSD code, the request first enters the telecommunications infrastructure serving your mobile subscription.
What is a SIM?
SIM stands for Subscriber Identity Module.
It stores information and security credentials associated with your mobile subscription.
The mobile operator uses subscriber authentication mechanisms to establish whether the subscription is authorised to access its network.
But your SIM, IMSI and MSISDN are not the same thing.
IMSI — International Mobile Subscriber Identity
The IMSI identifies a mobile subscription within the telecommunications environment.
It's used by mobile-network systems for subscriber identification and related operations.
MSISDN — Mobile Station International Subscriber Directory Number
The MSISDN is the telephone number associated with the mobile subscription.
For example:
MSISDN: +23480XXXXXXXX IMSI: 62130XXXXXXXXXX These are fictional values for illustration.
Why does the distinction matter?
When you register a telephone number with your bank, the bank can associate that number with your customer profile.
During a USSD interaction, the appropriate telecom integration may supply the subscriber's MSISDN to the banking service.
The bank can use it to identify the associated customer relationship.
However, knowing the mobile number isn't sufficient proof that the legitimate account holder initiated the transaction.
This is especially relevant to SIM-swap fraud.
A malicious actor might gain control of a registered phone number without being the rightful bank customer.
This is why banks require appropriate authentication and fraud-prevention controls in addition to phone-number identification.
The IMSI can be relevant to telecom-side security and risk assessments, but the bank doesn't ordinarily need to receive it simply to display a USSD menu.
4. What Are the MSC and HLR?
Now let's follow the request deeper into the telecom network.
Traditional GSM and UMTS mobile networks use several components to control services and exchange signalling information.
Two useful examples are the MSC and HLR.
MSC — Mobile Switching Centre
An MSC is a control and switching component in traditional mobile core networks.
It participates in circuit-switched service management and associated signalling.
In a traditional GSM/UMTS USSD implementation, the serving MSC can participate in processing and routing the subscriber's USSD request.
It doesn't need to know anything about the customer's bank balance.
Its responsibility is within the telecom domain.
HLR — Home Location Register
The HLR is a traditional mobile-network subscriber database.
It stores subscription-related information and supports relevant routing, mobility and service procedures.
Depending on the USSD procedure and implementation, the HLR can participate in reaching the appropriate service functionality.
An important detail: the request doesn't necessarily travel through these components in one fixed linear sequence.
Different USSD procedures and mobile-network implementations use different signalling paths.
The key point is that telecom systems process and route your USSD interaction before the banking application becomes involved.
And those systems need protocols to exchange signalling messages.
One of the most important is SS7.
5. What Exactly Is SS7, and Why Is It Important?
SS7 stands for Signalling System No. 7.
It's a family of telecommunications signalling protocols used to exchange control information between network systems.
Think about what happens when you make a phone call.
The network needs to identify the destination, determine routing information and coordinate the relevant connection procedures.
These activities require signalling messages.
In traditional mobile networks, SS7 provides infrastructure for exchanging signalling information among network components.
For USSD, another protocol is particularly important.
MAP — Mobile Application Part
MAP stands for Mobile Application Part.
It's an application-layer signalling protocol used by traditional mobile core networks.
MAP supports operations relating to subscriber management, mobility, SMS and USSD.
For traditional USSD, MAP defines procedures for exchanging requests and responses between relevant network components.
A conceptual view looks like this:
Mobile Phone | Radio Access Network | Traditional Mobile Core | SS7 / MAP Signalling | USSD Service Infrastructure This is a simplified representation, not a complete protocol trace.
How is SS7 different from HTTP?
When you open a banking app, your phone may communicate with the bank through HTTPS over an internet connection.
A request could look like:
GET /api/accounts/balance Authorization: Bearer <token> A traditional USSD request doesn't originate as that type of HTTP request from your phone.
It uses the telecommunications network's USSD signalling procedures.
A USSD gateway or integration platform can then expose that interaction to the bank through an application-facing API.
This is how a developer can build a USSD banking application without implementing SS7 directly.
Does every USSD request use SS7?
Not necessarily.
Traditional GSM/UMTS USSD is closely associated with SS7 and MAP.
However, modern telecommunications networks may support USSD through IMS-based mechanisms or through interworking with traditional infrastructure.
IMS stands for IP Multimedia Subsystem.
It's an architecture used to provide communications services over IP-based networks.
3GPP specifies procedures for USSD using IMS, so we shouldn't assume every modern 4G or 5G USSD request follows the exact same traditional SS7 path.
One important clarification: saying that USSD works without internet means the customer doesn't need a normal mobile internet data connection. It doesn't mean that the operator's backend never uses IP networking.
6. The USSD Gateway: Where Telecom Meets Software
So far, our request is still within the telecommunications environment.
How does it reach the banking application?
Through the configured USSD service infrastructure, which may include a USSD gateway.
A gateway bridges telecom-facing USSD mechanisms and application-facing integrations.
In a traditional arrangement, it may receive USSD operations through telecom signalling and communicate with backend applications using HTTP, HTTPS or another supported interface.
Conceptually:
Telecommunications Network | SS7 / MAP | USSD Gateway | HTTPS API | Banking Application The actual arrangement varies.
The gateway or integration platform may handle service routing, session identifiers, input delivery, response formatting and session termination.
For example, when a customer selects option 2 from a menu, an integration platform might send an illustrative callback such as:
POST /ussd/callback Content-Type: application/json { "sessionId": "SESSION-12345", "serviceCode": "*123#", "phoneNumber": "23480XXXXXXXX", "text": "2" } This is a fictional API contract, not an actual bank's endpoint.
The backend interprets 2 according to the customer's current menu state.
It may then return a response asking for the next input.
The platform delivers that response through the USSD channel to the phone.
The gateway is one of the components that allows a telecom interaction to become an application request.
7. Where Do USSD Aggregators Come In?
Now we reach one of the most important actors.
The aggregator.
A USSD aggregator is a provider that helps businesses connect their applications to supported telecommunications networks.
These providers often operate in the broader Value Added Services (VAS) ecosystem.
Examples of organisations offering services in the broader USSD and telecom integration market include Qrios, VAS2Nets, Africa's Talking and Interconnect Clearinghouse Nigeria.
Their capabilities, supported markets and commercial arrangements differ. These are industry examples, not endorsements.
Why are aggregators useful?
Imagine you're building a fintech application.
You want customers on MTN, Airtel and Glo to access your service through USSD.
You could establish direct integrations with participating operators, subject to the required arrangements.
But this may involve maintaining several connections with different technical specifications, operational procedures and security requirements.
An aggregator can simplify the integration by providing a common interface to its supported networks.
MTN Airtel Glo | | | +-----------+---------+ | USSD Aggregator | HTTPS API | Your Application The aggregator may handle supported operator connectivity, USSD application routing, callback delivery, session management, monitoring and related services.
For a real example of how developers interact with such platforms, Qrios publicly documents USSD application registration and application-facing integrations.
Interconnect Clearinghouse Nigeria also describes its VAS aggregation model as reducing the need for providers to maintain separate connections to multiple mobile operators.
But there's a distinction worth remembering.
A USSD aggregator isn't necessarily a payment processor or airtime vending provider.
One service helps deliver the customer's interaction.
Another processes financial operations.
Another handles airtime or digital-product fulfilment.
One company may offer multiple services, but the underlying functions are different.
Also, not every bank uses a third-party USSD aggregator. Some may maintain direct telecom integrations.
8. Let's Follow the Complete ₦1,000 Airtime Purchase
Now that we understand the telecom side, let's connect everything to the banking infrastructure.
Suppose you have ₦15,000 in your bank account.
You're using an MTN SIM.
You dial your bank's USSD code, select Buy Airtime, enter ₦1,000 and authorise the purchase.
Here's the logical architecture:
CUSTOMER'S PHONE | | Initiates USSD session v MOBILE NETWORK OPERATOR | | Telecom signalling | Traditional SS7/MAP or | another supported mechanism v USSD GATEWAY | v USSD AGGREGATOR (IF USED) | | Application integration v BANK'S USSD APPLICATION | +--> Customer Identification | +--> Authentication & Risk Checks | v TRANSACTION ORCHESTRATION | +--> Core Banking / Ledger | v AIRTIME VENDING INTEGRATION | v MOBILE OPERATOR RECHARGE SYSTEM | v AIRTIME CREDITED This is an illustrative architecture. It doesn't represent the actual internal implementation of any named bank.
Let's walk through the stages.
Stage 1: The request reaches the mobile network
Your phone initiates a USSD session.
The participating operator handles the signalling interaction and determines how to route it based on the requested service.
Stage 2: The USSD service receives the interaction
The gateway or other service infrastructure routes the interaction to the configured destination.
An aggregator may be involved, depending on the arrangement.
Stage 3: The bank receives the request
The banking application receives the session context.
It can identify the associated customer using appropriate subscription information, including the provided phone number.
Stage 4: Authentication and risk checks
The bank applies the authentication and financial controls required for the operation.
These might include transaction PIN validation, account eligibility checks, transaction limits and fraud monitoring.
The customer's phone number alone shouldn't be treated as sufficient proof of authorisation.
Stage 5: Financial processing
The USSD application invokes the relevant banking services.
These services coordinate the account operation and maintain the financial transaction record.
Depending on the implementation, the bank may authorise or reserve funds, or post a debit as part of a controlled transaction workflow.
Stage 6: Airtime fulfilment
The banking application or transaction orchestration service communicates with the selected airtime vending integration.
A fictional request could look like:
POST /api/v1/airtime/recharge Authorization: Bearer <access-token> Content-Type: application/json { "transactionReference": "AIR-001234", "network": "MTN", "phoneNumber": "080XXXXXXXX", "amount": 1000, "currency": "NGN" } The vending provider uses the relevant operator integration to request fulfilment.
Stage 7: The airtime is credited
The mobile operator's recharge or charging infrastructure processes the instruction.
If successful, it credits the subscriber's airtime balance.
The result travels back through the fulfilment path.
The bank records the transaction outcome, and the customer may receive confirmation through the USSD session or another notification channel.
What appeared to be one simple transaction actually involved multiple independent systems.
9. How Does the Bank's Application Know Which Menu You're On?
There's another interesting engineering problem.
Suppose the customer selects Buy Airtime.
The next input might be the amount.
How does the application know that 1000 means ₦1,000 rather than another menu option?
It needs session state.
A backend may track information such as:
{ "sessionId": "SESSION-12345", "currentStep": "ENTER_AIRTIME_AMOUNT", "authenticated": false } This is a simplified example.
Real implementations must securely manage session identity, authentication context, expiration and transaction state.
The application should also handle invalid selections, repeated callbacks and sessions that expire midway through a transaction.
The important point is that a USSD application isn't just a collection of text menus.
It's a stateful application operating over a time-constrained communication channel.
10. Why Doesn't the Bank Simply Credit the Airtime Itself?
Because the bank account and telecom airtime balance exist in different environments.
The bank manages the customer's financial account.
The mobile operator manages the subscriber's airtime entitlement.
The bank may coordinate the financial purchase through its Core Banking System (CBS) and other financial processing services.
The airtime provider or operator then fulfils the purchase.
For this reason, there are two related journeys.
Communication journey
Phone | Mobile Network | USSD Gateway / Aggregator | Banking Application Transaction and fulfilment journey
Banking Application | Financial Processing / CBS | Airtime Vending Provider | Mobile Operator The first delivers the customer's instructions.
The second performs the financial operation and delivers the purchased service.
And because these journeys involve independent systems, failures can happen at different points.
11. What Happens If You're Debited but Don't Receive Airtime?
You've probably experienced something similar.
You purchase airtime.
Your bank account is debited.
But the airtime doesn't arrive.
You wait.
Nothing.
From an engineering perspective, this is a classic distributed transaction problem.
Imagine:
Customer authorises purchase | Bank records debit | Recharge request submitted | Operator processes recharge | Response is lost | Bank receives timeout The mobile operator might have successfully delivered the airtime, even though the bank didn't receive confirmation.
Alternatively, the recharge might actually have failed.
A timeout alone cannot establish which outcome occurred.
That's why these systems need mechanisms for managing uncertainty.
Transaction states
A system may track statuses such as:
CREATED | VALIDATED | PROCESSING | +--> SUCCESSFUL | +--> FAILED | +--> PENDING | +--> SUCCESSFUL | +--> FAILED Real systems may also have separate financial posting, fulfilment and reversal states.
Idempotency
Idempotency helps prevent multiple executions of the same intended transaction.
Suppose the bank submits a recharge request, but the response times out.
If it blindly retries, the request might be processed twice.
With effective idempotency, the receiving system can recognise repeated attempts associated with the same operation.
For example, the retry might preserve the original transaction reference.
However, using the same reference doesn't automatically guarantee duplicate protection. The relevant provider and downstream systems need to enforce the appropriate behaviour.
Status enquiries
Instead of assuming failure, the bank may query the original transaction status.
For example:
GET /api/v1/transactions/AIR-001234 A fictional response could be:
{ "transactionReference": "AIR-001234", "status": "PENDING", "message": "Awaiting fulfilment confirmation" } A pending result means the final outcome remains uncertain.
Reconciliation
Reconciliation compares transaction records held by the relevant parties.
For example:
| System | Recorded outcome |
|---|---|
| Bank | ₦1,000 debited |
| Airtime provider | Pending |
| Mobile operator | Recharge successful |
The systems need to establish a consistent final outcome.
Reconciliation may involve comparing transaction references, timestamps, amounts, provider records and financial postings.
Reversals and compensation
If airtime fulfilment definitively fails after a debit, the bank may need to reverse the debit or perform another financial correction.
Because the participants are separate systems, the entire operation cannot necessarily be undone through one database rollback.
Instead, a compensation workflow may be required.
This is why distributed financial processing needs more than simply checking for an HTTP 200 response.
12. Does NIBSS Handle Every USSD Transaction?
No.
USSD is an access channel, not a payment rail.
The financial infrastructure involved depends on what the customer wants to do.
If the customer checks a bank balance, the request may remain within the bank's internal account services.
If the customer purchases airtime, the bank coordinates financial processing and airtime fulfilment.
If the customer transfers money to another bank, an interbank payment infrastructure may be involved.
In Nigeria, NIBSS Instant Payments (NIP) is one of the important infrastructures used for interbank transfers.
A simplified interbank flow could be:
USSD Channel | Sending Bank | Interbank Payment Infrastructure | Receiving Bank | Beneficiary Account The transaction may involve beneficiary validation, transfer processing, status confirmation and reconciliation.
So, even though the user interacts with the same USSD code, the backend workflow can be completely different.
13. What About Security, Especially SS7 and SIM Swaps?
The transaction crosses multiple trust boundaries.
There's the customer's device, the mobile network, potentially an aggregator, the bank and external transaction providers.
Each layer requires appropriate controls.
SS7 security
SS7 was developed for telecommunications signalling in an environment that historically relied heavily on trust between network operators.
As networks became more interconnected, weaknesses in those trust assumptions created security concerns.
Telecommunications operators therefore need appropriate signalling security controls, filtering and monitoring.
But SS7 security is only one part of the overall picture.
SIM-swap fraud
A fraudster may attempt to obtain control of a customer's registered mobile number.
If the banking service relies too heavily on possession of that number, the attacker could attempt unauthorised financial operations.
Banks need authentication, transaction monitoring and relevant subscriber-risk controls.
API and integration security
Connections between aggregators, financial institutions and vending providers should use appropriate security mechanisms.
Examples include:
- TLS-protected application APIs.
- Strong service-to-service authentication.
- Secure credential storage.
- Credential rotation.
- Request validation.
- Least-privilege access.
- Rate limiting.
- Audit logging.
- Transaction monitoring.
Session security
USSD applications also need to handle session expiration, repeated requests, invalid input and incorrect session correlation.
For example, what happens if a customer's USSD session expires while the bank is processing a purchase?
The system must ensure that the expired session doesn't result in uncontrolled retries or incorrect financial processing.
Third-party security
A bank may depend on infrastructure it doesn't directly own.
That creates a need for third-party security governance, incident procedures, monitoring arrangements and clearly defined operational responsibilities.
14. The DevOps Side: Why Healthy Servers Don't Always Mean Healthy Transactions
Imagine you're responsible for operating a bank's USSD application.
Your servers are running.
Your APIs are responding.
Your dashboards are green.
Yet customers are complaining that they cannot buy airtime.
How can that happen?
Because the bank's application is only one component in a much larger transaction journey.
The mobile network might be experiencing a service disruption.
The gateway might fail to route sessions.
The aggregator could be unavailable.
The authentication service might time out.
The core banking integration might become slow.
Or the airtime vending provider might fail to confirm fulfilment.
A healthy banking application doesn't guarantee a healthy end-to-end customer journey.
Observability
Suppose a customer reports:
"I bought ₦1,000 airtime. My account was debited, but I never received it."
An engineer needs to answer:
- Did the request reach the banking application?
- Was the customer successfully authenticated?
- Was the debit posted?
- Did the bank submit the recharge?
- Did the vending provider acknowledge it?
- Did the operator confirm fulfilment?
- Was a reversal initiated?
Correlation identifiers, structured logs, metrics, traces and reconciliation records help reconstruct the transaction across supported integration boundaries.
Latency and timeouts
USSD sessions have limited lifetimes.
If the banking application waits too long for several backend services, the customer may experience a timeout.
The system needs response-time budgets, sensible retry policies and appropriate asynchronous processing.
If fulfilment cannot be confirmed before the session expires, the transaction may need to continue through a pending and reconciliation workflow.
Operational monitoring
Useful metrics include session completion rates, gateway failures, authentication errors, transaction latency, vending-provider timeouts, pending transactions and reconciliation exceptions.
For critical services, monitoring should reflect the customer's complete experience rather than simply whether individual servers are available.
15. Quick Technical Terms Recap
| Term | Meaning |
|---|---|
| USSD | Unstructured Supplementary Service Data; interactive communication through a mobile network |
| Telco | Telecommunications company |
| MNO | Mobile Network Operator |
| SIM | Subscriber Identity Module |
| IMSI | International Mobile Subscriber Identity; identifies a mobile subscription |
| MSISDN | Mobile Station International Subscriber Directory Number; subscriber's phone number |
| MSC | Mobile Switching Centre; traditional mobile-core service control component |
| HLR | Home Location Register; traditional subscriber information database |
| SS7 | Signalling System No. 7; telecom signalling protocol family |
| MAP | Mobile Application Part; supports traditional mobile-network operations, including USSD |
| IMS | IP Multimedia Subsystem; architecture for IP-based communication services |
| VAS | Value Added Services |
| USSD gateway | Connects telecom-facing USSD infrastructure to service applications |
| Aggregator | Integration provider connecting businesses with supported networks or other services |
| CBS | Core Banking System |
| NIBSS | Nigeria Inter-Bank Settlement System |
| NIP | NIBSS Instant Payments |
| Idempotency | Mechanism that helps prevent repeated execution of the same intended operation |
| Reconciliation | Comparing records to identify and resolve transaction differences |
The Next Time You Dial a USSD Code
The next time you buy airtime using USSD, think about what happens behind that tiny screen.
Your phone initiates a session through a mobile network.
The network processes the request using its supported signalling mechanisms.
A gateway, and possibly an aggregator, connects the interaction to the banking application.
The bank identifies the customer, applies authentication and risk controls, and coordinates the financial operation.
An airtime vending integration communicates with the relevant operator.
The operator credits the airtime.
And supporting systems help monitor, confirm and reconcile the transaction.
What fascinates me most isn't just the number of technologies involved.
It's how independent systems, owned and operated by different organisations, cooperate to deliver what feels like one simple service.
The mobile operator doesn't own your bank account.
The bank doesn't own your telecommunications network.
The USSD aggregator doesn't necessarily process the financial transaction.
And the airtime provider doesn't need access to the bank's internal ledger.
Yet they can cooperate through defined protocols, APIs and operational arrangements.
That's the beauty of infrastructure.
Sometimes, the most complex engineering is hidden behind the simplest interactions.
And when everything works, you barely notice it.
What's one everyday technology you've used and wondered how it actually works behind the scenes?

