This article shares some possible use cases your app could support, as well as a sample flow that supports each use case. This can be a helpful jumping off point as you plan your app's implementation.
Your app could allow business owners to add a customer tip for their staff to an eCommerce order.
To add a tip to an order:
{ "paymentStatus": { "$in": ["NOT_PAID", "PARTIALLY_PAID"]}}
in the filter
. Save the returned order IDs, included line items,
priceSummary.subTotal.formattedAmount
, and all additional details that you
want to display to the business owners later in the flow.TIP_NOT_FOUND
error.paymentTerminalId
.presets
and the order's
priceSummary.subTotal.formattedAmount
to the business owner. Save the
business owner's tip choice.price
for all the order's line items and save the returned tip
.tip
object from the previous step.Your app can let business owners adjust a staff member's share and add a distribution for another staff.
To adjust tip distributions:
{ "paymentStatus": { "$in": ["NOT_PAID", "PARTIALLY_PAID"]}}
in the filter
. Save the returned order IDs, included line items,
priceSummary.subTotal.formattedAmount
, and all additional details that you
want to display to the business owners later in the flow.tip
is returned. If
an order has no tip, the call fails with a TIP_NOT_FOUND
error. Save all
returned tip
objects including their distributions
.staff.id
and the distribution amount they
receive.Your app could display a dashboard to the business owners that allows them to manage tips by staff member.
To create a tip dashboard:
staff.id
.staff.id
and the list of order IDs. Be sure to save
the orderId
for each distribution.Your app can allow customers to add or update a tip as when you're using custom checkout. Keep in mind that Wix Tips allows customers to manage tips out-of-the-box, when the business is using the standard eCommerce checkout.
To manage a tip in your custom checkout:
purchaseFlowId
.allowCustomerTip
and save the tip choice presets
.purchaseFlowId
to check if the customer has already chosen a tip.additionalFee
associated with the tip choice to the relevant
eCommerce order.Query endpoints allow you to filter and sort results based on service properties. This article covers field support for filtering and sorting.
The following table shows field support for filters and sorting
for the tipDistributions
object in
Query Tip Distributions:
Field | Supported Filters | Sortable |
---|---|---|
id | $eq , $ne , $in , $exists | Sortable |
tipId | $eq , $ne , $in , $exists | Sortable |
transaction.transactionDate | $eq , $ne , $gt , $gte , $lt , $lte , $in , $exists | Sortable |
transaction.transactionId | $eq , $ne , $in , $exists | Sortable |
orderId | $eq , $ne , $in , $exists | Sortable |
staff.id | $eq , $ne , $in , $exists | Sortable |
createdDate | $eq , $ne , $gt , $gte , $lt , $lte , $in , $exists | Sortable |
Related content:
A tip holds information about how much a customer has tipped, how the tip is distributed among staff, and the associated order’s line item subtotal.
ID of the tip. Identical to the code
of the related order.additionalFee
.
Subtotal of all line items from the eCommerce order that's related to the tip. In the response of Preview Tip, there is no related eCommerce order. Then, value of this field corresponds to the sum of all line item prices passed in the request.
Total amount of the tip.
Min: 0.00
Details about how the tip is shared among staff. Available only if at least one staff member receives part of the tip, and it's not entirely allocated to the business.
Max: 50 distributions
Undistributed tip amount. Calculated as the difference between tip.amount
and the sum of all tip.tipDistributions.amount
values.
Min: 0.01
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Previews a tip for a list of line items.
If you provide the Wix Bookings app ID
as lineItemInfo.catalogReference.appId
, the response includes tip
distributions for each associated
Bookings staff member.
If you don't provide a tipSettingsId
, the staffDistributionMethod
is
based on the site's default tip settings.
You can only call this method when authenticated as a Wix app or Wix user identity.
Information about the line items to preview the tip for.
Min: 1 line item Max: 50 line items
Information about how to calculate the total tip amount and the distribution amounts.
ID of the tip settings used to preview the tip. If you don't provide a
tipSettingsId
, the staffDistributionMethod
is based on the site's
default tip settings.
Tip.
There are 2 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves the tip that's associated with an eCommerce order.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the order to retrieve the tip for.
Retrieved tip.
There are 2 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.