Overview
FyberPay supports hotspot-based internet access alongside PPPoE. Hotspots use a captive portal (login page) where subscribers authenticate before gaining internet access. This is ideal for public Wi-Fi locations, apartment complexes, and pay-as-you-go internet cafes. Hotspot authentication flows through the same RADIUS infrastructure as PPPoE, so billing, dunning, and provisioning all work identically.MikroTik Hotspot Server Setup
Create a hotspot interface
On your MikroTik router, go to IP > Hotspot > Hotspot Setup and run the wizard on your subscriber-facing interface (bridge or WLAN).Alternatively, FyberPay can configure the hotspot server remotely. Navigate to Network > [Router] > Setup PPPoE and select the Hotspot option instead.
Point RADIUS to FyberPay
Configure the MikroTik hotspot server to authenticate against FreeRADIUS:Ensure the RADIUS shared secret matches the one configured in your FreeRADIUS
clients.conf.Enable RADIUS authentication on the hotspot
Under IP > Hotspot > Server Profiles, edit your hotspot profile:
- Set Use RADIUS to
yes - Set RADIUS Accounting to
yes - Set RADIUS Interim Update to a suitable interval (e.g., 5 minutes)
FyberPay uses the same RADIUS database for both PPPoE and hotspot authentication. Subscribers with access method set to “hotspot” are provisioned identically in
radcheck and radusergroup, but they authenticate through the captive portal instead of a PPPoE client.Login Page Customization
MikroTik hotspot servers serve a captive portal login page to unauthenticated clients. You can customize this page to match your brand and integrate FyberPay payment flows.Default Login Flow
- Subscriber connects to the Wi-Fi network
- On opening a browser, they are redirected to the hotspot login page
- They enter their username (phone number) and password (voucher code or account password)
- MikroTik authenticates via RADIUS
- On success, the subscriber gains internet access with the bandwidth limits from their plan
Custom Login Page
Upload a customlogin.html to your MikroTik router at Files > hotspot/login.html. Key elements to include:
- Your ISP branding (logo, colors)
- A login form with username and password fields
- A link to purchase a voucher or create an account via the FyberPay portal
- The FyberPay payment page URL for direct M-Pesa purchases
Login Page Variables
MikroTik injects variables into the login page that you can use for dynamic content:| Variable | Description |
|---|---|
$(identity) | Router name |
$(login-by) | Authentication method |
$(error) | Error message on failed login |
$(error-orig) | Original error message |
$(ip) | Client IP address |
$(mac) | Client MAC address |
Voucher and Package Management
Creating Hotspot Packages
Hotspot packages are created as regular plans in FyberPay. Navigate to Billing > Plans and create a plan with these considerations:- Time-based packages
- Data-cap packages
For hourly or daily access:
- Set Billing Cycle to the access duration (e.g., 1 day = 1 billing cycle day)
- Set Speed to the desired bandwidth
- Set Price to the package cost
| Package | Speed | Duration | Price |
|---|---|---|---|
| 1 Hour | 5 Mbps | 1 day | KES 20 |
| Daily | 10 Mbps | 1 day | KES 50 |
| Weekly | 10 Mbps | 7 days | KES 200 |
| Monthly | 20 Mbps | 30 days | KES 1,000 |
Generating Vouchers
Vouchers are pre-generated credentials that subscribers use to log in to the hotspot. Each voucher is a one-time-use code tied to a specific package.Each voucher code is a unique PPPoE/hotspot username with a pre-set password. When a customer enters the voucher code on the login page, RADIUS authenticates them and applies the package’s bandwidth limits.
Voucher Distribution
Common distribution methods for ISPs:- Printed voucher cards: Download the PDF and cut into individual cards for physical resale
- SMS delivery: Sell via M-Pesa and have FyberPay SMS the voucher code to the buyer’s phone
- Self-service portal: Customers purchase packages directly from
yourorg.fyberpay.com/portal/buyand receive credentials instantly
Bandwidth Limits Per Package
Each hotspot package enforces bandwidth through the same RADIUS mechanism as PPPoE. When you create a plan in FyberPay:- FyberPay writes the
Mikrotik-Rate-Limitattribute toradgroupreply - When the hotspot user authenticates, MikroTik receives the rate-limit from RADIUS
- A dynamic simple queue is created on the router for that session
Example Package Configuration
| Package | Download | Upload | Burst | Price |
|---|---|---|---|---|
| Basic Wi-Fi | 5 Mbps | 2 Mbps | None | KES 50/day |
| Standard Wi-Fi | 10 Mbps | 5 Mbps | 15/8 Mbps for 10s | KES 100/day |
| Premium Wi-Fi | 25 Mbps | 10 Mbps | 40/15 Mbps for 10s | KES 200/day |
Session Timeouts
Configure session limits to control how long a hotspot user stays connected:MikroTik Session Limits
On your MikroTik hotspot server profile, configure:| Setting | Description | Recommended Value |
|---|---|---|
| Session Timeout | Maximum session duration before forced re-authentication | Match billing cycle (e.g., 24h for daily packages) |
| Idle Timeout | Disconnect after inactivity period | 15-30 minutes |
| Keepalive Timeout | Interval for checking if client is still connected | 30 seconds |
RADIUS Session Control
FyberPay can also send session timeout attributes via RADIUS:Session-Timeout: Maximum seconds before disconnectIdle-Timeout: Seconds of idle before disconnect
radgroupreply table alongside the rate-limit attribute.
Walled Garden Configuration
The walled garden allows unauthenticated hotspot users to access specific websites without logging in. This is essential for:- The FyberPay payment portal (so users can buy packages before authenticating)
- M-Pesa payment endpoints (so STK Push works before the user has internet)
- Your ISP’s marketing or info page
Configuring Walled Garden on MikroTik
Add allowed destinations
Add entries for each domain or IP that should be accessible without authentication:
Required Walled Garden Entries
At minimum, your walled garden should allow access to:| Destination | Reason |
|---|---|
yourorg.fyberpay.com | Subscriber portal and payment page |
api.fyberpay.com | API for STK Push and payment processing |
*.safaricom.co.ke | M-Pesa API endpoints |
| DNS (port 53 UDP/TCP) | Domain name resolution |
Hotspot with FyberPay Billing
The full hotspot billing flow ties together the captive portal, RADIUS, and M-Pesa:- Customer connects to the Wi-Fi network
- Captive portal redirects to the login page
- Customer buys a package via M-Pesa on the walled-garden payment portal
- FyberPay receives payment, creates a subscription, and provisions RADIUS credentials
- Credentials are sent to the customer via SMS
- Customer logs in on the captive portal
- RADIUS authenticates and returns bandwidth limits to MikroTik
- Customer gets internet at the package speed for the package duration
FyberPay charges a 2% commission on hotspot transactions. This is calculated on the payment amount and deducted from your settlement. Commission details are visible at Billing > Platform Fees.
Next Steps
Network Provisioning
Deep dive into RADIUS, PPPoE profiles, and bandwidth shaping.
Dunning Automation
Automate payment collection for overdue hotspot and PPPoE subscribers.