Prerequisites
Before you start:- A local web server running on a known port (e.g., Express.js on port 3000)
- An ngrok account — the free tier is sufficient
- A webhook endpoint in your application that accepts POST requests
Set up your local server
If you don’t have a webhook endpoint yet, here’s a minimal example:Expose your local server with ngrok
1
Install ngrok
Follow the ngrok installation guide for your operating system.
2
Start your local server
Make sure your application is running. For the example above:
3
Start the ngrok tunnel
Run ngrok against the port your server is listening on:ngrok displays a public URL in the terminal output — for example:Use the
https:// URL. Do not use the http:// URL — Lumin requires HTTPS.4
Configure the webhook URL in Lumin
- Go to Settings → Developer settings → API Key tab → Account callback section.
- Enter your full ngrok URL including your endpoint path — for example,
https://abc123.ngrok-free.app/webhook. - Click Save.
5
Trigger a test event
Perform an action in Lumin that fires an event — for example, create a signature request to trigger
signature_request_created. Watch your terminal for the incoming request.Example payload
When a webhook arrives, your console will show a payload like this:Tips for debugging
Log the raw request body. Before parsing JSON, log the raw body string — this is what Lumin signs with HMAC-SHA256 for theX-Signature header. Parsing and re-serializing can alter whitespace and break signature verification.
Check the X-Signature header. Use the verification steps in Account webhooks to confirm your signature validation logic works correctly before deploying.
Watch the ngrok inspector. ngrok provides a local web interface at http://localhost:4040 that shows each request and response in detail, including headers and body. This is useful for debugging without modifying your server code.
Important limitations with ngrok
- Always use the
https://URL, nothttp:// - The free tier has rate limits on incoming requests
- ngrok URLs are not suitable for production — deploy to a stable HTTPS endpoint before going live
Next steps
Once your local testing is working:- Deploy your webhook handler to a production server with a stable HTTPS URL.
- Update the webhook URL in Settings → Developer settings.
- Set up monitoring and alerting for failed deliveries.