API Docs
Webhooks
API ReferenceWebhooksPayload

Webhook Payload Structure

Understand the structure of webhook event payloads.

Payload Format

All webhook payloads are JSON-encoded and include the following fields:

{
  "event_id": "evt_1234567890abcdef",
  "event_type": "payment_intent_succeeded",
  "data": {
    "payment_id": "pay_1234567890abcdef",
    "status": "succeeded",
    "amount": 5000,
    "currency": "USD",
    "payment_method": "card",
    "customer_id": "cus_xyz789",
    "created": "2024-01-22T10:30:00Z"
  },
  "created": "2024-01-22T10:30:05Z"
}

Payload Fields

FieldTypeDescription
event_idstringUnique identifier for this event.
event_typestringThe type of event (see Event Types).
dataobjectThe event data, which varies by event type.
createdstringISO 8601 timestamp of when the event was created.

Headers

Webhook requests include the following headers:

HeaderDescription
Content-TypeAlways application/json
X-Uprails-SignatureHMAC signature for verification
X-Uprails-Event-IdThe event ID (same as event_id in the body)