I am just trying to look at different licensing models and potential technical C++ implementations.

Suppose you have **a desktop application including several algorithms** (A1, A2, A3). This application is communicating with some server (potentially in the cloud). These "local" algos may be used independently. **Is there any solution/framework out there which could allow us to bill their usage independtly?**

For example, , one user uses algo A2 and A3. Before saving files, the software computes the final bill, sends it to some server, asks the user to pay it and generate the results file. 

This would allow to ship a potentially expensive software "for free" to the users and without the risk for them to spend an enourmous amount of money upfront without being sure this software will actually be heavily used.

Related question: what are the risks?