← Back to Docs

Webhook Development

Test payment gateways, OAuth callbacks, and third-party integrations on your local machine.

The Problem

Services like Stripe, GitHub, Twilio, and Slack send webhook events to a public URL. During development, your local server isn't accessible from the internet, making webhook testing difficult.

Solution with ExposeHost

ExposeHost creates a public URL that forwards requests to your local development server. Third-party services can send webhooks to this URL, and you receive them locally.

Step-by-Step Guide

1. Start your local webhook handler

Run your application that handles webhooks. For example, a Flask server:

# app.py
from flask import Flask, request

app = Flask(__name__)

@app.route('/webhook', methods=['POST'])
def webhook():
    data = request.json
    print(f"Received webhook: {data}")
    return {'status': 'ok'}

if __name__ == '__main__':
    app.run(port=5000)
python app.py

2. Start ExposeHost client

python client_cli.py
Port to forward: 5000
Subdomain: mywebhooks

You'll receive a public URL like https://mywebhooks.ExposeHost.me

3. Configure your webhook provider

Use the ExposeHost URL in your webhook settings:

Set the webhook URL to: https://mywebhooks.ExposeHost.me/webhook

4. Test the integration

Trigger an event (e.g., make a test payment in Stripe) and watch the webhook arrive at your local server.

Tips