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

yannispsarras
Visitor
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 3 (3)

james-langille
Shopify Staff (Retired)
70 15 27

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.

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

Yeeshoppy
Shopify Partner
34 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? 

danhho
Shopify Partner
22 1 6

@Yeeshoppy Can you resolve it?