Webhooks
Verify signed webhook events and process each delivery safely.
At a glance
ELA webhooks are signed with X-ELA-Signature and retried. Verify signatures before side effects and store webhook IDs so duplicate deliveries are harmless.
Headers
| Header | Value | Use |
|---|---|---|
| X-ELA-Webhook-Id | Unique webhook delivery identifier. | Store it before processing side effects. |
| X-ELA-Webhook-Event | Event type such as booking.delivered. | Use it to route handlers. |
| X-ELA-Signature | t=<unix-seconds>,v1=<hex-hmac> | Verify it before trusting the payload. |
Webhook Verification
Verify HMAC SHA-256 over {timestamp}.{rawBody} with the webhook signing secret and reject stale timestamps.
const signedPayload = `${timestamp}.${rawBody}`;const expected = hmacSha256(webhookSecret, signedPayload); if (signature.v1 !== expected) { throw new Error("Invalid ELA webhook signature");}Events
booking.createdbooking.updatedbooking.cancelledbooking.status_changedbooking.deliveredpayment.processingpayment.succeededpayment.failedpayment.pending_verificationcredit.acceptedquote_request.quotedquote_request.expiredquote_request.declinedhaulage.quotation.acceptedhaulage.trip.assignedhaulage.trip.updatedsupport_case.createdsupport_case.updatedsupport_case.resolvedsupport_case.closedWebhook Retries
Return a
2xxresponse only after durable processing or durable enqueue.Persist
X-ELA-Webhook-Idbefore side effects so duplicate deliveries are harmless.Expect exponential backoff after non-
2xxresponses, timeouts, or connection failures.