Skip to main content

Webhooks overview

When a payment hits CONFIRMED, HelaMesh sends a signed HTTP POST to the webhook URL on your client. Your backend should:

  1. Verify the signature
  2. Look up the invoice by ID in your own database
  3. Mark the order as paid
  4. Return 200 OK within 10 seconds

If you return any non-2xx status (or time out), HelaMesh retries with exponential backoff.

The big pictureโ€‹

Chain confirms payment
โ”‚
โ–ผ
HelaMesh poller detects โ†’ marks invoice CONFIRMED
โ”‚
โ–ผ
Webhook enqueued โ†’ dispatcher claims โ†’ POST to your URL
โ”‚ โ†‘ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€ retry โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ (on non-2xx) โ”‚
โ–ผ โ–ผ
Invoice stays CONFIRMED Your backend verifies
until 2xx received signature + updates DB
โ”‚ โ”‚
โ””โ”€โ”€โ”€โ”€ 2xx received โ”€โ”€โ†’ COMPLETED โ—„โ”€โ”€โ”€โ”€โ”˜

Key principle: CONFIRMED โ†’ COMPLETED is gated on successful webhook delivery. An invoice stays CONFIRMED until your backend ack's the webhook. This ensures your backend and HelaMesh agree on the payment status.

Read next: Webhook payload, Verifying signatures, Retries.