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
| Field | Type | Description |
|---|---|---|
event_id | string | Unique identifier for this event. |
event_type | string | The type of event (see Event Types). |
data | object | The event data, which varies by event type. |
created | string | ISO 8601 timestamp of when the event was created. |
Headers
Webhook requests include the following headers:
| Header | Description |
|---|---|
Content-Type | Always application/json |
X-Uprails-Signature | HMAC signature for verification |
X-Uprails-Event-Id | The event ID (same as event_id in the body) |