For discussing the development and integration of subscription-enabled shops using Shopify's Subscription APIs.
As the subject says, I need to be able to trigger a webhook when a subscription order is paid, failed or updated every month (or other interval). It looks like there's no native way to do subscription orders so I'd have to use one of the subscription services mentioned in the shop, is there any way to do this via API or webhook?
Essentially, we want to be able to turn off a service that lives outside of Shopify if someone fails to pay their monthly bill. Any ideas?
Thanks for the question. I haven't had this request before. I hope I can help. Have you seen the `SUBSCRIPTION_BILLING_ATTEMPT_*` webhooks? (https://shopify.dev/api/admin-graphql/2022-10/enums/WebhookSubscriptionTopic#value-subscriptionbilli... https://shopify.dev/api/admin-graphql/2022-10/enums/WebhookSubscriptionTopic#value-subscriptionbilli... and https://shopify.dev/api/admin-graphql/2022-10/enums/WebhookSubscriptionTopic#value-subscriptionbilli...).
It sounds like they might be what you're asking for, but if not, tell me what's missing and I'll try to get and answer for you.
To learn more visit the Shopify Help Center or the Community Blog.
Hello there
Yes, you can use webhooks to trigger an action when a subscription order is paid, failed, or updated. You can set up a webhook in your app or service to listen for the recurring_application_charge/paid
, recurring_application_charge/failed
, or recurring_application_charge/updated
event, depending on which event you want to trigger your webhook.
Here's how you can set up a webhook for a recurring application charge:
Create a webhook in your app or service that listens for the recurring_application_charge/paid
, recurring_application_charge/failed
, or recurring_application_charge/updated
event.
In your Shopify partner dashboard, go to the "Apps" section and select your app.
Click on "Webhooks" in the left sidebar, and then click on the "Create webhook" button.
In the "Event" field, select the event you want to trigger your webhook (recurring_application_charge/paid
, recurring_application_charge/failed
, or recurring_application_charge/updated
).
In the "URL" field, enter the URL for your webhook.
Click on the "Save webhook" button.
Once you've set up the webhook, your app or service will receive a notification whenever a subscription order is paid, failed, or updated. You can then use the information in the webhook payload to turn off the service for customers who have failed to pay their monthly bill.
If this fixed your issue, likes and accepting as a solution are highly appreciated
| Build an online presence with our custom-built Shopify Theme: EcomifyTheme
| Check out our reviews: Trustpilot Reviews
| We are Shopify Partners: EcomGraduates Shopify Partner