Get webhook delivery
/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
webhookSubscriptions:queryRequires the `query` action on `webhookSubscriptions` for the supplied runtime context
Path parameters
webhookIdstringdeliveryIdstringResponses
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.
typetype = "WebhookDeliveryViewAttributes"webhookDeliveryIdWebhookDeliveryIdrequiredIdentifier of one webhook delivery.
Example whdlv_9f2Kd8QpLzXw
webhookIdWebhookIdrequiredIdentifier of a webhook subscription.
Example webhook_9f2Kd8QpLzXw
eventWebhookEventTyperequiredThe event type delivered.
MerchantCreatedMerchantActivatedMerchantSuspendedMerchantAvailableBalanceUpdatedMerchantBankAccountAddedMerchantPrimaryBankAccountUpdatedPayPlanCreatedPayPlanActivatedPayPlanCompletedPayPlanInDefault+27 moreShow fewer
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
statusWebhookDeliveryStatusrequiredPendingPendingRetryDeliveredFailedAbandonedObservedUnknownattemptsinteger (int32)requiredHow 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
lastErrorstringWhy 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
lastSentTostringThe 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.
lastResponseBodystringThe 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.
typeenumrequiredWebhookResponseHeadersAttributesserverstringviastringcfRaystringcf-ray: present when Cloudflare answered, or sits in front of your endpoint.
amznRequestIdstringx-amzn-requestid: present when an AWS service such as API Gateway answered.
amznTraceIdstringx-amzn-trace-id: present when an AWS load balancer passed the call on.
requestIdstringx-request-id.
cachestringx-cache: present when a CDN answered.
locationstringWhere a redirect pointed. We do not follow redirects, so this is the url to subscribe instead.
deliveredAtstring (date-time)When your endpoint accepted it.
Example 2026-08-19T04:21:07Z
idempotencyKeystringrequiredThe 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)requiredWhen 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)requiredWhen 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)requiredExample 2026-08-19T04:21:07Z
{
"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
statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}