Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Webhook regarding RecurringApplicationCharge

Solved

Webhook regarding RecurringApplicationCharge

umairakram
Shopify Partner
17 1 7

Hi all, I'm implementing Shopify app subscription payment to our app. I need to perform some action when a RecurringApplicationCharge is created, updated, or deleted. I tried to add the following webhook but API doesn't allow me to add them. Do I need to add any permission for this?

 

subscription_contracts/create, subscription_contracts/update

 

Please also confirm do I using the right webhook or not? if not please help me with this. 

Accepted Solution (1)

james-langille
Shopify Staff (Retired)
70 15 28

This is an accepted solution.

Hello!

 

I believe you require the 'orders' permission to create the subscription_contracts webhooks. However, I also think these are not the correct webhooks for you to use - they deal with events relating to repeat purchases of products on a subscription basis (hence why 'orders' is required). What you're looking for is the 'app_subscriptions/update' webhook. You shouldn't need permissions to create this webhook, but you might need to do so using GraphQL rather than REST.

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Replies 2 (2)

james-langille
Shopify Staff (Retired)
70 15 28

This is an accepted solution.

Hello!

 

I believe you require the 'orders' permission to create the subscription_contracts webhooks. However, I also think these are not the correct webhooks for you to use - they deal with events relating to repeat purchases of products on a subscription basis (hence why 'orders' is required). What you're looking for is the 'app_subscriptions/update' webhook. You shouldn't need permissions to create this webhook, but you might need to do so using GraphQL rather than REST.

To learn more visit the Shopify Help Center or the Community Blog.

umairakram
Shopify Partner
17 1 7

@james-langille Thanks for the guidance, I used the GraphQl mutation for webhookSubscriptionCreate to create the 'app_subscriptions/update' and it is working but I need to get the full information of the appSubscription payment, and the webhook provides me only 'name' and 'status'. is there any way to get full information on the event of webhook? like: 

price, 
billing_on,
activated_on,
cancelled_on,
trial_ends_on,
currentPeriodEnd