> 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`). > - 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/v1/booking-fees Method: GET Method parameters: query param name: bookingIds | type: array | description: IDs of the bookings to retrieve booking fees for. query param name: multiServiceBookingIds | type: array | description: IDs of the multi service bookings to retrieve booking fees for. Return type: ListBookingFeesByBookingIdsResponse - name: bookingFees | type: array | description: List of retrieved booking fees. - name: id | type: string | description: Booking fee GUID. - name: bookingId | type: string | description: GUID of the booking associated with the fee. - 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. - name: currency | type: string | description: Currency code. Must be valid ISO 4217 currency code (e.g., USD). - 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. - 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. - 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. - name: description | type: string | description: Description of the booking policy. - name: descriptionTranslated | type: string | description: Translated description of the booking policy according to the buyer language of the eCommerce order. - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata. - name: count | type: integer | description: Number of items returned in the response. - 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. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. - 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: ' ``` ### 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: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.pricing.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 | description: IDs of the bookings to retrieve booking fees for. - name: multiServiceBookingIds | type: array | description: IDs of the multi service bookings to retrieve booking fees for. Return type: PROMISE - name: bookingFees | type: array | description: List of retrieved booking fees. - name: _id | type: string | description: Booking fee GUID. - name: bookingId | type: string | description: GUID of the booking associated with the fee. - 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. - name: currency | type: string | description: Currency code. Must be valid ISO 4217 currency code (e.g., USD). - 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. - 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. - 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. - name: description | type: string | description: Description of the booking policy. - name: descriptionTranslated | type: string | description: Translated description of the booking policy according to the buyer language of the eCommerce order. - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata. - name: count | type: integer | description: Number of items returned in the response. - 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. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. - 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-hosted) Self-hosted 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); }; ``` ---