Important: When developing websites or building apps with Blocks, use Velo service plugins.
As a validations provider, you can integrate with Wix to allow Wix users to validate a site visitor's cart and checkout. For example, you can validate a specific line item’s quantity if the quantity per order is limited. Wix users can either write their own custom validation logic, or integrate with a 3rd-party validations provider.
The integration is done via an app in the Wix App Market and by implementing the Validations service plugin. After the app is installed on a site, Wix triggers a call to your service whenever the site needs to validate a cart or checkout. If there aren't any validation violations, the method should return an object containing an empty array.
Using the service plugin, you can design your app to validate a cart and checkout for your merchant's customers, including:
By default, the Validations service plugin only validates a site visitor's checkout. If you want to also validate a site visitor's cart, set the validateInCart
parameter to true
in the service plugin's configuration.
Using the service plugin, you can design your app to validate a cart and checkout for your merchant's customers, including:
To enable Wix to communicate with your app:
Name | Type | Description |
---|---|---|
deploymentUri | string | Required. Base URI where the endpoints are called. Wix appends the endpoint path to the base URI. For example, to call the Get Validation Violations endpoint at https://my-validations.com/v1/get-violations , the base URI you provide here is https://my-validations.com . |
componentName | string | A unique name for this component. This is an internal name that will only appear in the app dashboard. |
validateInCart | boolean | Whether to validate the cart page in addition to the checkout page. Default: false |
lineItem
, or in an other
area of the cart or checkout page.