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

# VAULT Webhooks

> Polar webhook endpoint for VAULT service subscriptions

## Endpoint

```
POST /api/webhooks/vault
```

## Overview

Receives and processes Polar webhooks for VAULT service subscriptions. Updates user entitlements based on subscription events.

## Security

Webhook secret: `VAULT_POLAR_SECRET` environment variable

## Implementation

```typescript theme={null}
export const POST = Webhooks({
  webhookSecret: process.env.VAULT_POLAR_SECRET!,
  onPayload: async (payload) => {
    await handlePolarWebhook(payload, 'VAULT')
  },
})
```

## Supported Events

See [Webhooks Overview](/api-reference/webhooks/overview) for complete list of supported events.

## Service-Specific Behavior

When processing VAULT webhooks:

* Updates `UserServiceEntitlement` with `service: 'VAULT'`
* Links Polar customer and subscription IDs
* Updates tier and premium status
* Sends Discord notifications (if configured)

## Configuration

Set `VAULT_POLAR_SECRET` in environment variables to match Polar webhook secret.
