Webhook to create users in my own server

New Member
2 0 0

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

 

 

0 Likes
Highlighted
Shopify Partner
45 3 9

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

ui-gab
Vancouver, BC Canada
https://www.uiavenue.ca
uiavenue.help@gmail.com
We specialize in Shopify App Development. If you need help just reach out.
0 Likes
New Member
2 0 0

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!

0 Likes
Shopify Partner
45 3 9

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.

ui-gab
Vancouver, BC Canada
https://www.uiavenue.ca
uiavenue.help@gmail.com
We specialize in Shopify App Development. If you need help just reach out.
0 Likes