Setup
Create a Webhook Endpoint
Dashboard
Navigate to Webhooks in the dashboard to create, edit, and monitor webhook endpoints.Events
This is the whole list the API accepts —
events is validated against it, so
subscribing to anything else is rejected at creation. Fetch it at runtime with
GET /v1/webhooks/event-types (webhooks.listEventTypes() in the SDKs) rather
than hard-coding it.
Payload Format
Verification
Every delivery carries an HMAC-SHA256 signature in theX-Moneyline-Signature
header:
v1 is HMAC-SHA256 over <t>.<raw body>, keyed with the endpoint’s signing
secret. Two things matter and are easy to get wrong:
- The timestamp is part of the signed string. Signing the body alone lets
anyone who captures one delivery replay it forever, because nothing in the
signature says when it was made. Reject deliveries whose
tis outside a tolerance window — five minutes is a reasonable default. - Verify the raw bytes. The signature covers exactly what was sent, so a handler that parses the body first has discarded the only thing it can check. Re-serializing a parsed object will not verify even for a genuine delivery.
Verify in Node.js
expressMiddleware(secret) and fastifyPlugin(secret) wrap the same check.
Verify in Python
Verify in Go
examples/webhooks.
Retry Logic
Each delivery gets three attempts, retried with exponential backoff starting at 10 seconds:
A delivery fails if the endpoint returns a non-2xx status, or if the request
does not complete within a 30 second timeout. Transport failures — DNS,
refused connections, timeouts — are recorded as attempts just like HTTP errors.
After the third attempt the delivery is marked failed and no further retries
occur. The webhook itself stays active: Moneyline does not disable an endpoint
after repeated failures, so monitor deliveries yourself.
Inspect and re-send from the API:
Best Practices
- Return 2xx quickly — Process webhook payloads asynchronously
- Use idempotency — Events may be delivered more than once; use
event.idto deduplicate - Verify signatures — Always validate the
X-Moneyline-Signatureheader - Monitor delivery logs — Check the dashboard for failed deliveries