22 March 2026 · Industry · 2 min read
USSD gateway design: 160 characters, 180 seconds, every GSM phone

In tech circles, USSD (Unstructured Supplementary Service Data) is an afterthought, a relic from the 2G era. In Africa, it’s the backbone of financial inclusion. M-Pesa processes over $300 billion annually. Most of that happens over USSD.
I’ve built two USSD systems in the past year, the ZAMACE financial services gateway and The Booth Marketing promotional platform, and both reinforced the same lesson: if you want to reach everyone, USSD is still the answer.
Every GSM phone manufactured in the last 30 years supports USSD. Not every phone has a browser. Not every phone can install apps. In Zambia, only 21% of the population has reliable internet access. Mobile data remains expensive relative to average incomes. A PWA reaches a third of the market. USSD reaches everyone.
USSD sessions are free for the end user in most African markets. Unlike SMS (store-and-forward), USSD maintains a live session between the user’s phone and your server. You get real-time request-response interaction. The catch: sessions timeout after about 180 seconds, and each response is limited to 160 characters. These constraints force you to design interactions that are fast, focused, and efficient.

A feature phone beside an oil lamp. Any GSM handset from the last thirty years can dial a USSD shortcode, and that reach is the whole point of the channel.
Both USSD systems I built follow the same pattern: the USSD layer is a thin presentation gateway, while all business logic lives in a separate backend. The gateway handles session management (Redis with 180-second TTL), menu presentation (160-character limit), and input routing. Everything else happens in the backend. This means the same backend serves USSD, chat messaging, mobile app, and web.
For The Booth Marketing, I built the gateway in Node.js with Express and ussd-menu-builder. The entire system was delivered in 7 days. For ZAMACE, I used Laravel with sparors/laravel-ussd: a state machine approach with 3-attempt PIN lockout, audit logging, and circuit breaker patterns for API resilience.
If you’re building for African markets: pick Africa’s Talking as your USSD aggregator, start with a state machine, keep the gateway under 500 lines of code, test with the AT simulator, and design for 160 characters.
The most inclusive technology strategy isn’t choosing one channel. It’s designing a backend that serves all of them, starting with the one that reaches everyone. That’s still USSD.