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

# Testing Webhooks

> Test your webhook integration before going live. Send sample events from the dashboard, replay deliveries, and develop locally using ngrok or similar tunnels.

Testing your webhook integration before going live is essential for a smooth integration.

## Using the Dashboard

### Send Test Events

1. Go to your webhook endpoint in the dashboard
2. Click **Send Test Event**
3. Select the event type to test
4. Review the test payload and send

### View Webhook Logs

The dashboard shows a complete log of all webhook deliveries:

* **Status**: Success or failure
* **Response time**: How long your endpoint took to respond
* **Response code**: The HTTP status code returned
* **Payload**: The exact data sent

## Local Development

During development, your localhost isn't accessible from the internet. Here are solutions:

### Using ngrok

[ngrok](https://ngrok.com) creates a public URL that tunnels to your local server:

```bash theme={null}
# Start your local server on port 3000
npm run dev

# In another terminal, start ngrok
ngrok http 3000
```

Use the ngrok URL (e.g., `https://abc123.ngrok.io/webhooks`) as your webhook endpoint.

### Using webhook.site

[webhook.site](https://webhook.site) provides a free URL that captures all incoming requests:

1. Go to webhook.site
2. Copy your unique URL
3. Add it as a webhook endpoint in storekit
4. Trigger events and inspect the payloads

## Testing Checklist

Before going live, verify:

<Checklist>
  * [ ] Endpoint returns 2xx status within 15 seconds
  * [ ] Signature verification is implemented
  * [ ] Timestamp validation rejects old webhooks
  * [ ] Handler is idempotent (handles duplicates)
  * [ ] Errors are logged for debugging
  * [ ] CSRF protection is disabled for the endpoint
</Checklist>

## Test Mode vs Live Mode

Test webhooks in your development environment before enabling them in production:

1. Create a separate endpoint for testing
2. Use test/sandbox credentials
3. Verify everything works
4. Switch to production endpoint
