How do you setup in app usage based subscription billing?

I am trying find out how to setup in app usage based subscription billing, also known as metered billing.

With this you charge your customers based on their consumption of your service during the billing cycle, instead of explicitly setting quantities. The billing cycle will be constant, but the amount varies month to month depending on how much the customer uses.

Below is a link to stripe which has this subscription billing method.

https://stripe.com/docs/billing/subscriptions/metered-billing

I don't know exactly but I think that's impossible, it's not allowed because they request a pre-paid method. I'm interested on a similar payment method but I'm not sure if it could be accepted by Apple. Did you get any advance with this? Maybe external payments?

How do you setup in app usage based subscription billing?
 
 
Q