when exactly to trigger usage charges?

Hi there,

We are in the process of building our first Shopify app and after reading some documentation around the billing API and usage charges, it seems that we could potentially use this model to charge merchants a setup fee, which basically covers some hours of professional services which are required before they put our app in use in their stores. The idea is that once they pay for that setup fee, then they can sign up to any of the recurring subscription charges we have available for the app to work in their stores.

The questions at hand are these though:

1- Can we actually charge a usage-based charge before a recurring subscription charge? Based on this article I believe the answer is yes as long as the usage charge is tied to a $0 recurring charge and has a capped amount. However, I’d be interested to confirm with anyone of you guys if this is indeed true.

2- In the flow described above? When exactly would we be able to trigger the usage-based charge? During app installation?

3- Is there any type of flexibility to manage these usage-based charges in a scalable manner? For example, would we be able to setup different values for the usage-based charge for different merchants? If the answer to this is yes, is there a way to efficiently code this logic without having to manually edit the code for the usage-based charge every time?

Please advise and thanks!