Skip to main content

Listen to webhooks

This guide explains how to listen to webhooks from Melio. Webhooks are a powerful way to receive real-time notifications about events that occur in your Melio account, such as payment status changes or new overdue bills. For a complete list of available webhook events and their payload structures, see our Webhook Events Reference.

Overview

Webhooks are HTTP callbacks that Melio sends to your server when certain events occur. They allow you to receive real-time updates without having to poll the Melio API continuously. This is particularly useful for events that may take time to process, such as payment approvals or status changes.

Setting Up Webhooks

To set up webhooks, follow these steps:

  1. Create a Webhook Endpoint: Set up an endpoint on your server that can receive HTTP POST requests. This endpoint will handle the incoming webhook notifications from Melio.
  2. Register your Webhook Endpoint: Go to your Melio developer portal and register your webhook endpoint. You will need to specify the URL of your endpoint and the events you want to listen to.
  3. Handle Incoming Webhooks: Implement the logic in your webhook endpoint to process the incoming webhook notifications. This typically involves parsing the JSON payload and taking appropriate actions based on the event type.

Step 1: Create a Webhook Endpoint

Melio will send webhook notifications to your endpoint as HTTP POST requests with JSON payloads containing event data, timestamps, and other relevant information. For a complete list of available webhook events and their payload structures, see our Webhook Events Reference.

Your webhook endpoint must use HTTPS with TLS 1.2 or 1.3 to ensure secure communication with Melio's servers.

For security reasons, you should implement signature verification to ensure webhooks are coming from Melio. See our Verifying Webhook Signatures guide for details.

Once your endpoint is implemented and deployed, proceed to Step 2 to register it with Melio.

Step 2: Register your Webhook Endpoint

After creating your webhook endpoint, you need to register it with Melio to start receiving event notifications:

  1. Navigate to the webhook section in your Melio developer portal
  2. Enter your HTTPS endpoint URL
  3. Save your configuration
  4. Click the "Send Test Event" button to verify your endpoint is properly configured

When you send a test event, Melio will deliver a sample payload to your endpoint. Your endpoint should return a 2xx HTTP status code to confirm successful receipt. If the test fails, verify your endpoint is accessible and properly handling the incoming requests before proceeding.