Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hello community,
I'm looking for APP_SUBSCRIPTIONS_UPDATE webhook response. I could add it using GraphQl, but I can find response of this webhook. This is the only documentation about webhook responses I found, but there is no APP_SUBSCRIPTIONS_UPDATE event. I also can't find a way how to test this event.
I would appreciate any help.
Thank you in advance!
Solved! Go to the solution
This is an accepted solution.
Hi Alex,
I'm successfully using this webhook.
Setting it using this mutation (API version 2020-04):
webhookSubscriptionCreate(topic: APP_SUBSCRIPTIONS_UPDATE , webhookSubscription: {callbackUrl: "${appSubcriptionCB}", format: JSON}) { webhookSubscription { id callbackUrl format topic } userErrors { field message } }
I'm receiving the webhook every time there's a status change in the app subscription.
The webhook body will include these fields:
{ admin_graphql_api_id, name, status, admin_graphql_api_shop_id, created_at, updated_at }
This is an accepted solution.
Hi Alex,
I'm successfully using this webhook.
Setting it using this mutation (API version 2020-04):
webhookSubscriptionCreate(topic: APP_SUBSCRIPTIONS_UPDATE , webhookSubscription: {callbackUrl: "${appSubcriptionCB}", format: JSON}) { webhookSubscription { id callbackUrl format topic } userErrors { field message } }
I'm receiving the webhook every time there's a status change in the app subscription.
The webhook body will include these fields:
{ admin_graphql_api_id, name, status, admin_graphql_api_shop_id, created_at, updated_at }
Hi Shaibt!
Thank you for your reply! I appreciate it!
Do you have any idea how can I test it, other than waiting until some subscription is changed?
Thank you in advance!
You can create test app subscription charges using a mutation such as:
mutation appSubscriptionCreate($name: String!, $lineItems: [AppSubscriptionLineItemInput!]!, $returnUrl: URL!, $test: Boolean, $trialDays: Int) { appSubscriptionCreate(name: $name, lineItems: $lineItems, returnUrl: $returnUrl, test: $test, trialDays: $trialDays) { appSubscription { id createdAt lineItems { id plan { pricingDetails { __typename } } } } confirmationUrl userErrors { field message } } }`
Just make sure you set test to Boolean 'true'
Awesome! Thank you so much! That is what I was looking for 🙂
Thanks, this is exactly what I'm looking for, and I don't know why it's not in the shopify documentation, at least it's super hard to find
@Shaibt @Alex_Buran https://github.com/Shopify/shopify-api-js/blob/HEAD/docs/guides/webhooks.md the shopify doc it was not recived the any response.
can you help me with how to added the this webhook. I am facing issue to webhook is returnt any things.
Thanks for this, it is extremely inconvenient not having any of this information in Shopify's documentation.