Search.../

Introduction

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:

The Wix eCommerce platform also incorporates SPIs for greater customization. Use the SPIs to:

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:

import wixEcomBackend from 'wix-ecom-backend';
javascript | Copy Code

Before you begin

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:

API Migration

ServicePrevious LocationCurrent Location
CartWix Stores (Deprecated)Wix eCommerce Cart and Current Cart
Checkout-Wix eCommerce Checkout
OrdersWix Stores Backend (Deprecated)Wix eCommerce Orders
CatalogWix Stores BackendWix Stores - no change
InventoryWix Stores BackendWix Stores - no change
CollectionsWix Stores BackendWix Stores - no change

API Event Migration

The table below shows Wix Stores events and their equivalent Wix eCommerce events that are triggered at the same time.

wix-stores-backend Order Eventswix-ecom-backend Order Events
onNewOrder()onOrderApproved()
onOrderCanceled()onOrderCanceled()
onOrderPaid()onOrderTransactionsUpdated()
onOrderRefunded()onOrderTransactionsUpdated()

Terminology

  • 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 SPI. 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.

Was this helpful?