Skip to content

List webhook deliveries

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

Lists deliveries created within the last 30 days for an enabled or disabled subscription belonging to the authenticated partner, newest first by creation time and then delivery ID. Includes status events and test deliveries. Deliveries queued before subscription-linked history was introduced are not included. Use the returned nextCursor with the same filters to fetch the next page. Fix from and to for a consistent time window. When nextCursor is absent or null, no further page exists. See the webhook guide for status meanings and recovery steps.

id
required
string format: uuid
status

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

Optional, case-sensitive delivery status filter.

from
string format: date-time

Inclusive delivery creation time with a timezone. Defaults to 30 days ago; earlier values are limited to that window. Must be before to.

to
string format: date-time

Exclusive delivery creation time with a timezone. Defaults to now. Must be after from.

cursor
string

Opaque nextCursor returned by the previous page. Keep the same filters when continuing.

limit
integer
default: 50 >= 1 <= 100

Maximum number of deliveries in this page.

Delivery summaries and an optional continuation cursor.

Media typeapplication/json
object
deliveries
required
Array<object>
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
nextCursor

Opaque continuation cursor. Absent or null when there is no further page.

string | null
Example
{
"deliveries": [
{
"eventType": "PAYMENT_STATUS_COMPLETED",
"status": "PENDING"
}
]
}

Invalid status, timestamp, cursor, limit, or time range.

Authentication failed.

Subscription was not found for the authenticated partner.