The Wix eCommerce API is a comprehensive suite of services that address standard and specialized needs in online selling.
The APIs serve as a foundational layer for Wix's own business solutions, such as Stores, Bookings, and Restaurants Orders.
The Wix eCommerce API provides developers with a comprehensive set of services for customizing eCommerce functionality on Wix sites. The API empowers developers to extend functionality, create features, and build robust eCommerce solutions that meet the specific needs of their users.
With the Wix eCommerce API, you can do the following and more:
- Access, manage, and create any customer's cart, including a site visitor's current cart.
- Access, manage, and create a site visitor's checkout, and handle events when a checkout is abandoned, or an abandoned checkout is recovered.
- Create and manage discount rules.
- Promote and recommend items to customers.
- Create, access, and manage orders, and retrieve information about order-related transactions.
- Manage fulfillment (preparation and delivery) of orders.
The Wix eCommerce platform also incorporates service plugins (formerly SPIs) for greater customization. Use the service plugins to:
- Integrate your own custom catalog of sellable items.
- Incorporate custom additional fees.
- Integrate shipping rates.
- Validate a site visitor's cart and checkout.
The Wix eCommerce API is constantly being expanded with new capabilities. Check the API reference regularly to stay up to date with new functionality.
To use the wix-ecom-backend API, import wixEcomBackend
from the wix-ecom-backend
module:
Wix eCommerce and Wix Stores handle different parts of the eCommerce flow for an online store:
- Wix eCommerce: Carts, checkouts, and order.
- Wix Stores: Product catalogs, inventories, and collections.
If your code still uses the legacy Wix Stores Cart and Orders APIs, we recommend you migrate them to the new Wix eCommerce APIs as soon as possible. The following tables outline the differences and required migrations:
The table below shows Wix Stores events and their equivalent Wix eCommerce events that are triggered at the same time.
- Catalog: A repository containing items for sale. A catalog can contain anything sellable, including physical products, services, gift cards, pricing plans, and custom items created for individual transactions like specialized project work. Wix business solutions, such as Wix Bookings and Wix Stores, provide built-in catalogs. External business solutions can provide the Wix eCommerce platform with access to their catalogs via the Catalog Service Plugin. This enables robust integration of the platform’s cart and checkout functionalities with diverse business types.
- Cart: Once customers have found catalog items they want to purchase, they can add these items to their cart. A cart holds information about a potential transaction, including details about selected items, prices, and discounts, as well as the potential buyer. Site visitors can see their cart on the cart page. Developers can access and manage a customer's cart with the Cart API. Some purchasing flows bypass the cart entirely and proceed directly to checkout.
- Current Cart: The Current Cart API automatically interacts with the site visitor's cart that is currently being used. This means you can use the same functionality as the Cart API, but without the need for a cart ID.
- Checkout: Checkout is the page where a buyer finalizes a purchase. Each checkout holds information about the items to be purchased, price and tax summaries, shipping and billing information, any applied discounts, and more. Developers can access and manage checkout details and trigger checkout-related events with the Checkout API.
- Order: Once a customer has committed to a purchase, an order is created. An order holds information about purchased items, price and tax summaries, shipping and billing information, any applied discounts, and the status of payment and fulfillment. In the dashboard, business staff can create new orders, view and edit existing orders, track fulfillment, and manage the payments cycle. The Orders API enables apps or site owners to customize management of the order lifecycle, including viewing, editing, approving, canceling, and charging.