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.
Use webhooks to notify your systems when certain events occur and to collect event information.
Use this process to create and define new webhooks.
- In the left navigation bar, press Automations .
- In the Development section, press Webhooks, then press Create webhook.
- In the ID field, enter an ID for the webhook.
- In the Status section, to activate or deactivate the webhook, turn on or off the toggle.
- In the Events section, select Send specific event types.
- In the Events filter dropdown, select the event or events that you want to associate with the webhook.
- 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. - 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}}
. - 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}}
.
- Press Test webhook.
- Press Save webhook.
Use this process to delete an existing webhook.
- In the left navigation bar, press Automations .
- In the Development section, then press Webhooks.
- In the list of webhooks, on the right of the webhook you want to delete, press .
Use this process to edit or reconfigure an existing webhook.
- In the left navigation bar, press Automations .
- In the Development section, then press Webhooks.
- In the list of webhooks, under the ID column, press the ID of the webhook that you want to edit.
- Edit the webhook, then press Save webhook.
Use this process to activate or deactivate an existing webhook.
- In the left navigation bar, press Automations .
- In the Development section, then press Webhooks.
- In the list of webhooks, under the ID column, press the ID of the webhook that you want to activate or deactivate.
- In the Status section, turn the Webhook inactive toggle on or off.
- Press Save webhook.
Use this process to test an existing webhook.
- In the left navigation bar, press Automations .
- In the Development section, press Webhooks.
- In the list of webhooks, on the right of a webhook, press Test webhook.
For more advanced configuration options, all fields support liquid templates.
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.
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.
- Month:
- Feb — use
%b
- February — use
%B
- Feb — use
- Day:
- 3 —use
%e
- 03 — use
%d
- 3 —use
- Year:
- 20 — use
%y
- 2020 — use
%Y
- 20 — use