# Webhooks This topic describes how to create webhooks in the Rebilly UI. For information on how to use webhooks with the Rebilly API, see [Webhook configuration](/docs/dev-docs/webhooks-configuration). Use webhooks to notify your systems when certain events occur and to collect event information. ## Create a webhook Use this process to create and define new webhooks. 1. In the left navigation bar, press . 2. In the **Development section**, press **Webhooks**, then press **Create webhook**. 3. In the **ID** field, enter an ID for the webhook. 4. In the **Status** section, to activate or deactivate the webhook, turn on or off the toggle. 5. In the **Events** section, select **Send specific event types**. 6. In the **Events filter** dropdown, select the event or events that you want to associate with the webhook. 7. Optionally, to define conditions for when the webhook is sent: In the **Conditions** section, clear the **No conditions** checkbox, then add one or more filters. Note: If the **No conditions** checkbox is selected, the webhook is sent for all events that are selected in the **Events** section. 8. In the **Endpoint** section, in the **Webhook URL** field, specify the HTTP method and URL for your endpoint. The URL can include placeholders. For example, `https://your-domain.com/webhook/{{customer.id}}`. 9. Select from the following: - Specify authorization type: Press **Authorization**. - Define or add headers: Press **Headers**, then press **Add header** to specify header value. - Specify custom webhook bodies: Press **Body**, clear the **Use default event payload** checkbox, then specify the payload body. To add dynamic event-based content, press **Add placeholders**. For example, a placeholder to fetch the email address of a customer is `{{subscription.customer.email}}`. 10. Press **Test webhook**. 11. Press **Save webhook**. ## Delete a webhook Use this process to delete an existing webhook. 1. In the left navigation bar, press . 2. In the **Development section**, then press **Webhooks**. 3. In the list of webhooks, on the right of the webhook you want to delete, press . ## Edit a webhook Use this process to edit or reconfigure an existing webhook. 1. In the left navigation bar, press . 2. In the **Development section**, then press **Webhooks**. 3. In the list of webhooks, under the **ID** column, press the ID of the webhook that you want to edit. 4. Edit the webhook, then press **Save webhook**. ## Activate or deactivate a webhook Use this process to activate or deactivate an existing webhook. 1. In the left navigation bar, press . 2. In the **Development section**, then press **Webhooks**. 3. In the list of webhooks, under the **ID** column, press the ID of the webhook that you want to activate or deactivate. 4. In the **Status** section, turn the **Webhook inactive** toggle on or off. 5. Press **Save webhook**. ## Test a webhook Use this process to test an existing webhook. 1. In the left navigation bar, press . 2. In the **Development section**, press **Webhooks**. 3. In the list of webhooks, on the right of a webhook, press **Test webhook**. ## Placeholders For more advanced configuration options, all fields support [liquid templates](https://shopify.github.io/liquid/). Placeholders are dynamic content variables. Use placeholders to dynamically add customer, payment, or event information to webhook URLs, headers, and custom bodies. Placeholders are available when you configure webhook endpoints and depend on the event type. To use placeholders in a webhook, in the **Body** section, clear the **Use default event payload** checkbox, then specify the payload body with placeholders. For example, a placeholder to fetch the email address of a customer is `{{subscription.customer.email}}`. For more information, see [Create a webhook](#create-a-webhook). ### Time and date placeholders When using a time and date placeholder, such as `{{invoice.dueTime}}`, the default output is: `2020-02-03T14:25:30+00:00`. To format the date into a legible format, use the following formatting. For example, if you want the date to read `February 3, 2020`, use this placeholder `{{invoice.dueTime | date: "%B %e, %Y"}}` For all time and date formatting options, see [strftime.net](http://strftime.net/). #### Common time and date formatting - Month: - Feb — use `%b` - February — use `%B` - Day: - 3 —use `%e` - 03 — use `%d` - Year: - 20 — use `%y` - 2020 — use `%Y`