Event delivery behavior
Test payload
When you register a webhook, Dynamic sends a test payload to the webhook’s configured URL to verify that the endpoint exists and can receive payloads. The test payload is aping
event.
Retry behavior
Webhook messages have built-in retry logic. All non-200 response codes will result in a retry. Events are delivered at least once, but can be retried up to 5 times for live environments, make sure to handle idempotency using themessageId
attribute.
Below are the request retry intervals for live environments
- 15 seconds
- 1 minute
- 10 minutes
- 1 hour
- 1 day
Event ordering
Dynamic makes no guarantee of message ordering. Events can be sent in an order not congruent with the order in which they happened.Best Practices for implementing webhooks
Idempotency
Configured endpoints may receive the same event multiple times. This can happen for a number of reasons, including network timeouts, duplicate events, or as a result of retry logic. As such, it is important to design your endpoint to be idempotent so that it can safely handle duplicate events. Using themessageId
attribute in the event object is a good way to handle this.
Events
Only select the events you are interested in. If you are only interested inuser
events, only select those event types. This will reduce the number of messages you receive and the number of messages you need to handle.
Verify messages
Make sure to validate thex-dynamic-signature-256
header to ensure the message is coming from Dynamic. This is a hash signature value, generated from your secret token.
Security
Make sure your endpoint is using HTTPS. Dynamic will not send messages to endpoints that use HTTP.Limits
Webhooks
10 per environmentWebhook messages
After repeated failed delivery of messages within a 30 day period to a configured endpoint that responds with a non2XX
HTTP status code the webhook will be automatically disabled. For live environments this is 6 failed attempts per message up to a maximum of 1500 failed messages, and for sandbox environments this is 3 failed attempts per message up to a maximum of 250 failed messages. Note that if any of the message retries are successful it is not counted against the failure limit. The webhook will remain disabled until it is re-enabled manually.
Messages in live environments will be available for 90 days and 30 days for sandbox environments.