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

# List Deliveries

> Retrieve a paginated list of webhook delivery attempts with their status

## Authentication

This endpoint requires a **Bearer token** in the `Authorization` header.

```
Authorization: Bearer <your_jwt_token>
```

## Query Parameters

<ParamField query="page" type="integer" default="1">
  The page number for pagination.
</ParamField>

<ParamField query="limit" type="integer" default="20">
  The number of deliveries per page. Maximum value is `100`.
</ParamField>

<ParamField query="status" type="string">
  Filter by delivery status. Accepted values: `success`, `failed`, `pending`.
</ParamField>

## Response

<ResponseField name="deliveries" type="array">
  An array of webhook delivery objects.

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

    <ResponseField name="event" type="string">
      The event type that triggered the webhook (e.g., `payment.completed`).
    </ResponseField>

    <ResponseField name="url" type="string">
      The webhook URL the event was sent to.
    </ResponseField>

    <ResponseField name="status" type="string">
      Delivery status: `success`, `failed`, or `pending`.
    </ResponseField>

    <ResponseField name="statusCode" type="integer">
      The HTTP status code returned by the endpoint, or `null` if delivery failed.
    </ResponseField>

    <ResponseField name="responseTime" type="integer">
      Response time in milliseconds.
    </ResponseField>

    <ResponseField name="attempts" type="integer">
      The number of delivery attempts made.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp of when the delivery was initiated.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination metadata.

  <Expandable title="pagination fields">
    <ResponseField name="page" type="integer">
      Current page number.
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Number of items per page.
    </ResponseField>

    <ResponseField name="total" type="integer">
      Total number of delivery records.
    </ResponseField>

    <ResponseField name="totalPages" type="integer">
      Total number of pages.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://olp-api.nipuntheekshana.com/v1/webhooks/deliveries?page=1&limit=10" \
    -H "Authorization: Bearer <your_jwt_token>"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "deliveries": [
      {
        "id": "del_abc123def456",
        "event": "payment.completed",
        "url": "https://yoursite.com/webhooks/openpay",
        "status": "success",
        "statusCode": 200,
        "responseTime": 87,
        "attempts": 1,
        "createdAt": "2026-03-26T14:55:12Z"
      },
      {
        "id": "del_xyz789ghi012",
        "event": "payment.expired",
        "url": "https://yoursite.com/webhooks/openpay",
        "status": "failed",
        "statusCode": 500,
        "responseTime": 3021,
        "attempts": 3,
        "createdAt": "2026-03-25T18:30:00Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 10,
      "total": 34,
      "totalPages": 4
    }
  }
  ```
</ResponseExample>
