Test Webhooks
You can test webhooks to verify payloads or check if your webhook integration is working properly. Test events get triggered on a transaction done in test mode. As the payload structure remains the same in the live and test modes, you can confidently rely on your stage testing.
You can test webhooks:
There are many free webhook testing tools available online. A simple Google search for test webhooks online returns multiple sites that you can use to test webhooks. One such example is requestbin.com. Follow these steps to test webhooks:
- Open requestbin.com.
- Click Create Request Bin and log in using Google or GitHub to create a private bin. Alternatively, you can opt for a public bin.
- Copy the endpoint created for you.
- Proceed to set up webhooks, but with the following changes:
- Ensure you are using Test Mode on the Dashboard.
- Paste the endpoint you copied in the previous step, in the Website URL field.
If you have enabled the appropriate webhook event during setup, you will receive the corresponding webhook payload on your requestbin.com site.
You cannot use localhost directly to receive webhook events as webhook delivery requires a public URL. You can handle this by creating a tunnel to your localhost using tools such as ngrok or localtunnel.
You can refer to the ngrok documentation to get started. Use the URL endpoint generated by these tools in the Webhook URL during setup.
You can test your webhook integration in the staging environment before taking it live. To accommodate this, we allow users to set up webhooks in test mode.
You can configure your staging host endpoint in test mode and receive test events on the same.