Adding Webhook for Membership Events
Webhooks notify you when an event occurs on your website. Webhooks are particularly useful for asynchronous events like when a subscriber is added to your website, a new team member is added, a subscriber updates their email or name, subscriber purchases any paid plan, etc. This article will cover more details about how Webhooks work on Dorik.
Actions to be triggered
Upon adding a webhook URL to your site, you will receive calls for the following events:
|Event Name||When will it be triggered?|
|add-member||When any new user subscribes to the free plan|
|update-member||When an existing member updates their email or name.|
|remove-member||When a user is removed from the member list|
|add-subscription||When a user purchases any paid plan|
|update-subscription||When any paid member downgrades to a free plan or changes from annually to monthly or vice versa|
|cancel-subscription||When a user cancels their subscription|
💡 More actions will be added in the future with upcoming updates.
💡 When a webhook URL is added, and it is not validated on the first attempt, the system will automatically retry for validation
Let us look at each event being broken down into more details, refer to the doc below to see all the events being broken down:
Webhook Events for Membership in details
Add Webhook URL
To add a Webhook URL to your site, follow the steps shown in the GIF below:
⚠️ Make sure you add an HTTP or HTTPS protocol before your URL ⬇️
To Regenerate your Secret Key:
Edit or Delete your URL:
How to Verify Secret Key
➡️ When any Webhook request is received during an event, that request’s header X-Webhook-Token will have a secret token. This allows you to verify that the events were sent by Dorik, not by any third party.
The secret value in the header code will look something like this:
💡 You can verify this token with the secret key in your site’s Dashboard.
Updated on: 14/03/2023