> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# ListWebhooks

# Package: base44

# Namespace: Webhooks

# Method link: https://dev.wix.com/docs/api-reference/business-management/payments/base44/webhooks/list-webhooks.md

## Permission Scopes:
Manage Base44 Payments                                                                                          : SCOPE.PAYMENTS.BASE44

## Introduction

Retrieves a list of the webhooks that were registered for the site through Checkout Sessions.

All webhooks are returned in a single response. Paging, filtering, and sorting aren't supported, and the order of the webhooks isn't guaranteed.

To register or unregister a webhook, call Checkout Sessions. Webhooks registered in other ways aren't included in the response.

---

## REST API

### Schema

```
 Method: listWebhooks
 Description: Retrieves a list of the webhooks that were registered for the site through Checkout Sessions.  All webhooks are returned in a single response. Paging, filtering, and sorting aren't supported, and the order of the webhooks isn't guaranteed.  To register or unregister a webhook, call Checkout Sessions. Webhooks registered in other ways aren't included in the response.
 URL: https://www.wixapis.com/payments/base44/v1/webhooks
 Method: GET
 Return type: ListWebhooksResponse
  - name: webhooks | type: array<Webhook> | description: Webhooks registered for the site.  
     - name: id | type: string | description: Webhook GUID. This is the slug of the event type the webhook is registered for.  For example, `wix.ecom.v1.order_approved`.  | read-only: true | validation: maxLength 128
     - name: url | type: string | description: URL that receives the notifications for this event type.  | validation: format WEB_URL


```

### Examples

### List webhooks
Retrieves the webhooks registered for the site through Checkout Sessions.

```curl
curl -X GET \
'https://www.wixapis.com/payments/base44/v1/webhooks' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.payments.webhooks.listWebhooks()
 Description: Retrieves a list of the webhooks that were registered for the site through Checkout Sessions.  All webhooks are returned in a single response. Paging, filtering, and sorting aren't supported, and the order of the webhooks isn't guaranteed.  To register or unregister a webhook, call Checkout Sessions. Webhooks registered in other ways aren't included in the response.
 Return type: PROMISE<ListWebhooksResponse>
  - name: webhooks | type: array<Webhook> | description: Webhooks registered for the site.  
     - name: _id | type: string | description: Webhook GUID. This is the slug of the event type the webhook is registered for.  For example, `wix.ecom.v1.order_approved`.  | read-only: true | validation: maxLength 128
     - name: url | type: string | description: URL that receives the notifications for this event type.  | validation: format WEB_URL


```

### Examples

### List webhooks
Retrieves the webhooks registered for the site through Checkout Sessions.

```javascript
import { webhooks } from "@wix/payments";

async function listWebhooks() {
  const response = await webhooks.listWebhooks();
}

/* Promise resolves to:
 * {
 *   "webhooks": [
 *     {
 *       "_id": "wix.ecom.v1.order_approved",
 *       "url": "https://example.com/webhooks/orders"
 *     },
 *     {
 *       "_id": "wix.ecom.subscription_contracts.v1.subscription_contract_canceled",
 *       "url": "https://example.com/webhooks/subscriptions"
 *     }
 *   ]
 * }
 */

```

### listWebhooks (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { webhooks } from '@wix/payments';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { webhooks },
  // Include the auth strategy and host as relevant
});


async function listWebhooks() {
  const response = await myWixClient.webhooks.listWebhooks();
};
```

---