More than once, I've built a software library - usually something required in specialized industries - which I've then gone on to sell to enterprise customers. Each time, however, I feel that I'm leaving money on the table by pricing it wrong.
It does not seem wise to charge a fixed one time fee of a few hundred bucks when the customer then uses the library for years in their own products. Is it still common to charge per installed CPU/core? How do you then deal with cloud systems where that number always changes and may even be difficult to determine? What about charging "per end user"? In general, can libraries also be charged on an ongoing basis like a SaaS (x EUR per month or year), i.e. do customers accept that?
I've offered maintenance and support packages but when the software works beyond the initial warranty, customers usually don't order them. I could turn the library into an API and charge for that but that's not always what the customer wants.
Any ideas on how to maximize my revenues here?
I don't really do ongoing payment (rental) schemes, out of pure personal preference. (If a customer asks for one, I can do that, though -- it's just not a default option). I don't like it when other software does this, so I'm not going to do it myself. That's not an economic or business-based decision and not a recommendation. I'm just mentioning it to explain why that's absent here.
I take a look at what my development costs were to develop the library, and use that to estimate what it would cost another shop to replicate the same functionality. I try to subtract out the portion of the development costs that are reflect the API design and other things that are unique to library development (including documentation).
Then, once I have an estimate for what it would cost my potential customers to develop the functionality, I cut that in half, and that becomes my asking price.
I also sell libraries in two forms: with source code and without. For those who want the source code (which is most of my customers), I charge double what the asking price I computed above is.