collectAppliedBookingFees( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Collects booking fees by charging the customer using the payment method that's saved on the corresponding eCommerce order.

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 listTransactionsForSingleOrder() 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. Then, onFailedToCollectAppliedBookingFees() is also triggered.

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 reason's 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.
Method Declaration
Copy
Method Parameters
orderIdstringRequired

ID of the eCommmerce 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>
Was this helpful?
Yes
No