APG PayAPG Paydocs

Webhooks

Get webhook delivery

GET/webhooks/{webhookId}/deliveries/{deliveryId}
Request
GEThttps://api.tst.au.apgpay.dev/webhooks/{webhookId}/deliveries/{deliveryId}
curl -X GET https://api.tst.au.apgpay.dev/webhooks/{webhookId}/deliveries/{deliveryId} \
  -H "Authorization: Bearer $API_KEY"

Return one delivery, with its attempts and what your endpoint last answered. A delivery that does not belong to this webhook is a 404, not a redirect.

Permissions

Required permission
webhookSubscriptions:query

Requires the `query` action on `webhookSubscriptions` for the supplied runtime context

Path parameters

webhookIdstring
required
deliveryIdstring
required

Responses

The response is a tagged shape: type is always "WebhookDeliveryViewAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "WebhookDeliveryViewAttributes"
webhookDeliveryIdWebhookDeliveryIdrequired

Identifier of one webhook delivery.

Example whdlv_9f2Kd8QpLzXw

webhookIdWebhookIdrequired

Identifier of a webhook subscription.

Example webhook_9f2Kd8QpLzXw

eventWebhookEventTyperequired

The event type delivered.

MerchantCreatedMerchantActivatedMerchantSuspendedMerchantAvailableBalanceUpdatedMerchantBankAccountAddedMerchantPrimaryBankAccountUpdatedPayPlanCreatedPayPlanActivatedPayPlanCompletedPayPlanInDefault
+27 more

PayInFullCreated, PayInFullAccepted, PayInFullAuthorised, PayInFullCompleted, TransactionPaid, TransactionFailed, DisputeCreated, DisputeUpdated, PayoutCreated, PayoutPending, PayoutFailed, PayoutPaid, PayoutReversed, InvoiceIssued, InvoiceDue, InvoicePaymentFailed, InvoicePaid, PaymentSourceCreated, PaymentSourceMethodUpdated, PaymentSourceDeleted, LoanCreated, LoanStatementCreated, LoanStatementIssued, LoanStatementDue, LoanStatementPaid, LoanPaymentFailed, Unknown

statusWebhookDeliveryStatusrequired
PendingPendingRetryDeliveredFailedAbandonedObservedUnknown
attemptsinteger (int32)required

How many times we have tried this delivery. Some attempts do not reach your endpoint at all, such as those made while the subscription is suspended; lastError says when that is why.

Example 1250

lastStatusCodeinteger (int32)

The HTTP status your endpoint answered with on the most recent attempt.

Example 1250

lastErrorstring

Why the most recent attempt did not succeed, when the reason was not an HTTP status, or what to do about a redirect, which is not followed: update the subscription url to its location.

lastAttemptAtstring (date-time)

When we most recently called your endpoint.

Example 2026-08-19T04:21:07Z

lastSentTostring

The url we most recently sent this to. It is read from the subscription at the moment of the call, so correcting the url and redelivering sends the same event to the new one.

lastResponseBodystring

The start of what your endpoint answered with on the most recent attempt, success included, cut at 500 bytes. Absent when that attempt got no answer or an empty one.

Who answered the most recent attempt, from the response headers that identify a server, CDN or firewall. Absent when that attempt got no answer, or an answer carrying none of them.

deliveredAtstring (date-time)

When your endpoint accepted it.

Example 2026-08-19T04:21:07Z

idempotencyKeystringrequired

The identity of this delivery, stable across retries and redeliveries. Use it to make your handler idempotent: the same key is the same event for the same subscription.

eventPublishedAtstring (date-time)required

When the event itself happened. Compare it with createdAt to see how long we took to pick the event up, and with lastAttemptAt for the whole journey.

Example 2026-08-19T04:21:07Z

createdAtstring (date-time)required

When we queued this delivery. Not when the event happened, which for a redelivery may be much earlier.

Example 2026-08-19T04:21:07Z

updatedAtstring (date-time)required

Example 2026-08-19T04:21:07Z

Example
{
  "type": "WebhookDeliveryViewAttributes",
  "webhookDeliveryId": "whdlv_9f2Kd8QpLzXw",
  "webhookId": "webhook_9f2Kd8QpLzXw",
  "event": "MerchantCreated",
  "status": "Pending",
  "attempts": 1250,
  "lastStatusCode": 1250,
  "lastError": "string",
  "lastAttemptAt": "2026-08-19T04:21:07Z",
  "lastSentTo": "string",
  "lastResponseBody": "string",
  "lastResponseHeaders": {
    "type": "WebhookResponseHeadersAttributes",
    "server": "string",
    "via": "string",
    "cfRay": "string",
    "amznRequestId": "string",
    "amznTraceId": "string",
    "requestId": "string",
    "cache": "string",
    "location": "string"
  },
  "deliveredAt": "2026-08-19T04:21:07Z",
  "idempotencyKey": "string",
  "eventPublishedAt": "2026-08-19T04:21:07Z",
  "createdAt": "2026-08-19T04:21:07Z",
  "updatedAt": "2026-08-19T04:21:07Z"
}

Error responses