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

# Create a Webhook

Creating a new Webhook means registering a URL to receive
updates for a specific event type. Once a resource is
created or updated, your application will be notified
via an HTTPS POST request with the event information.

## Body

## Returns

Returns the newly created Webhook object.

```bash cURL theme={null}
curl https://production.methodfi.com/webhooks \
  -X POST \
  -H "Method-Version: 2026-03-30" \
  -H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "payment.update",
    "url": "https://reference.example.app/webhook",
    "auth_token": "md7UqcTSmvXCBzPORDwOkE",
    "hmac_secret": "bd7UscLSmvEXazTOQDwOKW",
    "expand_event": true
  }'
```

```javascript Node.js theme={null}
const webhook = await method.webhooks.create({
  type: 'payment.update',
  url: 'https://reference.example.app/webhook',
  auth_token: 'md7UqcTSmvXCBzPORDwOkE',
  hmac_secret: 'bd7UscLSmvEXazTOQDwOKW',
  expand_event: true
});
```

```python Python theme={null}
webhook = method.webhooks.create({
  'type': 'payment.update',
  'url': 'https://reference.example.app/webhook',
  'auth_token': 'md7UqcTSmvXCBzPORDwOkE',
  'hmac_secret': 'bd7UscLSmvEXazTOQDwOKW',
  'expand_event': true
})
```

```json theme={null}
{
  "id": "whk_cSGjA6d9N8y8R",
  "type": "payment.update",
  "url": "https://reference.example.app/webhook",
  "metadata": null,
  "expand_event": false,
  "status": "active",
  "error": null,
  "created_at": "2020-12-09T00:41:05.647Z",
  "updated_at": "2020-12-09T00:41:05.647Z"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.