> 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

# ListBookingFeesByBookingIds

# Package: pricing

# Namespace: BookingFees

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/pricing/booking-fees/list-booking-fees-by-booking-ids.md

## Permission Scopes:
Read Bookings - Including Participants: SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE

## Introduction

Retrieves booking fees by booking IDs.


Instead of returning `bookingFee` objects with the `cancellationFee.price.value`
set to `0.00`, the method doesn't return a `bookingFee` object for the relevant
booking IDs. For example, no `bookingFee` object is returned if the canceled
booking was free or if the booking was canceled before the start of the earliest
cancellation window with an associated fee.

If the service's booking policy has been updated since the booking was created,
booking fees are calculated according to the [booking policy snapshot](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policy-snapshots/introduction.md)

rather than the current version of the [policy](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction.md).

This method calculates the cancellation fee amount based on the time of the
call, you can't specify a time. Similarly, it calculates the cancellation fee
based on the number of participants who canceled, not a provided number.

A `cancellationFee.status` of `PREVIEW` indicates that the booking fee is
informational only; the customer isn't required to pay it. When the `status` is
set to `UNKNOWN_STATUS` there is no eCommerce order associated with the booking. For
example, if a custom checkout was used for the booking instead of the
[eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction.md).
If multiple events would trigger the calculation of a booking fee, for example
when a booking is first canceled and then marked as not attended, Wix calculates
the booking fee based on the first trigger. In this example, the booking
cancellation.

---

## REST API

### Schema

```
 Method: listBookingFeesByBookingIds
 Description: Retrieves booking fees by booking GUIDs.   Instead of returning `bookingFee` objects with the `cancellationFee.price.value` set to `0.00`, the method doesn't return a `bookingFee` object for the relevant booking GUIDs. For example, no `bookingFee` object is returned if the canceled booking was free or if the booking was canceled before the start of the earliest cancellation window with an associated fee.  If the service's booking policy has been updated since the booking was created, booking fees are calculated according to the [booking policy snapshot](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policy-snapshots/introduction.md)  rather than the current version of the [policy](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction.md).  This method calculates the cancellation fee amount based on the time of the call, you can't specify a time. Similarly, it calculates the cancellation fee based on the number of participants who canceled, not a provided number.  A `cancellationFee.status` of `PREVIEW` indicates that the booking fee is informational only; the customer isn't required to pay it. When the `status` is set to `UNKNOWN_STATUS` there is no eCommerce order associated with the booking. For example, if a custom checkout was used for the booking instead of the [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction.md). If multiple events would trigger the calculation of a booking fee, for example when a booking is first canceled and then marked as not attended, Wix calculates the booking fee based on the first trigger. In this example, the booking cancellation.
 URL: https://www.wixapis.com/_api/booking-fees/v1/booking-fees
 Method: GET
 Method parameters:
   query param name: bookingIds | type: array<bookingIds> | description: IDs of the bookings to retrieve booking fees for.  | validation: maxItems 5, format GUID
   query param name: multiServiceBookingIds | type: array<multiServiceBookingIds> | description: IDs of the multi service bookings to retrieve booking fees for.  | validation: maxItems 1, format GUID
 Return type: ListBookingFeesByBookingIdsResponse
  - name: bookingFees | type: array<BookingFee> | description: List of retrieved booking fees.  
     - name: id | type: string | description: Booking fee GUID.  | read-only: true | validation: format GUID
     - name: bookingId | type: string | description: GUID of the booking associated with the fee.  | validation: format GUID
     - name: cancellationFee | type: CancellationFee | description: Cancellation fee details.  
        - name: price | type: Money | description: Price the customer must pay.  
           - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","maxScale":2}
           - name: currency | type: string | description: Currency code. Must be valid ISO 4217 currency code (e.g., USD).  | validation: format CURRENCY
           - name: formattedValue | type: string | description: Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative.  | read-only: true | validation: maxLength 50
        - name: status | type: BookingFeeStatus | description: Status of the booking fee.  
             - enum:
             -     UNKNOWN_STATUS: There is no eCommerce order associated with the booking.
             -     PREVIEW: The fee is informational only; the customer doesn't have to pay it. For example, it shows how much the customer would owe if they canceled the booking now.
             -     NOT_YET_APPLIED_TO_ORDER: The booking fee hasn't been added to the eCommerce order yet.
             -     APPLIED_TO_ORDER: The booking fee has been added to the eCommerce order. The customer may not have paid it yet.
        - name: trigger | type: Trigger | description: Information about what triggered the creation of the booking fee.  | read-only: true 
             - enum:
             -     UNKNOWN_TRIGGER: There is no information about what triggered the creation of the booking fee.
             -     NOT_ATTENDED: The booking fee was created because the customer didn't show up to the booking or canceled after the expiration of the last cancellation window.
             -     BOOKING_CANCELED: The booking fee was created because the customer canceled the booking before the expiration of the last cancellation window.
     - name: policyDetails | type: PolicyDetails | description: Information about the [booking policy snapshot](https://dev.wix.com/docs/api-reference/business-solutions/bookings/policies/booking-policy-snapshots/introduction.md) according to which the fee was created.  
        - name: id | type: string | description: GUID of the booking policy.  | read-only: true | validation: format GUID
        - name: description | type: string | description: Description of the booking policy.  | validation: maxLength 2500
        - name: descriptionTranslated | type: string | description: Translated description of the booking policy according to the buyer language of the eCommerce order.  | validation: maxLength 2500
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: MISSING_BOOKING_IDS | Description: No booking GUIDs were specified. Provide at least 1 booking GUID.


```

### Examples

### List booking fees by multi service booking ID
```curl
curl -X GET \
'https://www.wixapis.com/_api/booking-fees/v1/booking-fees?multiServiceBookingIds=9ebf44e5-9000-4b27-8b42-ffa77fa42ad5' \
-H 'Authorization: <AUTH>'
```

### List booking fees by booking ID
```curl
curl -X GET \
'https://www.wixapis.com/_api/booking-fees/v1/booking-fees?bookingIds=b5d05e4b-4e75-4fa8-a8de-1827682ff03c' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.bookings.bookingFees.listBookingFeesByBookingIds(options)
 Description: Retrieves booking fees by booking GUIDs.   Instead of returning `bookingFee` objects with the `cancellationFee.price.value` set to `0.00`, the method doesn't return a `bookingFee` object for the relevant booking GUIDs. For example, no `bookingFee` object is returned if the canceled booking was free or if the booking was canceled before the start of the earliest cancellation window with an associated fee.  If the service's booking policy has been updated since the booking was created, booking fees are calculated according to the [booking policy snapshot](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policy-snapshots/introduction.md)  rather than the current version of the [policy](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction.md).  This method calculates the cancellation fee amount based on the time of the call, you can't specify a time. Similarly, it calculates the cancellation fee based on the number of participants who canceled, not a provided number.  A `cancellationFee.status` of `PREVIEW` indicates that the booking fee is informational only; the customer isn't required to pay it. When the `status` is set to `UNKNOWN_STATUS` there is no eCommerce order associated with the booking. For example, if a custom checkout was used for the booking instead of the [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction.md). If multiple events would trigger the calculation of a booking fee, for example when a booking is first canceled and then marked as not attended, Wix calculates the booking fee based on the first trigger. In this example, the booking cancellation.
 Method parameters:
   param name: options | type: ListBookingFeesByBookingIdsOptions  none  
        - name: bookingIds | type: array<string> | description: IDs of the bookings to retrieve booking fees for.  | validation: maxItems 5, format GUID
        - name: multiServiceBookingIds | type: array<string> | description: IDs of the multi service bookings to retrieve booking fees for.  | validation: maxItems 1, format GUID
 Return type: PROMISE<ListBookingFeesByBookingIdsResponse>
  - name: bookingFees | type: array<BookingFee> | description: List of retrieved booking fees.  
     - name: _id | type: string | description: Booking fee GUID.  | read-only: true | validation: format GUID
     - name: bookingId | type: string | description: GUID of the booking associated with the fee.  | validation: format GUID
     - name: cancellationFee | type: CancellationFee | description: Cancellation fee details.  
        - name: price | type: Money | description: Price the customer must pay.  
           - name: value | type: string | description: Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","maxScale":2}
           - name: currency | type: string | description: Currency code. Must be valid ISO 4217 currency code (e.g., USD).  | validation: format CURRENCY
           - name: formattedValue | type: string | description: Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative.  | read-only: true | validation: maxLength 50
        - name: status | type: BookingFeeStatus | description: Status of the booking fee.  
             - enum:
             -     UNKNOWN_STATUS: There is no eCommerce order associated with the booking.
             -     PREVIEW: The fee is informational only; the customer doesn't have to pay it. For example, it shows how much the customer would owe if they canceled the booking now.
             -     NOT_YET_APPLIED_TO_ORDER: The booking fee hasn't been added to the eCommerce order yet.
             -     APPLIED_TO_ORDER: The booking fee has been added to the eCommerce order. The customer may not have paid it yet.
        - name: trigger | type: Trigger | description: Information about what triggered the creation of the booking fee.  | read-only: true 
             - enum:
             -     UNKNOWN_TRIGGER: There is no information about what triggered the creation of the booking fee.
             -     NOT_ATTENDED: The booking fee was created because the customer didn't show up to the booking or canceled after the expiration of the last cancellation window.
             -     BOOKING_CANCELED: The booking fee was created because the customer canceled the booking before the expiration of the last cancellation window.
     - name: policyDetails | type: PolicyDetails | description: Information about the [booking policy snapshot](https://dev.wix.com/docs/api-reference/business-solutions/bookings/policies/booking-policy-snapshots/introduction.md) according to which the fee was created.  
        - name: _id | type: string | description: GUID of the booking policy.  | read-only: true | validation: format GUID
        - name: description | type: string | description: Description of the booking policy.  | validation: maxLength 2500
        - name: descriptionTranslated | type: string | description: Translated description of the booking policy according to the buyer language of the eCommerce order.  | validation: maxLength 2500
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: MISSING_BOOKING_IDS | Description: No booking GUIDs were specified. Provide at least 1 booking GUID.


```

### Examples

### List booking fees by booking IDs
```javascript
import { bookingFees } from "@wix/bookings";

async function listBookingFees() {
  const response = await bookingFees.listBookingFeesByBookingIds({
    bookingIds: ["b4ca5322-13ff-4bb5-9af7-7f70a9d3f1bc"],
  });
}

```

### listBookingFeesByBookingIds (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 { bookingFees } from '@wix/bookings';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function listBookingFeesByBookingIds(options) {
  const response = await myWixClient.bookingFees.listBookingFeesByBookingIds(options);
};
```

---