I’m a new developer working on a Shopify app and have been going through the Managed App Pricing documentation. I have a couple of questions regarding best practices:
Is it necessary to include a navigation menu/link to the billing page? I understand that Shopify hosts the plan selection page at the URL: https://admin.shopify.com/store/:store_handle/charges/:app_handle/pricing_plans. To enhance the merchant experience, is it a good practice to add a link in the app’s navigation menu that redirects to this page? Or would this be redundant since Shopify already manages the billing process?
What is the best approach to track and manage subscription status? My app is using Shopify’s Managed App Pricing with time-based subscriptions and varying usage limits per tier. There are two main options I’m considering to track subscription status:
Registering for the APP_SUBSCRIPTIONS_UPDATE webhook to get updates when a subscription changes, then storing that data in a database.
Using the Billing API directly to query subscription information.What approach do you recommend, or should both methods be combined for better reliability?
For your first question, since Shopify is managing the app’s plan selection/billing page, you don’t explictly need to link to it within your app’s navigation link config, but it’s up to you if you’d like to do that.
It may make it more easy for merchants to quickly access the page, so from a usability stand point, I don’t think that’s a bad idea in general.
For your second question, I would definitely advise combining the two approaches if you can. You’d get the benefit of getting the subscription update info in near-real time via the webhook, but also have a built in reconciliation redundancy through the query itself if needed. Our webhooks are fairly reliable, but we can’t always guarantee delivery, so staggered polling is always recommended as a redundancy if possible (more info here).
I want to testing the subscription cancel operation in my development store, but i cannot find the cancel entry. Is the cancellation triggered only by uninstall the app?
Hey @Qiangqiang_Zhao - you’re correct here. If your app doesn’t offer a free plan, the APP_SUBSCRIPTIONS_UPDATE webhook would only trigger when the app is uninstalled.
If you did offer a free plan, it should trigger when the plan type is changed though which you could use to see if a paid plan has been cancelled (it should also change if someone upgrades to a lower or higher tiered plan).
Hope this helps - let me know if I can clarify anything as always here