MikroTik routers are popular with ISPs because they are flexible and affordable. Billing software gives that flexibility a business brain.
Two ways to connect
Billing software usually talks to RouterOS through its API. It can read status, such as identity and active sessions, and, if you allow it, create and change accounts. The alternative is a RADIUS server, which is a different architecture.
What gets controlled
- PPPoE secrets: usernames, passwords and profiles
- Hotspot users and their profiles
- Active sessions: seeing or dropping a connection
- Speed limits defined in profiles
The billing link
When a payment is confirmed, the customer's account is enabled with the plan's speed. When the plan ends, the account is disabled and any live session dropped. The router follows the billing record instead of the other way round.
Keep it controlled
Give the billing system its own API user with only the permissions it needs, and use a limited router connection. Test changes on one router before rolling them out.
API versus RADIUS
There are two common ways to connect billing to MikroTik. With the API approach, the billing system logs in to the router and creates, enables or disables accounts directly. With RADIUS, the router asks a central server whether a login is allowed each time a customer connects.
API-based control is simpler to start with and works well for small to mid-size ISPs with a handful of routers. RADIUS suits larger networks that want central authentication across many devices. The two approaches are different architectures; pick one deliberately.
What the integration reads and writes
- Reads: router identity, RouterOS version, board name, active PPPoE and hotspot sessions
- Writes, only when enabled: PPP profiles with rate limits, PPP secrets, hotspot users and profiles
- Actions: disabling an account and removing its active session
Keeping billing and the router in step
The safest design compares what billing says each customer should have with what was last applied, then queues the difference. That way a missed event, a router that was offline or a staff change made directly on the router can be repaired by the next run instead of leaving the two out of step.
Queued jobs should retry with increasing delays and give up after a number of attempts, leaving a visible failed job for a person to look at.
Operational advice
- Back up your router configuration before you enable automation
- Start with one router and a handful of test subscribers
- Name profiles and comment accounts so you can tell which were created by billing
- Keep a separate admin login for yourself and a limited one for billing
- Review failed jobs daily at first
What billing cannot do
Billing software is not a network monitoring tool, a firewall manager or a replacement for good network design. It should not decide your routing or your security rules. Keep those responsibilities separate and your network will be easier to reason about.
Typical setup in five steps
- Create a dedicated API user on the router with limited permissions
- Register the router in your billing system with its address and API port
- Run a connection test and a harmless write test
- Link each subscriber to the router and give them a login
- Switch automation on for that router
How PixelBilling helps
PixelBilling checks routers over the RouterOS API, shows identity, version and sessions, and, only after you switch it on per router, creates and disables PPPoE and hotspot accounts through a retrying job queue.
Common questions
Do I need RADIUS for billing?
Not necessarily. Billing can manage accounts through the router API. RADIUS suits larger designs, and is a different architecture.
Will it work with every MikroTik model?
The API is common across RouterOS devices, but behaviour depends on your RouterOS version, packages and permissions. Test on one router first.
Is it safe to give billing API access?
Yes if you use a dedicated limited user, restrict where it can connect from and let the system perform only the changes it needs.
See PixelBilling with your own data
Start a free trial, import your customers and watch a payment turn into a connection. Or send us your questions.