Skip to main content

Hotspot: prepaid WiFi with a captive portal

Sell WiFi time with vouchers or M-Pesa STK push. Router setup, the captive portal, expiry and protection against abuse.

1 min readUpdated 2026-11-20Network engineerOwner / Admin

A hotspot lets people buy internet time without an account. It is a good complement to home subscriptions: estates, hostels, cafes and events.

How a purchase works#

  1. A person joins your WiFi and is redirected to the captive portal.
  2. They see your hotspot plans and choose one.
  3. They pay by M-Pesa STK push, or they enter a voucher code.
  4. Metron creates a hotspot user on the router with the plan's time limit and binds the first device.
  5. A job every 5 minutes ends expired passes.

Router setup#

Your router needs a hotspot configured with the captive portal login page and a walled garden so the portal and payment pages load before the user is online. A reference setup script and login page are provided with Metron. Ask us for them for your RouterOS version.

Protection built in#

  • Lockout after repeated wrong voucher codes per device
  • Device address validation
  • A strict allow-list for captive-portal destinations
  • Detection of DNS tunnelling and payload tunnelling abuse

Voucher batches and cash sales: WiFi vouchers.

Something missing or wrong in this guide?WhatsApp usEmail feedback