> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orafi.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook Deliveries

> Monitor delivery attempts, inspect payloads, and debug webhook failures.

## The delivery object

A webhook delivery represents a single attempt to send an event payload to your registered endpoint. Each delivery tracks the payload, status, and retry information.

<ResponseField name="id" type="string">
  Unique identifier for the delivery attempt.
</ResponseField>

<ResponseField name="webhookId" type="string">
  Webhook configuration that triggered this delivery.
</ResponseField>

<ResponseField name="event" type="string">
  Event type that caused the delivery (e.g. `payment.success`).
</ResponseField>

<ResponseField name="transactionId" type="string">
  Transaction associated with this webhook event.
</ResponseField>

<ResponseField name="payload" type="object">
  The exact JSON payload sent to your endpoint. Stored for debugging and replay.
</ResponseField>

<ResponseField name="status" type="string">
  Delivery status. One of `PENDING`, `COMPLETED`, or `FAILED`.
</ResponseField>

<ResponseField name="attemptCount" type="number">
  Number of delivery attempts made.
</ResponseField>

<ResponseField name="responseStatus" type="string">
  HTTP status code returned by your endpoint (e.g. `200`, `500`, `timeout`). Null if no response received.
</ResponseField>

<ResponseField name="nextRetryAt" type="datetime">
  Scheduled time for the next retry, if the delivery failed. Null on success.
</ResponseField>

<ResponseField name="createdAt" type="datetime">
  When the delivery record was created.
</ResponseField>

<ResponseField name="lastAttemptAt" type="datetime">
  Timestamp of the most recent delivery attempt.
</ResponseField>

<ResponseExample>
  ```json The delivery object theme={null}
  {
    "id": "811f4c9e-d818-4e07-bfbc-fb0aa73ab82f",
    "webhookId": "cmjh39i5x0000v814e7owtybc",
    "event": "payment.failed",
    "transactionId": "cmjfu1cjv0003v8vsmmxgjk05",
    "payload": {
      "event": "payment.failed",
      "data": {
        "transactionId": "cmjfu1cjv0003v8vsmmxgjk05",
        "amount": 4000,
        "currency": "NGN",
        "status": "failed"
      }
    },
    "status": "COMPLETED",
    "attemptCount": 2,
    "responseStatus": "200",
    "nextRetryAt": null,
    "createdAt": "2025-12-24T10:42:37.231Z",
    "lastAttemptAt": "2025-12-24T10:43:40.347Z"
  }
  ```
</ResponseExample>

***

## List deliveries

<div className="api-method-box">
  <span className="api-method get">GET</span> `/webhook/deliveries`
</div>

Returns webhook delivery history for the authenticated profile. Use query parameters to filter by status, event type, transaction, or date range.

### Query parameters

<ParamField query="status" type="string">
  Filter by delivery status. One of `PENDING`, `COMPLETED`, `FAILED`.
</ParamField>

<ParamField query="transactionId" type="string">
  Filter deliveries for a specific transaction.
</ParamField>

<ParamField query="event" type="string">
  Filter by event type. e.g. `payment.success`, `payment.failed`.
</ParamField>

<ParamField query="date" type="string">
  JSON-encoded date range filter. Example: `{"startDate":"2024-01-01","endDate":"2024-01-31"}`. Partial ranges (start only or end only) are supported.
</ParamField>

<ResponseExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.orafi.app/webhook/deliveries?status=FAILED&event=payment.failed" \
    -H "x-api-key: ora_test_your_api_key"
  ```

  ```javascript Node.js theme={null}
  const params = new URLSearchParams({
    status: "FAILED",
    event: "payment.failed"
  });

  const response = await fetch(
    `https://api.orafi.app/webhook/deliveries?${params}`,
    { headers: { "x-api-key": "ora_test_your_api_key" } }
  );
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.orafi.app/webhook/deliveries",
      headers={"x-api-key": "ora_test_your_api_key"},
      params={"status": "FAILED", "event": "payment.failed"}
  )
  ```

  ```json 200 theme={null}
  {
    "success": true,
    "message": "Webhook deliveries retrieved successfully!",
    "data": [
      {
        "id": "811f4c9e-d818-4e07-bfbc-fb0aa73ab82f",
        "webhookId": "cmjh39i5x0000v814e7owtybc",
        "event": "payment.failed",
        "transactionId": "cmjfu1cjv0003v8vsmmxgjk05",
        "payload": {
          "event": "payment.failed",
          "data": {
            "transactionId": "cmjfu1cjv0003v8vsmmxgjk05",
            "amount": 4000,
            "currency": "NGN",
            "status": "failed",
            "occuredAt": "2025-12-24T10:42:36.842Z"
          }
        },
        "status": "COMPLETED",
        "attemptCount": 2,
        "responseStatus": "200",
        "nextRetryAt": null,
        "createdAt": "2025-12-24T10:42:37.231Z",
        "lastAttemptAt": "2025-12-24T10:43:40.347Z"
      }
    ]
  }
  ```
</ResponseExample>
