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

# Inbound Webhooks

> Receive inbound webhooks from other services.

`zopio` has pre-built webhook handlers for several key services.

## Payment Events

[Payment events](/packages/payments) are handled in the `POST /webhooks/payments` route in the `api` app. This route constructs the event and then switches on the event type to determine how to process the event.

<Info>To test webhooks locally, we've configured the Stripe CLI to forward webhooks to your local server. This will start automatically when you run `pnpm dev`.</Info>

## Authentication Events

[Authentication events](/packages/authentication) are handled in the `POST /webhooks/auth` route in the `api` app.

<Tip>Make sure you enable the webhook events you need in your Clerk project settings.</Tip>

### Local Development

<Warning>Currently there's no way to easily test Clerk webhooks locally, so you'll have to test them in a staging environment. This means deploying your app to a "production" state Vercel project with development environment variables e.g. `staging-api.example.com`. Then you can add this URL to your Clerk project's webhook settings.</Warning>

## Database Events

One of the most common use cases for inbound webhooks is to notify your application when a database record is created, updated, or deleted. This allows you to react to changes asynchronously, rather than polling the database, cron jobs or other methods.

If you [migrate to Supabase](/migrations/database/supabase), they have an incredibly powerful feature called [Database Webhooks](https://supabase.com/docs/guides/database/webhooks) that helps with this.
