Webhook Payload Structure

Complete guide to webhooks, debugging, and real-time event monitoring with HookMetry

Webhook Payload Structure

A webhook payload is the data sent in the HTTP POST request. It typically contains information about the event that occurred.

Anatomy of a Webhook Request

HTTP Headers

POST /webhook/ep_abc123 HTTP/1.1
Host: hookmetry.com
Content-Type: application/json
X-Webhook-Signature: sha256=abc123...
User-Agent: Stripe/1.0
Content-Length: 324

JSON Payload (Body)

{
  "id": "evt_1234567890",
  "type": "payment_intent.succeeded",
  "created": 1677721234,
  "data": {
    "object": {
      "id": "pi_abc123",
      "amount": 2000,
      "currency": "usd",
      "status": "succeeded",
      "customer": "cus_xyz789"
    }
  }
}

Common Payload Fields

idUnique identifier for the event
typeEvent type (e.g., "payment.success", "user.created")
timestampWhen the event occurred (Unix timestamp or ISO 8601)
dataThe actual event data/object

Important:

Always validate incoming webhook payloads before processing. Never trust user data without verification, especially for sensitive operations like payments or account changes.

Was this page helpful?

Your feedback helps us improve the docs.