Shopify functions check for subscription

I would like to check in my Shopify functions if a user has an active subscription to my app. I can’t find it anywhere in the documentation. How can i make sure the functions are only used whenever the user has an active subscription?

Hi Leon - are you seeing instances where stores that don’t have an active Shopify App Store subscription for your app are still able to execute functions?

Hello @Leon2

Once you can make an external API call, utilize it to verify the status of a subscription. Pass the shop_name parameter in the API call, check its existence in your database, and then verify if the subscription is active.

Also, you can refer to https://community.shopify.com/post/2661258 this link.

If the solution presented meets your needs and addresses your query effectively, I encourage you to accept it as the chosen answer. This will acknowledge the support you received and aid fellow community members in identifying reliable and effective solutions for their similar concerns.
Thank you.
(GD)