Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated webhook docs for clarity #6683

Merged
merged 5 commits into from
Jan 6, 2025
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,28 @@ description: >-
Webhooks.
---

# How to test Mollie webhooks locally
# How to Test Mollie Webhooks Locally

The Mollie payment provider uses webhooks to finalize payments. Due to this, it can be tricky to test payments locally as Mollie must have a public-facing URL to be able to notify you.
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.

You could expose your website through your network's firewall or use tools that to create temporary tunnels through your network.
**Solution: Use a Local Tunnel**

The following guide will use [ngrok](https://ngrok.com/) to create temporary tunnels through your network.
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.
Copy link
Contributor

@umbracotrd umbracotrd Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sofietoft: Beeceptor's free plan allows only 50 requests per day which is next to nothing in term of testing. I think it's up to you to decide whether you want to keep it in our docs or not.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arti-bol - What do you say about adding a little note/warning mentioning this limitation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sofietoft : i have added a note about the free plan limitation. I hope this is good to merge now.


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/).
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
Expand Down
Loading