For discussing the development and integration of subscription-enabled shops using Shopify's Subscription APIs.
Hi all I want to allow app access free when store in developement. when store is going the live that time app can change. what are the stpes need to do for that.
i am using the shopify subscriptions graphql api
Hi Er,
To allow free app access when a store is in development you'll want to set up free testing on your app. Our developer docs describe this here, but the general process is:
Identify the development store: You can identify a development store by querying the Shopify API for the Shop resource. Development stores return { "plan_name" : "affiliate" }
.
Don't create an app charge: When store installs your app, and you identify it as a development store, don't create an app charge in Shopify.
Subscribe to the shop/update
webhook: You should also subscribe to the shop/update
webhook in case the development store changes to a paid plan later.
Block access to your app and create an app charge: If you receive a notification that a development store has changed to a paid plan, then block access to your app and create an app charge for the paid plan.
Unblock access to the app: When the user agrees to the charge, you can unblock their access to the app.
Remember, if you make your app free for development stores, you can get your app listed on Shopify's Partner-friendly app list. Hope this helps!
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog