Skip to main content
Webhooks let Melio notify your system when something changes, so you don’t have to poll. When a subscribed event occurs, Melio sends an HTTP POST to the endpoint you registered. Each partner has a single webhook endpoint. You manage it through the /webhook resource and choose which event types it receives.

Managing your endpoint

Creating or updating

PATCH /webhook is a partial update: only the fields you send are changed.
  • url and events are required the first time (when no endpoint exists yet).
  • Sending events replaces the entire subscription list, so always include the full set you want (at least one).
  • Set isActive: false to pause deliveries without deleting the endpoint, and true to resume.
The endpoint url must be an https URL.

Event types

Delivery payload

Each delivery is a lightweight notification. It identifies the affected resource, not its full state. Treat the payload as a signal to fetch the current resource (for example GET /payments/{id}) rather than as the source of truth, so you never act on a stale snapshot. Every delivery includes these fields: Some events carry a small data object; most do not, and you should fetch the resource for its current state. Account created/deleted events include:

Verifying deliveries

Every delivery is signed so you can confirm it genuinely came from Melio and was not tampered with. The raw request body is signed with HMAC-SHA256 (hex encoded) using your API key secret, and the signature is sent in the X-Melio-Signature header. To verify, compute the HMAC over the raw request body (before any JSON parsing) and compare it to the header using a constant-time comparison:
Verify the signature against the raw request body exactly as received. Re-serializing the parsed JSON can change byte-for-byte formatting and produce a different HMAC, causing valid deliveries to fail verification. Reject any delivery whose signature does not match.

Handling deliveries reliably

  • Be idempotent. The same event may be delivered more than once. Deduplicate on messageId (also available as the X-Melio-Delivery-Id header) so you process each event only once.
  • Respond quickly with a 2xx. Acknowledge receipt fast and do heavy work asynchronously. Failed deliveries are retried.
  • Fetch current state. Because deliveries are notifications, always read the resource (GET) to get its latest state before acting, rather than trusting a possibly out-of-order payload.
  • Pause safely. Set isActive: false to stop deliveries during maintenance instead of tearing down and rebuilding your subscription.