# Webhooks

Create, list, patch, delete, and retrieve webhook endpoints, manage secret keys, and receive events when customer or
invoice records change.
Webhook events are channel-level or account-level, depending on the entity that triggers them. Channel-level events
come from entities that belong to one channel, such as invoices (`INVOICE_CREATED`). Account-level events come from
entities that all your channels share, such as customers and payment instruments (`CUSTOMER_CREATED`,
`PAYMENT_INSTRUMENT_CREATED`).
Use `included_channel_ids` or `excluded_channel_ids` to filter channel-level events. Use `is_account_events_enabled`
to receive account-level events on a webhook with a channel filter.
**Account-level events by domain**
| Domain | Example event |
|  --- | --- |
| [Customers](https://api-docs.solidgate.com/api/v2/customers) | `CUSTOMER_CREATED` |
| [Payment instruments](https://api-docs.solidgate.com/api/v2/payment-instruments) | `PAYMENT_INSTRUMENT_CREATED` |
| [Reports](https://api-docs.solidgate.com/api/v2/reports) | `REPORT_GENERATED` |

**Channel-level events by domain**
| Domain | Example event |
|  --- | --- |
| [Invoices](https://api-docs.solidgate.com/api/v2/invoices) | `INVOICE_CREATED` |
| [Subscriptions](https://api-docs.solidgate.com/api/v2/subscriptions) | `SUBSCRIPTION_TRIAL_ACTIVATED` |
| [Antifraud results](https://api-docs.solidgate.com/api/v2/antifraud-results) | `ANTIFRAUD_RESULT_CREATED` |
| [Fraud alerts](https://api-docs.solidgate.com/api/v2/fraud-alerts) | `FRAUD_ALERT_RECEIVED` |
| [Prevention alerts](https://api-docs.solidgate.com/api/v2/prevention-alerts) | `PREVENTION_ALERT_RECEIVED` |
| [Routing](https://api-docs.solidgate.com/api/v2/routing) | `ROUTING_CONFIG_VERSION_PUBLISHED` |

 - [POST /webhooks/create](https://api-docs.solidgate.com/api/v2/webhooks/create-webhook.md): Creates a new webhook endpoint to receive payment and order events. Webhook endpoints are inactive until activated by calling the patch endpoint with the status set to ACTIVE.
 - [POST /webhooks/list](https://api-docs.solidgate.com/api/v2/webhooks/list-webhook.md): Retrieves a paginated list of webhook endpoints.
 - [POST /webhooks/get](https://api-docs.solidgate.com/api/v2/webhooks/get-webhook.md): Retrieves webhook endpoint details by ID.
 - [POST /webhooks/patch](https://api-docs.solidgate.com/api/v2/webhooks/patch-webhook.md): Updates an existing webhook endpoint configuration. To stop account-level events on a webhook with a channel filter, set `is_account_events_enabled` to `false` and send `event_types` without account-l
 - [POST /webhooks/delete](https://api-docs.solidgate.com/api/v2/webhooks/delete-webhook.md): Deletes a webhook endpoint.
 - [POST /webhooks/rotate-key](https://api-docs.solidgate.com/api/v2/webhooks/rotate-webhook-key.md): Rotates the secret for the specified webhook key. Returns a new secret in the `rotate_secret` field, which becomes valid within a few seconds. The previous secret remains valid during the rotation per
