Deploy Webhook Listeners
Write your handler. Deploy it. Get a secure HTTPS URL. That's it.
Perfect For
GitHub Events
Trigger builds, run tests, or deploy on every push
Payment Events
Handle Stripe, PayPal, or payment webhooks instantly
Third-party Integrations
Connect with Slack, Twilio, SendGrid, whatever
Event-driven Workflows
React to any external event in real-time
How It Works
-
1
Write your handler
Create an HTTP endpoint that processes webhook payloads.
-
2
Deploy to Tokay
git push tokaywe give you a secure HTTPS URL automatically. -
3
Configure the webhook
Paste your Tokay URL into GitHub, Stripe, or your favorite service.
-
4
Receive events
Webhooks hit your endpoint. Logs show up in the dashboard.
Just Write Your Handler
Focus on processing the events. We handle HTTPS, scaling, and uptime.
GitHub Webhook (Node.js)
const express = require('express');
const crypto = require('crypto');
const app = express();
app.use(express.json());
app.post('/webhook/github', (req, res) => {
// Verify the webhook is from GitHub
const signature = req.headers['x-hub-signature-256'];
const hmac = crypto.createHmac('sha256', process.env.GITHUB_SECRET);
const digest = 'sha256=' + hmac.update(JSON.stringify(req.body)).digest('hex');
if (signature !== digest) {
return res.status(401).send('Invalid signature');
}
const event = req.headers['x-github-event'];
if (event === 'push') {
console.log(`Push to ${req.body.repository.name}`);
// Trigger your release, deploy, etc.
}
res.status(200).send('OK');
});
app.listen(process.env.PORT || 3000);
Stripe Webhook (Python)
from flask import Flask, request
import stripe
import os
app = Flask(__name__)
stripe.api_key = os.environ['STRIPE_API_KEY']
@app.route('/webhook/stripe', methods=['POST'])
def stripe_webhook():
payload = request.data
sig = request.headers.get('Stripe-Signature')
try:
event = stripe.Webhook.construct_event(
payload, sig, os.environ['STRIPE_WEBHOOK_SECRET']
)
except:
return {'error': 'Invalid signature'}, 400
if event['type'] == 'payment_intent.succeeded':
payment = event['data']['object']
print(f"Payment succeeded: {payment['id']}")
# Fulfill order, send confirmation, etc.
return {'status': 'success'}, 200
if __name__ == '__main__':
app.run(host='0.0.0.0', port=int(os.getenv('PORT', 5000)))
Generic Webhook (Go)
package main
import (
"encoding/json"
"io"
"log"
"net/http"
"os"
)
func webhookHandler(w http.ResponseWriter, r *http.Request) {
if r.Method != "POST" {
http.Error(w, "Method not allowed", 405)
return
}
body, _ := io.ReadAll(r.Body)
var data map[string]interface{}
json.Unmarshal(body, &data)
log.Printf("Webhook received: %+v", data)
// Process your webhook data here
w.WriteHeader(200)
w.Write([]byte("OK"))
}
func main() {
http.HandleFunc("/webhook", webhookHandler)
port := os.Getenv("PORT")
if port == "" {
port = "8080"
}
log.Printf("Listening on port %s", port)
http.ListenAndServe(":"+port, nil)
}
Deploy this and you get a URL like https://your-app.tokay.app/webhook. Paste it into the webhook config and you're live.
Security Tips
Always verify signatures
Most providers include a signature header. Verify it before processing payloads to ensure requests are authentic.
Store secrets safely
Keep webhook secrets in environment variables. Set them in the dashboard, not in your code.
What We Handle For You
Automatic HTTPS
Every webhook URL is HTTPS by default. SSL certificates are automatic and always renewed.
High Availability
Your webhooks are always online. We handle restarts, scaling, and health checks automatically.
Request Logging
See every webhook request in your dashboard. Debug issues without SSH-ing into servers.
Zero Config Deployment
No nginx configs, no load balancers, no reverse proxies. Just push your code and get a URL.
Just the handler. No server.
Write your endpoint. We give you a secure HTTPS URL. That's the deal.