Admin → Settings → Notifications
Webhooks are a tool for retrieving and storing data from a certain event. They allow you to register an http:// or https:// URL where the event data can be stored in JSON or XML formats. Webhooks are commonly used for:
- Placing an order
- Changing a product's price
- Notifying your IM client or your pager when you are offline
- Collecting data for data-warehousing
- Integrating your accounting software
- Filtering the order items and informing various shippers about the order
- Removing customer data from your database when they uninstall your app
From your shop admin, go to Settings > Notifications pages.
On the Notifications page, scroll down to the Webhooks section.
Click on the Create a webhook button. A new window should appear.
From the first drop-down, select the "Event" from the following list:
- Order cancellation: a webhook will be sent everytime an order is cancelled.
- Order creation: a webhook will be sent every time an order is created.
- Order fulfillment: a webhook will be sent everytime an order is fulfilled.
- Order payment: a webhook will be sent everytime an order has been payed.
- Order update: a webhook will be sent everytime an order has been updated.
- Product creation: a webhook will be sent every time a product has been created.
- Product deletion: a webhook will be sent everytime a product has been deleted.
- Product update: a webhook will be sent everytime a product has been updated.
From the second drop-down, choose the format in which you would like Shopify to send this infromation to you. The two choices are JSON or XML.
Under URL, enter the URL where you would like data to be stored. It is important to note that webhooks cannot be returned to the following URLS:
- Any URL ending in the word "internal" (i.e. thisshop.com/internal)
- "Fake" domains like www.example.com
- Shopify domains (i.e. shopify.com and myshopify.com)
Click Add webhook. Your webhook should now appear under the "Webhooks" section.
You also have the ability to test your webhook, to make sure the information you want is being sent to the correct URL. To do this click the send test notification link. Verify at the URL that you specified that this works.
From your shop admin, go to Settings > Notifications.
From the Notifications page, scroll down to the Webhooks section.
Next to the webhook you created, there should be a little trash can icon.
Click on the trash can icon to delete the webhook.