This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves eligible custom discount triggers based on the provided items.
This method is automatically called by Wix eCommerce to retrieve the custom discount triggers provided by your extension. This happens when actions are performed on the cart and checkout entities/pages. For example, when an item is added to the cart.
List of line items in the cart/checkout.
List of triggers to be checked for discount eligibility.
Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
List of eligible triggers. These are used by the Discount Rules API and Wix eCommerce to apply the relevant discount.
The data payload will include the following object as an encoded JWT. For the purposes of this example, we show the request and response objects decoded.