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

# Fetch a Webhook With ID

> Fetch and view the details of a specific webhook id using Razorpay Curlec APIs.

Available in
🇮🇳 India
🇲🇾 Malaysia
🇺🇸 United States

Use this endpoint to retrieve and view the details of a webhook. Know about the various error responses for this API.

```bash Curl theme={null}
curl -X GET https://api.razorpay.com/v2/accounts/acc_H3kYHQ635sBwXG/webhooks/HK890egfiItP3H \
-u <ACCESS_TOKEN> \
```

```java Java theme={null}
RazorpayClient razorpay = new RazorpayClient("[ACCESS_TOKEN]");

String accountId = "acc_GP4lfNA0iIMn5B";

String webhookId = "HK890egfiItP3H";

Webhook webhook = instance.webhook.fetch(accountId, webhookId);
```

```ruby Ruby theme={null}
require "razorpay"
Razorpay.setup('ACCESS_TOKEN')
accountId = "acc_GP4lfNA0iIMn5B";

webhookId = "HK890egfiItP3H";

Razorpay::Webhook.fetch(webhookId, accountId);
```

```csharp .NET theme={null}
RazorpayClient client = new RazorpayClient("[ACCESS_TOKEN]");

string accountId = "acc_ua2tBezhcEBvap";

string webhookId = "HK890egfiItP3H";

Webhook webhook = client.Webhook.Fetch(webhookId, accountId);
```

```json Success theme={null}
{
  "id": "HK890egfiItP3H",
  "created_at": 1623060358,
  "updated_at": 1623060358,
  "owner_id": "H3kYHQ635sBwXG",
  "owner_type": "merchant",
  "context": [],
  "disabled_at": 0,
  "url": "https://en1mwkqo5ioct.x.pipedream.net",
  "alert_email": "gaurav.kumar@example.com",
  "secret_exists": true,
  "entity": "webhook",
  "active": true,
  "events": [
    "payment.authorized",
    "payment.failed",
    "payment.captured",
    "payment.dispute.created",
    "refund.failed",
    "refund.created"
  ]
}
```

## Path Parameters

**account\_id** `string` *required*

The unique identifier of a sub-merchant account generated by Razorpay Curlec for which a webhook is created. For example, `acc_H3kYHQ635sBwXG`.

**webhook\_id** `string` *required*

The unique identifier of the webhook whose details are to be retrieved. For example, `HK890egfiItP3H`.

## Response Parameters

**id** `string`

The unique identifier of the created webhook. For example, `HK890egfiItP3H`. This id is used to fetch, update or delete a webhook. The maximum length is 14 characters.

**created\_at** `integer`

The Unix timestamp at which the webhook has been created.

**updated\_at** `integer`

The Unix timestamp at which the webhook has been updated.

**owner\_id** `string`

The unique identifier generated by Razorpay Curlec for the sub-merchant who will receive the webhooks. For example, in this case, it will be `account_id` passed in the API URL.

**owner\_type** `string`

Indicates the type of owner. For example, in this case, it will be the merchant.

**url** `string`

The URL where you receive the webhook payload when an event is triggered. The maximum length is 255 characters.

**secret** `string`

A secret for the webhook endpoint used to validate that the webhook is from Razorpay Curlec.

**alert\_email** `string`

This is the email address to which notifications must be sent in case of webhook failure.

**secret\_exists** `boolean`

This attribute is set to `true` if a secret password has been set for the webhook endpoint. If no secret is sent in the request, this parameter does not appear in the response code.

**entity** `string`

Indicates the type of entity. For example, in this case, it will be **webhook**.

**active** `string`

Indicates the status of webhook.

* `true`: Webhook is activated.
* `false`: Webhook is deactivated.

**events** `object`

The required events from the list of Active Events. For example, `payment.authorized`, `payment.captured`, `payment.failed`, `payment.dispute.created`, `refund.failed`, `refund.created` and so on.
