About the Wix eCommerce Validations Service Plugin

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:

  • Minimum cart value.
  • Age of a customer before they proceed to checkout.
  • Line item quantity limit.
  • Valid coupon code.
  • Specific items to ship only to specific regions.
  • Restrict purchases to site members only.
  • Close the checkout on certain days.

Before you begin

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.

Use Cases

Using the service plugin, you can design your app to validate a cart and checkout for your merchant's customers, including:

  • Minimum cart value.
  • Age of a customer before they proceed to checkout.
  • Line item quantity limit.
  • Valid coupon code.
  • Specific items to ship only to specific regions.
  • Restrict purchases to site members only.
  • Close the checkout on certain days.

Terminology

  • Merchant: Business that offers products on their Wix site to customers.
  • Severity: How severe the violation is. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow.
  • Subscription option: A store owner can create subscriptions to sell their products on a recurring basis. A line item can be a subscription.
  • Target: Target location on a checkout or cart page where the violation will be displayed. The target violation can either be in a particular lineItem, or in an other area of the cart or checkout page.
  • Validation service provider: A 3rd-party app that implements custom logic to validate the site's cart or checkout.
  • Violations: A list of any validation violations in a site visitor's cart or checkout.

See also

Did this help?