It is possible that while creating a payment you received the error message The webhook location is invalid. This is because we can immediately tell that we will be unable to reach the webhook you stated.

You must always look at the webhookUrl from Mollie's perspective: can Mollie reach the URL? This implies that some valid URLs will nevertheless be refused by Mollie.

The webhook is an essential component of the Mollie payments API. A reporting URL must always be reachable for the Mollie Servers. A webhook such as http://localhost/report might be valid on your computer but cannot be called by Mollie. It would, after all, refer back to the server itself. The same applies for URLs without a .tid or with tlds such as .local of .dev.

For reporting, therefore, always use a URL that is reachable for the Mollie servers. The same applies to test payments, so you are able to properly test that your webhook properly updates the payment's status in your backend, and that you won't get any unpleasant surprises when you are switching over to your production environment.

You can also use a service such as ngrok. It allows you to create a tunnel from a public host to your local host to facilitate the process of testing and implementation.

Was this article helpful?