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 }
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'
User | Count |
---|---|
15 | |
8 | |
8 | |
7 | |
6 |