Skip to main content

How to use webhooks

To receive webhook events in your application, follow these implementation steps:

Implementation process

  1. Identify the events you want to listen for and the payloads to parse
  2. Create a webhook endpoint as an HTTP endpoint on your local server
  3. Handle incoming requests by parsing the payloads and returning a 200 response status code
  4. Define the webhook in Mambo using your local HTTP endpoint URL
  5. Test that your webhook endpoint is receiving events properly
  6. Deploy your webhook endpoint so that it's publicly accessible
  7. Update the webhook defined in Mambo using your public HTTP endpoint URL

Testing environment

When defining the webhook with your local HTTP endpoint, you can associate it to a site you create specifically for testing your webhook. By doing this you are free to create mechanics, users and activities which you can use to test your webhook endpoint without impacting a live site.

Creating a webhook endpoint

Your webhook endpoint should be an HTTP server that can:

  • Accept POST requests
  • Parse JSON payloads
  • Verify webhook signatures (see the security section)
  • Process events based on the event field
  • Return a 200 status code to acknowledge receipt

Defining webhooks in Mambo

To set up a webhook in Mambo:

  1. Navigate to the Webhooks section in your Mambo dashboard
  2. Click "Create Webhook"
  3. Enter your endpoint URL
  4. Select the events you want to receive
  5. Configure any additional settings
  6. Save your webhook configuration