Question about Webhooks

Solved
Marc40
New Member
1 0 0

I'm completely new to Shopify App Programming. So, for learning I try to program some kind of simple loyalty app. The User buy something and get Points for it (which I will save on my App-Server).

When I was figuring out how to do this, I found Webhooks.

From my understanding: When my App is subscribing to a Webhook-Topic (for example "Order paid") my App gets a notification with a payload and I can calculate on my Server, how many Points the User get. (How I display the amount to the user is a problem which I will tackle later)
But the Documentation says, you should not rely on Webhooks because they can be delayed or even worse: they might not even be delivered.

That would be bad for my Use-Case. I want to show the User immediately how many Points he get (so I need an instant notification from Shopify).

Do I misunderstand Webhooks? But if I'm correct: What would be the correct approach for my Use-Case?

Accepted Solution (1)

Accepted Solutions
james-langille
Shopify Staff (Retired)
Shopify Staff (Retired)
70 15 24

This is an accepted solution.

Hello @Marc40! Great question. We say that webhooks are not 100% foolproof because there can always be issues in delivery over the network or the occasional outage/delay in delivering webhooks - it's a best-effort system that is generally very, very reliable. I think your use case should be fine to use webhooks, because although the rare missed webhook would be bad because a user may miss out on a few points, it wouldn't be earth-shattering relative to mission-critical use cases (i.e. something like processing actual payments, which is performed within Shopify).

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

View solution in original post

Reply 1 (1)
james-langille
Shopify Staff (Retired)
Shopify Staff (Retired)
70 15 24

This is an accepted solution.

Hello @Marc40! Great question. We say that webhooks are not 100% foolproof because there can always be issues in delivery over the network or the occasional outage/delay in delivering webhooks - it's a best-effort system that is generally very, very reliable. I think your use case should be fine to use webhooks, because although the rare missed webhook would be bad because a user may miss out on a few points, it wouldn't be earth-shattering relative to mission-critical use cases (i.e. something like processing actual payments, which is performed within Shopify).

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