How to test webhooks on staging which requires VPN?
Problem Statement
This article explains how to test webhooks when your staging environment requires VPN access.
Solution
Chargebee APIs use dynamic IPs, so a dedicated IP cannot be provided for whitelisting. VPN-protected staging environments cannot receive webhooks directly from Chargebee.
Workaround: Use a tunneling service such as ngrok to expose your local server and receive webhooks.
Steps to Set It Up
- Download ngrok.
- Start ngrok with your local server port. For example:
./ngrok 8000(Linux). - Copy the generated public URL.
- In Chargebee, go to Settings > API and Webhooks > Webhook Settings and set this URL as your webhook endpoint.
Your local server can now receive webhooks from Chargebee.
Was this article helpful?