DMSI Webhooks supports per-endpoint payload customization. You can exclude specific fields from the data object and remap field names before delivery.
Where to Configure #
Payload customization rules are set on the endpoint edit form under Payload Customization.
Excluded Fields #
Specify a comma-separated list of field names from the data object to omit from deliveries to this endpoint.
Example: Exclude customer and license_key from all payment.received payloads to a specific endpoint.
// Before customization (payment.received event):
"data": {
"order_id": 1001,
"customer": {"id": 7, "email": "customer@example.com"},
"license_key": "XXXX-XXXX-XXXX-XXXX",
"amount": "99.00",
"currency": "USD",
"payment_method": "stripe",
"received_at": "2026-03-23T12:00:00Z"
}
// After excluding customer, license_key:
"data": {
"order_id": 1001,
"amount": "99.00",
"currency": "USD",
"payment_method": "stripe",
"received_at": "2026-03-23T12:00:00Z"
}
Field Mappings (Rename) #
Specify field renames as old_name:new_name pairs. The field is renamed in the delivered payload.
Example: Rename payment_method to gateway for a legacy integration:
payment_method:gatewayRule Merging #
Customization rules can be set globally (apply to all events) or per event type. When both exist:
excluded_fields: merged (union of both lists)field_mappings: merged with event-specific rules taking precedence on key collision
Envelope Fields Are Protected #
The top-level event, webhook_id, and timestamp fields cannot be excluded or remapped through the customization interface. Only fields inside the data object are affected.
Programmatic Transforms #
For more complex transformations, use the WordPress filter dmsi_webhook_transform_payload (applied after customization rules):
add_filter('dmsi_webhook_transform_payload', function($payload, $endpoint_id, $event_name) {
// Transform only for a specific endpoint
if ($endpoint_id === 5) {
$payload['data']['transformed'] = true;
unset($payload['data']['internal_field']);
}
return $payload;
}, 10, 3);
Related Topics #
- Payload Envelope
- Developer Reference: Filters
- Event Types Overview
