About the Wix eCommerce Validations Service Plugin

As a validation service plugin (formerly SPI), you can integrate your service with Wix's cart and checkout to allow merchants to request and use your services on their Wix sites. By integrating your service with Wix, the validations are performed on the site visitor's cart and checkout.

The integration is done via an app in the Wix App Market (created in the Wix Studio workspace), and the Wix Validations service plugin.

Future functionality includes validating products and orders.

Learn more about service plugin extensions.

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 extension’s configuration file in your app's dashboard.

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.

Configuration

To enable Wix to communicate with your app:

  1. Go to Extensions in your app's dashboard.
  2. Click Create Extension in the top right.
  3. Filter by eCommerce in the left menu, then find Ecom Validations and click Create.
  4. Provide the following configuration:
NameTypeDescription
deploymentUristringRequired. 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.
componentNamestringA unique name for this component. This is an internal name that will only appear in the app dashboard.
validateInCartbooleanWhether to validate the cart page in addition to the checkout page. Default: false

Terminology

TermDefinition
MerchantBusiness that offers products on their Wix site to customers.
SeverityHow 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 OptionA store owner can create subscriptions to sell their products on a recurring basis. A line item can be a subscription.
TargetTarget 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 ProviderA 3rd-party app that implements custom logic to validate the site's cart or checkout.
ViolationsA list of any validation violations in a site visitor's cart or checkout.
Wix site ownerThe person managing the merchant's Wix site.
Did this help?

POST

Get Validation Violations


Developer Preview

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

This method retrieves validation violations from your app.

Wix calls this method when certain actions are performed on a visitor's cart and checkout. For example, when an item is added to the cart, or when a coupon is added to a checkout. This method validates a visitor's cart and checkout, and returns any validation violations (using the structure provided by Wix eCommerce). Site visitors can see the validation violations in their cart and checkout pages. If there aren't any validation violations, the method returns an object containing an empty list.

Notes:

  • Do not call the Estimate Cart Totals, Estimate Current Cart Totals or Get Checkout methods from your implementation code for Get Validation Violations. Doing so will result in an error.
  • By default, this method only retrieves validation violations from a visitor's checkout. If you want to also retrieve validation violations from a visitor's cart, set the validateInCart parameter to true in the Ecom Validations Integration's config file.
Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
{DEPLOYMENT-URI}/v1/get-violations
Did this help?