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

# Webhooks

> Manage webhook endpoints

# Webhooks API

## List Webhooks

```bash theme={null}
GET /api/webhooks
```

## Create Webhook

```bash theme={null}
POST /api/webhooks
```

```json theme={null}
{
  "merchantId": "clx...",
  "url": "https://your-api.com/webhook",
  "events": ["payment_page.payment", "invoice.paid"],
  "secret": "whsec_your_signing_secret"
}
```

## Update Webhook

```bash theme={null}
PATCH /api/webhooks/:id
```

## Delete Webhook

```bash theme={null}
DELETE /api/webhooks/:id
```

## Test Webhook

```bash theme={null}
POST /api/webhooks/:id/test
```

Sends a test payload to verify your endpoint is reachable and returns the response status.

## Webhook Delivery Log

```bash theme={null}
GET /api/webhooks/:id/deliveries?page=1
```

Returns delivery history with status codes, response times, and retry counts.
