Set Up Webhooks to Receive Real-Time Charge Events
Register webhook endpoints, verify HMAC signatures, handle event payloads, and monitor delivery history for Dynamo CSMS real-time notifications.
Dynamo CSMS sends webhook events to URLs you register whenever something significant happens — a session starts, a charge point goes offline, or commissioning completes. This guide shows you how to set up endpoints, verify incoming payloads, and troubleshoot failed deliveries.
Create an endpoint by providing the URL that should receive events, the list of event types you want to subscribe to, and a secret used to sign payloads.
Generate your secret using a cryptographically secure random generator (e.g., openssl rand -hex 32). Store it securely — you’ll need it to verify every incoming payload.
Every event payload shares a common envelope with an event type, a unique id, a timestamp, and an object containing the relevant data.Example session.started payload:
Dynamo signs every request with an HMAC-SHA256 signature derived from the raw request body and your endpoint secret. Always verify the signature before processing a payload.The signature is sent in the X-Dynamo-Signature header as sha256=<hex_digest>.
require 'openssl'def verify_signature(raw_body, signature_header, secret) digest = OpenSSL::HMAC.hexdigest('SHA256', secret, raw_body) expected = "sha256=#{digest}" ActiveSupport::SecurityUtils.secure_compare(expected, signature_header)end# Rails exampledef webhook sig = request.headers['X-Dynamo-Signature'] unless verify_signature(request.raw_post, sig, ENV['WEBHOOK_SECRET']) return head :unauthorized end event = JSON.parse(request.raw_post) Rails.logger.info "Received event: #{event['event']}" head :okend
Always read the raw request body bytes before parsing JSON. Many frameworks reformat the body during parsing, which will cause signature verification to fail.
If your endpoint returns a non-2xx HTTP status code or times out (30 second limit), Dynamo retries the delivery with exponential backoff:
Attempt
Delay
1st retry
5 seconds
2nd retry
30 seconds
3rd retry
5 minutes
4th retry
30 minutes
5th retry
2 hours
After 5 failed attempts, the delivery is marked as failed and no further retries occur. You can manually replay failed deliveries from the dashboard or using the deliveries API.