Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
I sell digital products (software), I've my own licenser system and user management.
I would like to use shopify for the web/cart/checkout/etc, but I need to manage the users and licensing from my own server.
in shopify: myweb.com (I don't need to create users in shopify side)
in my server: userarea.myweb.com
I can create a webhook to point to userarea.myweb.com/orderaproved
orderaproved url: (in my server)
...
if data['customer'] doenstExist
user = createUser(data['email'], passwd)
for product in data['products']:
user.createLicense(product['name'])
...
I've two questions:
1) Webhooks is the best solution for that?
2) Is there more information about the data sended by the webhook? (a description for each property)
Thanks
Hey,
1. Webhooks are good method to get the most up to date customer information as it is created/updated/deleted. However Shopify also recommends querying the existing customer table as well, because sometimes a hook may get misplaced or doesn't fire. This is important if you absolutely need to have the entire data set of customers from shopify's database.
2. For webhooks: https://help.shopify.com/en/api/reference/events/webhook#events
If you are looking for specific information about each of the fields, I find that it is sometimes scattered, and the best place to look if it exists is information about that object.
For the customer: https://help.shopify.com/en/api/reference/customers/customer
Thanks for your response.
Ok, I've tested the "test" webhook, but I would like to know is there is any difference if I use paypal as a payment method,
Do you have a webhook response example for that? This is crucial to know if I can migrate my platform to shopify,
Thanks!
From what I've seen there isn't a difference or not much of a difference between a webhook sent by paypal vs just regular checkout.
This is assuming you are integrating paypal using Shopify's Paypal integration ( Website Admin/Settings/Payment Provider ).
I do not have a production environment website, so I'm not able to give you a webhook response example. It doesn't allow the payment process to proceed, so I'd have no way to get that webhook.
Based on what I've seen, it should create the customer information when using paypal, but I'm not 100% as I am not able to test.