Coming from a background in open-source, your model is not that reliable.
In general, open-source licenses must comply with the open-source definition, in particular sections 5 and 6:
5. No Discrimination Against Persons or Groups
The license must not discriminate against any person or group of persons.
6. No Discrimination Against Fields of Endeavor
The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.
Which means not restricting anyone or any entity for any purpose.
This means you would need to dual-license your software under a custom commercial license and an open-source license. Your best bet to make companies prefer the commercial license is to use a license that requires source code of derivative works or modifications is revealed (such as the GPL) for open-source.
However, in practice, no matter what your license is, a company can and will just take the open-source version at no cost to them.
In the majority of these cases, even if your software was paid-only they wouldn't have taken it, and would keep shopping around for software they didn't have to pay for. This model can and does work, but keep in mind that enforcing it is hard.
The best route to go down is to make an open-source library. If it's popular (see FontAwesome), you can potentially make commercial versions of that library.