Help with shopify app subscription webhooks.

I’m working on an app that includes a subscription feature, and I have the following question regarding Shopify’s recurring billing:

  1. How can I test changes to a recurring subscription? Specifically, after 30 days when the billing period ends, should I expect to receive a notification, such as a webhook, from Shopify? Or does Shopify automatically renew the subscription without sending any webhook notifications? If so what would the webhook like like?
  2. Is there a way for me to test successful payment?
  3. Is there a way for me to test failure payment?
mutation AppSubscriptionCreate {
  appSubscriptionCreate(
    name: "basic_plan_plus_new8"
    lineItems: {
      plan: {
        appRecurringPricingDetails: {
          interval: EVERY_30_DAYS
          price: { amount: "109.99", currencyCode: CAD }
          discount: { }
        }
      }
    }
    test: true
    returnUrl: "https://test.com"
  ) {
    confirmationUrl
    userErrors {
      field
      message
    }
    appSubscription {
      createdAt
      currentPeriodEnd
      id
      name
      returnUrl
      status
      test
      trialDays
    }
  }
}
1 Like

Hi @xiao91 ,

  1. Webhook Notifications for Recurring Subscriptions

    • Shopify does send webhooks when a subscription renews. You should listen for the APP_SUBSCRIPTIONS_UPDATE webhook to track changes.
    • If the subscription is canceled or fails, you might receive an APP_SUBSCRIPTIONS_CANCELLED webhook.
  2. Testing Subscription Renewal

    • Since you’re using test: true, Shopify won’t charge real payments, but you should still receive test webhook events.
    • You can check webhook payloads in the Shopify Partners Dashboard under “Webhooks.”
  3. Testing Payment Success

    • Shopify doesn’t allow forced renewal for testing, but you can monitor webhook events in a test store.
  4. Testing Payment Failure

    • There’s no direct way to simulate a failed payment, but you can manually cancel the test subscription to check how your app handles it.

I do not see any webhooks options under Shopify Partner Dashboard.

  1. I went through all the shopfy discussion forums still same question being asked many times with no answers. Is it not possible to get the shopify team to have an actual answer in the shopify documents, everyone is having this issue but not answer at all.

https://community.shopify.com/c/technical-q-a/how-can-i-test-a-recurring-webhook-subscription-without-waiting/m-p/1136727

https://community.shopify.com/c/technical-q-a/how-can-i-test-a-recurring-subscription-webhook-on-shopify/m-p/1876283/highlight/true

https://community.shopify.com/c/shopify-apps/webhooks-recurring-payments-check-payment-status/m-p/2196215

https://community.shopify.com/c/technical-q-a/how-can-i-test-a-recurring-subscription-webhook-on-shopify/m-p/1136740

Hi! From documentation https://shopify.dev/docs/apps/launch/billing#webhook-topics

  • APP_SUBSCRIPTIONS_UPDATE: Triggered when the status, or capped amount, of an AppSubscription object is changed, and when a subscription’s status changes.

So, what payload shoud I receive if billing was renewed successfully (PENDING->ACTIVE or nothing because ACTIVE->ACTIVE is not a change)? I need to know when new success payment was done and I can reset my app features. Thank you!

We have a problem we are not getting APP_SUBSCRIPTIONS_UPDATE when merchant with active subscripiton uninstalls the app
regarding APP_SUBSCRIPTIONS_CANCELLED , will we get the webhook also if the subscription cancelation reason was that the app uninstalled by the merchant?

I’ve also contacted shopify IT team, and they are giving very different answers from different people. So is very confusing for me and many people of what is the actual behaviour for this.

Based on the response i got back from the Shopify Support IT team.

Shopify does NOT send webhook for subscription renew

subscription cancel → yes, subscription fail not sure

Webhook under development mode, are not triggered anymore for app_subscriptions/update in my case.


[webhooks]
api_version = "2024-10"
[[webhooks.subscriptions]]
topics = [ "app_subscriptions/update", "app/uninstalled" ]
uri = "[https://hkdk.events/xxxxx](https://hkdk.events/xxxxx)"

When I uninstalled the app, I do receive the webhook but when I do billing.request(...), looks like I am not receiving the webhook anymore.
Did I misconfigured something?