The users you most want to reach may not have a smartphone
It is easy to build for the device you own and forget that a large part of a market still runs on a basic feature phone with no data plan. USSD reaches those users. It is the menu driven system you get when you dial a short code like a star, some digits, and a hash, and it works on every phone ever made, with no app, no data, and no smartphone.
How a USSD session actually works
USSD is a series of short request and response exchanges held together by a session id. The user dials the code, your server replies with a menu, the user picks an option, and your server replies again. The whole conversation is plain text, and your job is to track where in the menu tree the session currently sits.
export async function POST(req: Request) {
const { sessionId, text } = await parse(req); // text is the user's input so far
const steps = text.split("*"); // each menu choice, in order
if (text === "") {
return con("Welcome\n1. Check balance\n2. Buy ticket");
}
if (steps[0] === "1") {
return end(`Your balance is KES ${await balanceFor(sessionId)}`);
}
// CON keeps the session open for more input; END closes it
}
The two words that matter are the prefixes the gateway understands: one keeps the session open for another prompt, the other ends it with a final message. Everything else is your menu logic.
Design for the constraints, not against them
A USSD screen is tiny and a session times out quickly. Keep menus short, keep prompts to a single clear line, and never ask for more than a few taps to finish a task. This is not a stripped down version of your app, it is a different interface with its own grammar, and it rewards ruthless simplicity.
Where it fits in the stack
USSD pairs with SMS and voice through the same communications provider to reach every device, from the latest phone to the oldest handset. A confirmation can go out by SMS after a USSD purchase; a voice line can serve users who cannot read the screen. Together they cover a population that an app store download leaves out entirely, and covering that population is often the whole point of building in the market in the first place.
