Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
I cannot find any webhooks related to billing.
I need to know when one-time application charge changes status.
Is it possible to be notified by shopify when it happens, or should I monitor it myself, requesting charge status periodically ?
Hey @pk7
There aren't any billing webhooks.
Update: Billing Webhooks are available through our Billing GraphQL API.
You should be able to keep track of the status along the way: when you create the charge it will be pending, when they they accept (and redirect back to you) it will be accepted, once you activate it becomes active - should they not accept within two days it will be expired.
Scott | Developer Advocate @ Shopify
We have SaaS app that integrates with shopify (along with other services). Client uses it for example on our mobile application.
He needs to buy a billing plan on our application in ourder to use it.
He has to have account on our side. If we won't know that his payment failed nor succeeded, we won't know if we should restrict his access to our SaaS.
We have this system implemented on our side already (attaching Visa / Mastercard card), but it is Shopifys requirment to bill his via Shopify Billing API in order to pass shopify app review.
Once the charge is accepted, you can activate it. Then, look at the response to confirm it's been activated.
Scott | Developer Advocate @ Shopify
How can I know it has been confirmed by client ?
Should I depend only on clients browser redirect ? It's not really reliable, isn't it ?
Also, if you require of us to charge our clients using Shopify billing API, it would be nice to know if client didn't pay.
Won't you agree ?
Only accepted charges can be activated. https://shopify.dev/tutorials/charging-for-your-app-with-rest-admin-api-concepts#one-time-applicatio...
Should I depend only on clients browser redirect ? It's not really reliable, isn't it ?
No. The redirect contains a charge ID - you'll need to activate this charge and examine the response.
Scott | Developer Advocate @ Shopify
Yes, but you still depend on the fact that client's browser will or will not do something.
It's not really reliable, especially when we're talking about financing stuff.
Hello,
Billing Webhooks are only available through our Billing GraphQL API, you can find more information about this here and how to create and subscribe to them
https://shopify.dev/tutorials/bill-for-your-app-using-graphql-admin-api
To learn more visit the Shopify Help Center or the Community Blog.
Hi,
*Background*
I'm following https://shopify.dev/tutorials/bill-for-your-app-using-graphql-admin-api#webhooks-for-billing with graphql.
I'm having issues subscribing to the app_purchases_one_time/update webhook topic. (403 response status with no message) .
*Ask*
Am I missing some required scopes? I just want to know if payment for my app was confirmed or declined.
Thanks
Probably you need to subscribe to this topic 'app_subscriptions/update'
Hey @SBD_ this was really helpful information. I read all the documentation for the billing API and I don't believe this is mentioned any where. It would be really great for devs that are going through this process for the first time to have it included in the documentation. Just my 2 cents.