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.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

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

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 28

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 7

@Yeeshoppy Can you resolve it?