'The webhook URL is invalid: 'localhost' cannot be used while using NGROK

Currently building a custom Wordpress Woocommerce theme locally with MAMP and Mollie as provider. Unfortunately I do get an error when I use Mollie in testmodus during checkout.

The error:

[2022-03-17T20:59:04+0000] Error executing API call (422: Unprocessable Entity): The webhook URL is invalid: 'localhost' cannot be used as it is unreachable from Mollie's point of view.. Documentation: https://docs.mollie.com/overview/handling-errors. Request body: {"status":422,"title":"Unprocessable Entity","detail":"The webhook URL is invalid: 'localhost' cannot be used as it is unreachable from Mollie's point of view.","field":"webhookUrl","_links":{"documentation":{"href":"https://docs.mollie.com/overview/handling-errors","type":"text/html"}}}. Field: webhookUrl

I'm already using NGROK to make the website available over the internet. I even tested if I can reach it on a different domain. So it looks like NGROK itself is working as expected. Unfortunately I still get the error from Mollie.

I use the following line to start ngrok: ngrok http 8888 -host-header=rewrite

Am I missing something? I can remember I used ngrok with mollie before without a problem.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source