Test API webhooks from localhost

To test the Mollie payment API on my localhost I needed a way to receive the webhook callback on my localhost. To be able to do this I needed a service to tunnel a public URL to localhost (my local machine, as opposed to a publicly accessible URL). Here are few examples of services that provide this service:

ngrok (free plan)

localtunnel (free)

pagekite

forwardhq

These types of tools give you a publicly accessible URL that forwards the request to the localhost port, which can be used for the API callback URL while testing.

2 thoughts on “Test API webhooks from localhost

  1. Hi,
    can you explain how this works using ngrok?
    More precisely, where to enter the public url from ngrok so that the Mollie callback comes in correctly.
    I suspect this must be entered in Molli/API/Resource/Base.php ?
    ANy help is appreciated.
    Thx

  2. Hi Marco.,
    It is pretty straight forward. Just checkout the Ngrok homepage for instructions how to setup. I never used PHP to do the integration, so not much help there. It has also been a while since I did the integration, so not much help hoe to do it. Sorry mate.
    Kind regards, nidkil

Leave a comment