I want to realize in my program that when the user completes the order in the Shopify platform, my program can get the order information as soon as possible.
If the order in the Shopify API is used to send the request, but the duplicate order information will be pulled, how can I avoid
I didn't find that the Shopify API has an active push order information interface. How can I get the order information in shpify in real time.
Hey @ZhangJY ,
What you are looking for is possible by setting up a Webhook subscription. A Webhook subscription means that Shopify will notify your particular API Webhook every time an event you are subscribed to occurs, and will provide you with all of the data associated to that event, In your case, you would want to make a Webhook subscription for the topic of "orders/create". You can read more about webhooks here: https://help.shopify.com/en/api/getting-started/webhooks and here: https://help.shopify.com/en/api/reference/events/webhook
This is also a really good documentation on how to build an app using NodeJS and Express to listen to Webhook subscriptions and verify they are coming from Shopify: https://medium.com/@scottdixon/verifying-shopify-webhooks-with-nodejs-express-ac7845c9e40a
Hassain | Developer Support Specialist @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution