Skip to content

Get webhook delivery

GET
/api/webhooks/subscription/{id}/deliveries/{deliveryId}
Code sample: Shell / cURL
curl --request GET \
--url https://api.ztlpay.io/api/webhooks/subscription/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/deliveries/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

Returns a delivery summary, the original event payload as JSON, recorded attempts in attempt-number order, and accepted manual retry requests in chronological order. Available only for deliveries created within the last 30 days and associated with the specified subscription belonging to the authenticated partner. Enabled and disabled subscriptions are supported. Signing secrets and bearer tokens are never returned; errors contain safe diagnostics only.

id
required
string format: uuid
deliveryId
required
string format: uuid

Delivery ID from history or X-ZTL-Webhook-Id, distinct from the event payload’s id.

Delivery details and history.

Media typeapplication/json
object
delivery
required
object
id
required

Delivery ID, preserved across automatic and manual retries. Distinct from the event ID in the payload.

string format: uuid
eventType
required

Delivered event type, such as PAYMENT_STATUS_COMPLETED, ONBOARDING_STATUS_ACCEPTED, or webhook.test.

string
status
required

PENDING is queued for delivery or retry; IN_PROGRESS is claimed for an attempt; DELIVERED received a 2xx response; FAILED stopped after a non-retryable failure or exhausted attempts.

string
Allowed values: PENDING IN_PROGRESS DELIVERED FAILED
createdAt
required

Original delivery creation time, preserved across retries. Filters and the 30-day history window use this time.

string format: date-time
attemptCount
required

Cumulative attempts across the initial delivery cycle and all manual retry cycles. Increases when an attempt is claimed.

integer
lastAttemptAt

Start time of the latest claimed attempt, when available.

string | null format: date-time
deliveredAt

Time a successful response was recorded, when delivered. Cleared when a manual replay is accepted and set to the new completion time if replay succeeds. Earlier successful attempts remain in history.

string | null format: date-time
nextAttemptAt

Scheduled attempt time, provided only for PENDING deliveries.

string | null format: date-time
lastResponseCode

Last recorded HTTP response code, when available. After retry acceptance, still describes the previous attempt until another attempt finishes.

integer | null
lastError

Safe diagnostic from the last failed attempt, when available. After retry acceptance, remains until another attempt finishes.

string | null
payload
required

Original event as a JSON object, not an encoded JSON string. Preserved across retries; may be a payment status, onboarding status, or test event.

object
key
additional properties
any
attempts
required

Recorded attempts ordered by attemptNumber. Signing secrets and bearer tokens are not included.

Array<object>
object
attemptNumber
required

Cumulative attempt number, continuing across manual retry cycles.

integer
>= 1
startedAt
required
string format: date-time
completedAt

Completion time, when a result has been recorded.

string | null format: date-time
targetUrl
required

Endpoint used for this attempt.

string format: uri
responseCode

HTTP response code, when available.

integer | null
error

Safe diagnostic, when the attempt failed. Transport exceptions are not exposed.

string | null
retries
required

Accepted manual retry requests ordered by requestedAt, then ID. Automatic retries are represented by attempts, not entries in this array.

Array<object>
object
id
required

ID of the accepted manual retry request, distinct from the delivery and event IDs.

string format: uuid
requestedAt
required
string format: date-time
Example
{
"delivery": {
"eventType": "PAYMENT_STATUS_COMPLETED",
"status": "PENDING"
}
}

Authentication failed.

Subscription or delivery was not found for the authenticated partner, the delivery belongs to another subscription, or it is outside the 30-day window.