Skip to content

Step-by-step

How to set up a MikroTik hotspot with M-Pesa payments

By the Wave teamUpdated 6 min read

The short answer

Connect your MikroTik to Wave with one terminal command, set a port to Hotspot, choose where M-Pesa payments go (till, paybill or bank), create your plans and style the login page. Visitors then pay with an M-Pesa prompt and are logged in automatically. It takes under an hour on a working router.

What you need before you start

  • A MikroTik router running RouterOS, with internet access.
  • A way for Wave to reach the router’s API: a public IP, or a private link such as a VPN you already run.
  • An M-Pesa till, paybill or bank account to receive payments.
  • Access points connected to the router port you will use for the hotspot.
  • A Wave account (ISPs sign up here and are activated by the Wave team).

Step 1: Connect the router

In Wave, open Routers → Add Router and give it a name. Wave shows a one-line command. Paste it into the MikroTik terminal (in Winbox or over SSH):

/tool fetch url="https://wavebilling.co.ke/api/provision?token=…" dst-path=flash/wave-setup.rsc check-certificate=no; :delay 3s; /import flash/wave-setup.rsc

The script enables the router’s API, creates a dedicated Wave API user and registers the router. Wave then discovers its ports and starts monitoring CPU, temperature, traffic and users every minute.

Step 2: Turn a port into a hotspot

On the next screen, set the port your access points are connected to as Hotspot. Wave configures the MikroTik hotspot, replaces the router’s login page with a redirect to your Wave WiFi page, and adds that address to the walled garden so visitors can pay before they have internet.

Step 3: Choose where the money goes

Open Settings → Receive payments and choose an M-Pesa till, a paybill or a bank account. Wave registers it as your own collection channel, so every prompt your visitors approve pays you directly. Send yourself a test prompt to check it.

Step 4: Create your hotspot plans

In Packages, add hotspot plans with a price, a length (minutes, hours or days) and download/upload speeds. A common starting set looks like this:

PlanLengthExample use
Quick1 hourChecking messages, a short video call
Day pass24 hoursStudents and visitors
Week7 daysTenants and regulars
Month30 daysHeavy users who don’t want PPPoE

Hide a plan from the login page if you only want to sell it as printed vouchers.

Step 5: Brand the WiFi login page

In WiFi Login Page, add your logo, colour, name, a welcome line and a help line, choose English or Kiswahili as the default, and pick which ways in to offer: buy with M-Pesa, voucher, or subscriber sign-in. The phone preview updates as you type.

Step 6: Test it like a customer

  1. Join the WiFi on a phone. The login page should open by itself.
  2. Pick the cheapest plan and pay with your own M-Pesa number.
  3. Approve the prompt. You should be online within seconds and receive a receipt if messages are on.
  4. Check that the sale appears in Wave with its M-Pesa receipt.

From then on, every sale is logged in, timed out and recorded on its own. See hotspot billing for everything the login page can do.

Frequently asked questions

Do visitors need an app to pay?

No. They pay on the WiFi login page by approving an M-Pesa prompt on their phone.

Can I use a paybill for hotspot payments?

Yes. Choose an M-Pesa till, a paybill or a bank account in Settings → Receive payments.

What if the login page doesn’t open?

Open any http:// website in the browser; the router redirects it to the login page. If it still doesn’t appear, check that the hotspot port is the one your access points are on and use Reinstall on the WiFi Login Page.

Ready to stop chasing payments?

Create your account today. The Wave team activates new ISPs, then you connect a router with one line and start selling.