A Webhook is an event notification sent to an URL of your choice. Users can configure them to trigger events on one site to invoke behavior on another.
Webhooks are useful for integrations with third-party services and other external APIs that support them.
How to create webhooks
To create a new webhook:
1. go to WooCommerce > Settings > Advanced > Webhooks.
Note: Webhooks were formerly found under WooCommerce > Settings > API before WooCommerce 3.4.
2. Select Create a new webhook (first incident) or Add webhook. The Webhook Databox will show.
3. Set the following:
- Name: The name is auto-generated as “Webhook created on [date and time of creation]” as a standard to simplify its creation. Change the name to something else.
- Status: Set to Active (delivers payload), Paused (does not deliver), or Disabled (does not deliver due to delivery failures).
- Topic: Choose when the webhook should be triggered from
– subscription created
– subscription updated
– subscription deleted
– subscription restored
- Delivery URL: URL where the webhook payload is delivered.
- Secret: The Secret Key generates a hash of the delivered webhook and is provided in the request headers. This defaults to the current API user’s consumer secret if nothing is entered.
4. Save Webhook.