Just non-test charges.
Set up a lot of logic which simply checks the plan name they have, and if it's affiliate or trial -- send them to a page requesting they upgrade their plan before trying to do something specific, like upgrading the app package etc.
The way I've implemented this is by having middleware which is queried every request after the user has completed the install procedure for the app.
If the store plan matches one of the trial types, set a value in REDIS for their store to say that they are a trial user with a 30 minute timeout (in case they upgrade, but also doesn't hammer the shopify api limiter).
If the store isn't -- redirect them to the payment page which redirects them to the "pls confirm payment" thing in Shopify. Once they have done that, set a value in REDIS to say that this store has payed. On uninstall remove the REDIS key so they don't get no free 30 minutes of app usage etc.
Then the middleware just checks to see if this key exists in redis, otherwise normal query stuff.
Trial users I've blocked from upgrading the app plan, they just get redirected to the upgrade store plan page as said above.
Apparently cancelled is another possible value.
These values really need to be documented. App developers need to know what these values imply, esp, the causes and consequences of the values frozen, cancelled, and dormant.
For apps that need to keep an accurate track of a shop's purchase history, I believe the plan_name attribute in the shop/update webhook callback is the only thing that could be used to reliably trigger a disconnect process.
I checked our database to see what values we have and this is what i found:
"affiliate", "staff", "professional", "custom", "shopify_plus", "unlimited", "basic", "cancelled", "staff_business", "trial", "dormant", "frozen", "singtel_unlimited", "npo_lite", "singtel_professional", "singtel_trial", "npo_full", "business", "singtel_basic", "uafrica_professional", "sales_training", "singtel_starter", "uafrica_basic", "fraudulent", "enterprise", "starter", "comped", "shopify_alumni"
|2 hours ago|
|2 hours ago|
|4 hours ago|