Set up your first webhook endpoint and receive a test delivery in four steps.
Step 1: Create an Endpoint #
- Go to DDLS > Webhooks > Endpoints
- Click Add New Endpoint
- Fill in:
– Name: A label for this endpoint (e.g., “My Integration Server”)
– URL: Your HTTPS endpoint URL (e.g., https://your-server.com/webhook-receiver)
- Click Save
- Copy the signing secret displayed on the confirmation screen — it is shown only once
Step 2: Subscribe to Events #
- In the endpoint edit form, scroll to Event Subscriptions
- Check the events you want to receive (e.g.,
license.created,payment.received) - Save the endpoint
Step 3: Send a Test Delivery #
- Go to DDLS > Webhooks > Endpoints
- Click Send Test next to your endpoint
- A synchronous test payload is delivered immediately
- Check the result status on screen
Step 4: Verify the Signature #
On your receiving server, verify the X-DMSI-Signature header:
$raw_body = file_get_contents('php://input');
$timestamp = $_SERVER['HTTP_X_DMSI_TIMESTAMP'] ?? '';
$webhook_id = $_SERVER['HTTP_X_DMSI_WEBHOOK_ID'] ?? '';
$signature = $_SERVER['HTTP_X_DMSI_SIGNATURE'] ?? '';
$secret = 'your_signing_secret_here';
$string_to_sign = $timestamp . '.' . $webhook_id . '.' . $raw_body;
$expected = 'sha256=' . hash_hmac('sha256', $string_to_sign, $secret);
if (!hash_equals($expected, $signature)) {
http_response_code(401);
exit('Invalid signature');
}
// Process the payload
$payload = json_decode($raw_body, true);
Related Topics #
- Endpoint Settings
- Signature Verification
- Event Types Overview
