AppSubscription API timing

Hi,

I’m creating a Shopify app that will charge store owners monthly.

I have some questions about the API for which I could not find relevant documentation. Could I kindly have some feedback on a few questions.

  • When a shop transitions from normal to frozen, then the app_subscriptions/update webhook is fired
  • the app_subscription.status will be frozen- When a shop transitions frozen back to normal
  • a webhook will be sent
  • the app_subscription.status will be active

Question: is the above understanding correct?

  • When a shop cancels a plan
    • the app_subscription.status will be cancelled
  • the app_subscriptions/update webhook will fire an event
  • Questions: if I receive the webhook and query AppInstallation for active_subcriptions is it guaranteed that the cancelled subscription will not be there, or is it possible that the webhook fires before the change is made?

Similarly:

  • When a shop changes subscriptions
  • the existing subscription status is cancelled
  • a new subscription status is active
  • two app_subscriptions/update webhooks will fire (potentially out of order)
  • Question: when receiving either of these, what are the possible states that a query to AppInstallation for active_subcriptions could be in?

Lastly, the app_subscription.status of “accepted” is deprecated so when creating a new app I should not expect to see it.

Also if there are some documents that spell out these details that I missed, I’d love to be directed there.

Thanks