How to test Mollie webhooks locally
This guide will take you through setting up and testing local tests of Mollie Webhooks.
Last updated
Was this helpful?
This guide will take you through setting up and testing local tests of Mollie Webhooks.
Last updated
Was this helpful?
Mollie uses webhooks to finalize payments, but testing them locally can be challenging because Mollie requires a public-facing URL to send notifications. Local URLs like http://localhost:3000
or http://localhost:8080
are not accessible from the internet.
Solution: Use a Local Tunnel
A local tunnel is a port-forwarding technique that exposes a local API service (running on a specific port) to the internet. This is done through a public HTTPS URL. It allows you to:
Make your local server accessible online temporarily.
Use the generated public URL in Mollie’s webhook settings.
Receive webhook events directly on your local development machine.
With a local tunnel, you can test and debug Mollie webhooks without deploying your application to a live environment. Here are two popular tools to create a secure public URL for testing Mollie webhooks:
is a widely used tool that creates a secure tunnel from your local machine to a public URL. It supports advanced configurations and works well with webhook-based systems.
gives a public HTTP mock server that allows you to expose your local server to the internet securely. Supports HTTPs, mock rules and comes with request history. The Free plan includes 50 requests/day per tunnel or endpoint.
The following guide will use to create temporary tunnels through your network.
Head on over to .
Download and install the tool on your system.
You can either launch ngrok from the command line or use the steps below to create a batch file to be run at any time.
Open NotePad.
Type the following:
Swap the local domain/port number at the end according to the configuration of your site.
Save the file as ngrok.bat
at the root of your web project.
You can run the batch file at any time to launch ngrok and create a publicly accessible tunnel to your website.
With ngrok running you can test the site using the URLs displayed in the console window. The Mollie gateway will automatically be able to communicate back to your site instance.
You will see webhook requests displayed in the console window, and you can debug them using Visual Studio.