Webhook for subscription order renewal

Webhook for subscription order renewal

mtbroomell
Visitor
1 0 0

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?

Replies 2 (2)

LarryReid
Shopify Staff
87 9 22

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.

EcomGraduates
Shopify Partner
602 48 81

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:

  1. 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.

  2. In your Shopify partner dashboard, go to the "Apps" section and select your app.

  3. Click on "Webhooks" in the left sidebar, and then click on the "Create webhook" button.

  4. 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).

  5. In the "URL" field, enter the URL for your webhook.

  6. 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 EcomifyTheme