Getting a notification or webhook when a recurring charge is successful or unsuccessful

yannispsarras
New Member
1 0 0

Hi all,

Quick question. We use the Shopify Billing API (REST) to create a recurring application charge for our SaaS platform. That works fine and we have combined it with a return url that then notifies our billing system that a charge essentially happened and unlocks the plan for the user. We handle upgrades / downgrades the same way.

My question is how do we know if, in a future billing cycle, that recurring charge was successful or not such that we act accordingly?

Thanks

Y

Replies 2 (2)
james-langille
Shopify Staff
65 14 18

Hello, @yannispsarras ,

Yes, webhooks for billing attempts are possible. Check out https://shopify.dev/docs/admin-api/rest/reference/events/webhook for information about how to use webhooks and what topics are available. I imagine you'd want to subscribe to subscription_billing_attempts/success and subscription_billing_attempts/failure.

james-langille | Developer @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Yeeshoppy
Excursionist
17 1 0

Why do they prompt that the subject of fee deduction in this notice does not exist when I add it using the admin API "errors":{"topic":["Invalid topic specified: subscription_billing_attempts\/failure. Does it exist?