Docs

Log into read the version of docs relevant to your site.

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

  1. Download ngrok.
  2. Start ngrok with your local server port. For example: ./ngrok 8000 (Linux).
  3. Copy the generated public URL.
  4. 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?