Skip to main content
Webhooks let you subscribe to events in Beach Depository so your systems can react in real time — no polling required. When an event occurs (e.g., inventory received, shipment delivered), Beach Depository sends an HTTP POST to your registered URL with a signed JSON payload.

How it works

  1. Register a webhook endpoint in Settings > Webhooks or via the API
  2. Select which event types to subscribe to
  3. Store the signing secret securely — it is only shown once
  4. Beach Depository POSTs to your URL whenever a subscribed event fires

Creating a webhook

Via the dashboard

Navigate to Settings > Webhooks and click Create Webhook. Enter a name, your endpoint URL, and select the events you want to receive. After creation, copy and store the signing secret.

Via the API

Response:
The signing secret is only returned once at creation time. Store it securely — you will not be able to retrieve it again.

Event types

Payload format

All webhook payloads follow the same structure:
The data object varies by event type but always includes id and organizationId.

Signature verification

Every webhook request includes an X-PureVault-Signature header for verifying authenticity:
The signature is an HMAC-SHA256 hash of {timestamp}.{payload} using your signing secret.

Verifying in Node.js

Verifying in Python

Request headers

Each webhook delivery includes these headers: Use X-PureVault-Event-Id to deduplicate events if your endpoint receives the same delivery more than once during retries.

Retry policy

If your endpoint returns a non-2xx status code or times out (10 seconds), Beach Depository retries with exponential backoff: After 3 failed attempts, the delivery is marked as failed. You can view delivery history in the dashboard under Settings > Webhooks > View Deliveries.

Best practices

Return a 200 response as fast as possible. Process the event asynchronously (e.g., add it to a queue) rather than performing heavy work in the request handler. Beach Depository times out after 10 seconds.
Use the X-PureVault-Event-Id header to deduplicate. In rare cases, the same event may be delivered more than once during retries.
Always verify the X-PureVault-Signature header before processing a webhook. This ensures the request came from Beach Depository and was not tampered with.
Webhook URLs must use https://. The API rejects http:// URLs and bare IP addresses. Endpoints must resolve to public hostnames — private, loopback, and link-local addresses are blocked.
Check the delivery log in the dashboard periodically. If your endpoint has been failing, fix the issue and consider re-processing missed events via the API.

Testing locally

Use a tool like webhook.site or ngrok to receive webhooks during development: