Webhooks

AdminSettingsNotifications

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

Create webhooks

  1. From your store Admin, go to Settings > Notifications pages.

  2. On the Notifications page, scroll down to the Webhooks section.

  3. Click on the Create a webhook button. A new window should appear.

  4. From the first drop-down, select the "Event" from the following list:

    • Order creation: a webhook will be sent every time an order is created.
    • Order update: a webhook will be sent every time an order has been updated.
    • Order payment: a webhook will be sent every time an order has been paid.
    • Order cancellation: a webhook will be sent every time an order is canceled.
    • Order fulfillment: a webhook will be sent every time an order is fulfilled.
    • Order deletion: a webhook will be sent every time an order is deleted.
    • Product creation: a webhook will be sent every time a product has been created.
    • Product update: a webhook will be sent every time a product has been updated.
    • Product deletion: a webhook will be sent every time a product has been deleted.
    • Cart creation: a webhook will be sent every time a cart is created.
    • Cart update: a webhook will be sent every time a car is updated.
    • Collection creation: a webhook will be sent every time a collection is created.
    • Collection update: a web hook will be sent every time a collection is updated.
    • Collection deletion: a web hook will be sent every time a collection is deleted.
    • Customer group creation: a web hook will be sent every time a customer group is created.
    • Customer group update: a web hook will be sent every time a customer group is updated.
    • Customer group deletion: a web hook will be sent every time a customer group is deleted.
    • Checkout creation: a web hook will be sent every time a checkout is created.
    • Checkout update: a web hook will be sent every time a checkout is updated.
    • Checkout deletion: a web hook will be sent every time a checkout is deleted.
    • Fulfillment creation: a web hook will be sent every time an order is marked as fulfilled.
    • Fulfillment update: a web hook will be sent every time fulfillment is updated on an order.
    • Customer creation: a web hook will be sent every time a new customer is created.
    • Customer enable: a web hook will be sent every time a customer account is enabled.
    • Customer disable: a web hook will be sent every time a customer account is disabled.
    • Customer update: a web hook will be sent every time a customer record is updated.
    • Customer deletion: a web hook will be sent every time a customer record is deleted.
    • Shop update: a web hook will be sent every time a shop property is updated.
    • Refund create: a web hook will be sent every time a refund is issued.
  5. From the second drop-down, choose the format in which you would like Shopify to send this information to you. The two choices are JSON or XML.

  6. 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:

    • Localhost
    • 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)
  7. Click Add webhook. Your webhook should now appear under the "Webhooks" section.

  8. 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.

Delete webhooks

  1. From your store Admin, go to Settings > Notifications.

  2. From the Notifications page, scroll down to the Webhooks section.

  3. Next to the webhook you created, there should be a little trash can icon.

  4. Click on the trash can icon to delete the webhook.

Reminder

If a webhook repeatedly fails, it is automatically deleted from your Admin.

Ready to put what you've learned into action?

Build an online store with Shopify. Try it free.

Experience the future of retail now.

Shopify Point of Sale. Try it free.