collectAppliedBookingFees( )


Collects booking fees by charging the customer using the payment method that's saved on the corresponding eCommerce order (SDK | REST)

Warning: Currently, there is no validation that prevents idempotent requests. This means that your code must make sure to not charge customers multiple times for the same booking fee. You could use List Transactions For Single Order (SDK | REST) to check which charges were made previously for an eCommerce order.

An HTTP status of 200 means that all booking fees were successfully collected. Any other HTPP status means that collection failed.

Collects the order's additionalFees.price.amount that's related to the booking fees. If there are multiple additional fees on the eCommerce order, the amount that's collected differs from priceSummary.totalAdditionalFees.amount.

Possible failure reasons include:

  • The order's status isn't APPROVED.
  • There is no payment method saved on the order.
  • The order's balanceSummary.balance.amount is lower than the additionalFees.price.amount to collect.
  • The order's additionalFeeId doesn't belong to a Wix Bookings cancellation fee.
Authentication
  • When developing websites or building an app with Blocks, this method may require elevated permissions, depending on the identity of the user calling it and the calling user's permissions.
  • When building apps without Blocks or for headless projects, you can only call this method directly when authenticated as a Wix app or Wix user identity. When authenticated as a different identity, you can call this method using elevation.
  • Elevation permits users to call methods they typically cannot access. Therefore, you should only use it intentionally and securely.
Permissions
Manage Bookings
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
orderIdstringRequired

ID of the eCommerce order that includes the booking fees as a single additionalFee.


optionsCollectAppliedBookingFeesOptions

Options to use when collecting booking fees that have been applied to an eCommerce order.

Returns
Return Type:Promise<CollectAppliedBookingFeesResponse>
Errors
400Invalid Argument

There is 1 error with this status code.

404Not Found

There are 2 errors with this status code.

428Failed Precondition

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?