Skip to Content
v1.5Official documentation for the LX CloudPos API · stable in production
v1.5 (current)WebhooksLocal webhook testing

Local webhook testing

Since the webhookUrl must be a public HTTPS URL (see configuration), it cannot point directly at localhost. The standard solution is to expose the local server through a tunnel.

With ngrok

# 1. Install ngrok brew install ngrok # macOS # 2. Expose your local server ngrok http 3000 # Output: # Forwarding https://abcd1234.ngrok.io -> http://localhost:3000 # 3. Ask the admin to update your key's webhookUrl: # https://abcd1234.ngrok.io/webhooks/lxs # 4. Issue a test invoice and watch the local logs

With Cloudflare Tunnel

A free alternative that requires no account:

cloudflared tunnel --url http://localhost:3000 # Generates a temporary *.trycloudflare.com domain

With webhook.site (inspection only)

When you only need to inspect the incoming payload and headers, without processing them:

  1. Go to https://webhook.site 
  2. Copy the unique URL assigned.
  3. Ask the administrator to configure it as the API key’s webhookUrl.
  4. Issue test documents and watch the webhooks arrive in real time.

Important: webhook.site only displays the content: it does not run the receiver’s logic or validate the signature. It is useful for inspecting the payload format, not for testing the end-to-end integration.