> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/umbraco-commerce/19.latest/add-ons/payment-providers/mollie/how-to-guides/testing-mollie-webhooks-locally.md).

# How to test Mollie webhooks locally

This guide will take you through setting up and testing local tests of Mollie Webhooks.

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:

1. Make your local server accessible online temporarily.
2. Use the generated public URL in Mollie’s webhook settings.
3. 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:

1. [Ngrok](https://ngrok.com/?utm_source=docs.umbraco.com) 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.
2. [Beeceptor’s Local Tunnel](https://beeceptor.com/local-tunnel/?utm_source=docs.umbraco.com) 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 [ngrok](https://ngrok.com/?utm_source=docs.umbraco.com) to create temporary tunnels through your network.

## Step 1: Install ngrok

1. Head on over to [ngrok.com](https://ngrok.com/?utm_source=docs.umbraco.com).
2. Download and install the tool on your system.

## Step 2: Launch ngrok

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.

1. Open NotePad.
2. Type the following:

```
C:\PROGRA~1\ngrok\ngrok.exe http -host-header=rewrite localhost:61191
```

3. Swap the local domain/port number at the end according to the configuration of your site.
4. 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.

![The ngrok UI.](https://2409119974-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEdvaI4snnScVtHtHU8uH%2Fuploads%2Fgit-blob-5b471cfbf042bd2ff37c643f43b3a836a7656780%2Fngrok%20\(1\).png?alt=media)

{% hint style="info" %}
When you launch ngrok for the first time, it will ask you to sign in. Enter the credentials you used to sign up. It will remember them from now on.
{% endhint %}

## Step 3: Test the site

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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.umbraco.com/umbraco-commerce/19.latest/add-ons/payment-providers/mollie/how-to-guides/testing-mollie-webhooks-locally.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
