A MikroTik voucher generator makes a batch of hotspot login codes, each tied to a plan, so you can print them and sell them for cash. This guide covers the free ways to generate vouchers, what a good generator should offer, and how to take a batch from code to printed slip in Centipid.
If you want the wider picture of how vouchers are sold and redeemed, read how internet vouchers work first.
What a MikroTik voucher is
RouterOS has no object called a voucher. A voucher is a hotspot user, usually with a random name and password, tied to a user profile. The profile sets the speed. The user carries the limit: limit-uptime for time and limit-bytes-total for data. Both are properties of a hotspot user in MikroTik's Hotspot documentation.
So "generating vouchers" means creating many hotspot users at once with the same profile and limit, then putting their codes on paper.
Free ways to generate vouchers
There are three common ways. Each one works, and each one stops at a different point.
User Manager
User Manager is RouterOS's own RADIUS (Remote Authentication Dial-In User Service) server. Its documentation gives a batch command that creates random users:
/user-manager user add-batch-users number-of-users=3 password-characters=lowercase,numbers,uppercase password-length=6 username-characters=lowercase username-length=6
That example comes from MikroTik's User Manager page. The same page describes a generate-voucher command that fills a voucher template file you can open in a browser and print.
Where it stops: the number of active sessions is limited by the RouterOS license level. The users live on that one router. Customers can buy online only through PayPal, and nothing records which agent holds which printed batch.
A script that adds hotspot users
You can loop over a counter, build a random code and add a hotspot user with a profile and a comment that names the batch. It is flexible and free. You write and test every part yourself, including how codes are made unique and how they get onto paper. Many people end up copying codes from the router's user list into a spreadsheet.
Mikhmon
Mikhmon is a free, open-source tool that talks to the router over the RouterOS API (application programming interface). It generates a batch of hotspot users, sets a selling price, prints on a template and can print over Bluetooth. Expiry is handled by RouterOS scheduler scripts. It is a good fit for a café or a small hotspot with one or two routers. Its last release is V3.20 from June 2021, so check the author's site for the current state. We compare the two in Mikhmon vs Centipid.
Where it stops: users stay on each router, there is no RADIUS server behind it, and no payment collection: vouchers are sold for cash.
What a good voucher generator does
Whichever tool you pick, check it against this list.
- Batch size. You should be able to make hundreds or thousands at once, not one at a time.
- Code length and characters. Short codes get guessed. A code of six letters and numbers has hundreds of millions of combinations. Four does not. Leave out look-alike characters such as 0 and O, and 1 and I.
- A prefix. Two letters at the front of every code in a batch let you tell batches apart at a glance.
- Expiry. Unsold vouchers should stop working on a date you choose.
- A print layout. A grid for A4 paper, and a narrow layout for a thermal slip printer.
- A QR (quick response) code. Scanning it should open the login with the code already typed in, so the buyer does not key it in on a phone.
- An export. You will want the codes in a spreadsheet for your records.
Generate and print a batch in Centipid
Centipid is a billing system for ISPs. It makes vouchers in the dashboard, and the router never needs a manual entry. A voucher is tied to a package, and customers redeem it on the captive portal or in the subscriber portal. You can also customise the captive portal where they enter it.
When you generate a batch:
- Pick the package. Its speed and limit become the voucher's.
- Set the quantity. A batch holds from 1 to 10,000 vouchers.
- Choose the characters. Letters and numbers, or numbers only. Letters and numbers leave out I, L, O, 0 and 1. Numbers only never start with 0, because a spreadsheet drops a leading zero.
- Set the length. Codes run up to 12 characters, not counting the prefix. The minimum is 6 for letters and numbers, and 8 for numbers only, because digits alone are easier to guess.
- Add a prefix if you want one. It is optional in the dashboard, up to 6 characters.
- Set an expiry date, if you want one. It must be in the future.
Then print. Pick a layout:
- an A4 grid of compact tickets, or 50 vouchers per A4 page, in black and white or in colour
- 80 mm thermal slips, one voucher each
- 58 mm thermal slips, one voucher each
One print from the voucher list covers up to 1,000 vouchers, so keep a batch you plan to print at 1,000 or fewer. The 58 mm and 80 mm slips can be printed from an Android phone to a Bluetooth thermal printer through the RawBT app. Centipid's Bluetooth printing guide has the steps.
A voucher template can show a QR code on each ticket. The code opens the hotspot login page with the voucher already filled in. The QR code points at your hotspot's own login address, so it opens only on a phone connected to your Wi-Fi. The code printed beside it still works anywhere a customer can type it, so keep unsold slips out of sight.
You can export any set of vouchers to CSV (comma-separated values) or XLSX (an Excel file). You can also import codes you already have from a CSV file: 3 to 32 letters or numbers each, up to 5,000 per upload, with duplicates and codes already in use skipped.
Printed, unused codes are the same as cash. Keep the slips safe until they are sold.
Selling vouchers through agents
Shops and agents sell more vouchers than you can on your own, but paper stock goes missing. In Centipid you can issue a batch to an agent. The batch is charged against the agent's prepaid float at quantity times the package price, so stock and money move together. You can then see each agent's issued stock and sales, and use the agent sales report, set to a month, to work out their commission. The details are on the agent sales page.
Free APKs and GitHub generators
Searching for a free voucher generator turns up Android apps (APK files) and scripts on GitHub. Some are good. Before you give one your router login, check these:
- Who made it, and when it last changed. An abandoned tool can break on new RouterOS versions.
- Can you read the source? If not, you cannot know where your router login goes.
- How does it reach the router? MikroTik's API documentation says the API password is sent in plain text. Prefer API-SSL, and restrict the API service to your own addresses.
- Which account does it need? Make a separate router user with only the rights it needs, and do not use your admin login.
- Where do the codes live? A tool that only edits router users keeps no sales record, and cancelling a lost batch means finding its users on each router and removing them by hand.
- How is it installed? Install apps from a store or a project you can verify, never from a file sent in a chat group.
When the router alone is enough
One router and cash sales: User Manager or Mikhmon will do. When you have several sites, agents, or customers who want to pay by mobile money, move the vouchers into a billing system. See Centipid for vouchers, and the pricing page for what it costs. You can start a trial without a card.
FAQ
Can MikroTik generate vouchers without extra software?
Yes. User Manager can create batches of users and fill a printable voucher template. A script can add hotspot users too. Both leave cash sales and agents to you.
How long should a voucher code be?
At least six characters from letters and numbers, or eight digits if you use numbers only. Longer is safer if the voucher is worth a lot.
Can a voucher QR code log the customer in?
Almost. In Centipid the QR code opens the hotspot login with the voucher already typed in, and the customer taps once to redeem it. It works only from a phone connected to your hotspot.
How many vouchers can I make at once?
Up to 10,000 in one batch in Centipid.
Can I print vouchers from my phone?
Yes, from an Android phone. Create the PDF, then send it to a Bluetooth thermal printer through RawBT.


