Test webhooks on localhost

Payment providers (Stripe, PayPal, payOS, VNPay, MoMo), Git hosts and chat bots need a public HTTPS URL to deliver webhooks. ProxVN gives your dev machine one in seconds.

Steps

  1. Run your backend locally, e.g. on port 8000 with a POST /webhook route.
  2. Open a tunnel with a fixed name so you never have to update the URL:
    $proxvn http 8000 --subdomain shop-dev
  3. Register the webhook URL in the provider's dashboard:
    https://shop-dev.proxvn.io.vn/webhook
  4. Trigger a test event — the request hits your machine with X-Forwarded-For set to the sender's real IP.

Express example

import express from "express";
const app = express();
app.use(express.json());

app.post("/webhook", (req, res) => {
  console.log("payload:", req.body);
  // TODO: verify the signature as documented by your provider
  res.json({ ok: true });
});

app.listen(8000);

Tips

  • Always verify signatures (HMAC/checksum) — a tunnel URL is public.
  • Telegram needs valid HTTPS: setWebhook?url=https://bot-dev.proxvn.io.vn/tg works out of the box.
  • ProxVN never adds interstitial pages or modifies bodies, so signatures computed over the raw body stay valid.
  • Stripe CLI users: point stripe listen --forward-to at your tunnel URL to share events with teammates.