AboutServicesPortfolioCareersBlogContact
Back to Blog
Web Apps

How We Built a VTU Platform That Processes Millions Daily

SP

Spirit Philip

May 8, 2022

VTUFinTechNigeria
How We Built a VTU Platform That Processes Millions Daily

What Is VTU?

VTU (Virtual Top-Up) platforms allow users to buy airtime, data bundles, electricity units, and cable TV subscriptions digitally. In Nigeria, this is a massive market β€” virtually every phone user buys airtime regularly.

AsapVTU is one of the platforms we built that operates in this space.

The Technical Challenges

Transaction Volume

Peak periods see hundreds of transactions per minute. Every request hits an external telecom API with its own rate limits and latency. We needed:

  • Request queuing with Bull.js
  • Redis caching for network/provider data
  • Database connection pooling

Failure Modes

What happens when the MTN API times out mid-transaction? The user has been debited but no airtime was sent. We needed:

  • Idempotent transaction IDs
  • Automatic retry with exponential backoff
  • Reconciliation jobs that run every 15 minutes
  • Wallet-based debit system (prevents double-spend)

Fraud Prevention

VTU platforms are frequent fraud targets. We implemented:

  • Rate limiting per user and IP
  • Suspicious activity scoring
  • Transaction velocity checks
  • Two-factor authentication for large transactions

The Stack

API:           Node.js + Express + TypeScript
Database:      PostgreSQL + Prisma
Cache/Queue:   Redis + Bull.js
Auth:          JWT + bcrypt
Payments:      Paystack
Telecom APIs:  Irecharge, Vtpass
Hosting:       AWS EC2 + RDS

Lessons Learned

Always simulate failure. We spent weeks intentionally crashing the system in staging to find edge cases. Issues we found this way would have caused significant financial loss in production.