Api Reference
Webhook Events
Inspect individual webhook events and retrieve the full payload that was delivered by Vatly.
The webhook event model
Webhook events let you inspect the exact payload Vatly generated for a domain event. This is the persisted event — the record returned by this endpoint. The webhook.setup verification call is a delivery-only handshake and is never persisted, so it does not appear here. For the full list of events and the live delivery envelope, see the Webhooks guide.
Properties
| Name | Type | Description |
|---|---|---|
id | string | Unique identifier for the webhook event (starts with webhook_event_). |
resource | string | The resource type. Always webhook_event. |
eventName | string | The event name, such as order.paid or refund.completed. See the Webhooks guide for the full list. |
entityType | string | The resource type the event refers to, such as order, refund, chargeback, subscription, or checkout. |
entityId | string | The ID of the related resource. |
object | object | The full resource payload as it existed when the event occurred (an Order, Chargeback, Refund, Subscription, or Checkout), keyed by its own resource field. Note object.resource can differ from entityType: chargeback events carry entityType: order but a Chargeback object. |
createdAt | string | When the event occurred (ISO 8601 format). |
testmode | boolean | Whether the event originated from a test-mode resource. |
links | object | HATEOAS links. Contains self. |
Get a webhook event
GET /v1/webhook-events/:eventId
This endpoint returns the full webhook event payload for a specific event ID.
Parameters
| Name | Type | Description |
|---|---|---|
eventId | string | The unique identifier of the webhook event. |
curl https://api.vatly.com/v1/webhook-events/webhook_event_Qk8pRtSvWm2NjLhYcZaE \
-H "Authorization: Bearer live_your_api_key_here"
$vatly = new \Vatly\API\VatlyApiClient();
$vatly->setApiKey('live_your_api_key_here');
$event = $vatly->webhookEvents->get('webhook_event_Qk8pRtSvWm2NjLhYcZaE');
{
"id": "webhook_event_Qk8pRtSvWm2NjLhYcZaE",
"resource": "webhook_event",
"eventName": "order.paid",
"entityType": "order",
"entityId": "order_Hn5xWqVfKm8RjTgYbUcP",
"createdAt": "2024-01-15T10:30:00Z",
"testmode": false,
"object": {
"id": "order_Hn5xWqVfKm8RjTgYbUcP",
"resource": "order",
"testmode": false,
"status": "paid",
"total": {
"value": "29.99",
"currency": "EUR"
},
"subtotal": {
"value": "24.79",
"currency": "EUR"
}
},
"links": {
"self": {
"href": "https://api.vatly.com/v1/webhook-events/webhook_event_Qk8pRtSvWm2NjLhYcZaE",
"type": "application/json"
}
}
}