Skip to content

Webhook Development

Test Stripe, GitHub, Slack, and Twilio webhooks on localhost. Step-by-step setup for the most popular webhook providers using Localport tunnels.

Webhooks need a public URL. Your local server doesn't have one. Localport fixes that in about 10 seconds.

The setup

1. Start a tunnel to your webhook handler

2. Copy the HTTPS URL

3. Paste it into your webhook provider's settings

4. Trigger an event — the webhook arrives at your local server

localport http 4000 --token YOUR_TOKEN

Use the HTTPS URL (e.g., https://abc123.tunnel.localport.dev) as your webhook endpoint. Every provider below follows this same pattern.

Keep the tunnel running while configuring

Some providers (like Slack) verify the URL immediately when you save it. Make sure your tunnel is active before hitting save.

Stripe

1. Open the Stripe DashboardDevelopersWebhooks

2. Click Add endpoint

3. Paste your tunnel URL with your webhook path:

https://abc123.tunnel.localport.dev/api/webhooks/stripe

4. Select the events you want (e.g., checkout.session.completed, invoice.paid)

5. Click Add endpoint

6. Make a test payment — the webhook arrives at your local server

Stripe CLI vs Localport

Stripe has their own CLI for forwarding webhooks locally. The difference: Localport gives you a real public URL that works with any provider, not just Stripe. One tool for all your webhooks.

GitHub

1. Go to your repo → SettingsWebhooksAdd webhook

2. Payload URL: https://abc123.tunnel.localport.dev/api/webhooks/github

3. Content type: application/json

4. Select events (or choose "Send me everything")

5. Push a commit — the webhook fires to your local server

Slack

1. Go to api.slack.com → Your App → Event Subscriptions

2. Toggle Enable Events on

3. Request URL: https://abc123.tunnel.localport.dev/api/slack/events

4. Slack sends a verification challenge — your server needs to respond with the challenge value

5. Once verified, subscribe to the events you need

6. Messages and interactions now arrive at your local server

Slack URL verification

Slack immediately sends a challenge request when you enter the URL. Your server must be running and must respond with { "challenge": "..." } or the verification fails. Don't paste the URL until your server is ready.

Twilio

1. Go to the Twilio ConsolePhone Numbers

2. Select your number → MessagingA message comes inWebhook

3. URL: https://abc123.tunnel.localport.dev/api/webhooks/twilio

4. Method: HTTP POST

5. Send a text to your Twilio number — it arrives at your local server

Paddle

1. Go to Paddle → Developer ToolsNotifications

2. Add a notification destination

3. URL: https://abc123.tunnel.localport.dev/api/webhooks/paddle

4. Select the events you want

5. Save and trigger a test event

Team webhook development

Testing webhooks as a team? Use shared tunnels so everyone receives every webhook simultaneously:

# Everyone uses the same shared tunnel token
localport http 4000 --token SHARED_TOKEN

When Stripe sends a webhook, all connected developers see the full payload on their local machines.

Tips for webhook development

  • Always use the HTTPS URL — most webhook providers require it
  • Reserve a subdomain (any plan) so your webhook URL doesn't change between sessions
  • Use shared tunnels when multiple team members need to debug the same integration
  • Check provider logs if webhooks aren't arriving — most providers show delivery status and response codes

Next steps