This migration is relevant for all apps that currently use (or plan to use) the Stores Orders API.
We’re introducing a new Wix eCommerce Orders API that enables business owners to meet new customer needs and provide better customer service. This will eventually replace the existing Stores Orders API. This quick guide will help you to make sure your app is ready for the migration.
The structure of the eCommerce Order object is different from the Stores Order object. You can learn more about these structural changes here.
The webhook payload structure has also changed. To facilitate your move to these webhooks, have a look at the webhook conversion table.
Customers occasionally make mistakes when placing an order, or they might simply want to make a change to an existing order. This could include adding items, updating prices, revising customer details, and more.
The new eCommerce service includes functionality that lets users edit existing orders. This is known as Edit Order in the dashboard, and as Draft Orders when using our REST APIs.
When an existing order is edited, the Order Updated Webhook is triggered. This webhook returns the whole order object in the eCommerce order structure, but you can still pass the edited order’s ID to the Stores Orders endpoints if you’d like to fetch the order in the Stores structure.
If a Wix user edits an existing order, depending on your app type you might need your app to be aware of the change. Here are some examples:
- A user changes the quantity of a product item in an existing order. As a result, the number of items to be shipped has changed.
- A user changes the shipping address in an existing order.
- A user adds a new item to an existing order. As a result, the amount to be paid changes.
- A user changes the price of an item in an existing order. As a result, the total payable amount of the order, as well as the payment status can change.
- Go to your app in the Wix Developers Center.
- Go to the Webhooks tab in the side menu.
- Click + Add Webhook.
- Select an API Category > Wix eCommerce
- Find and select the Order Updated Webhook
- Add a Callback URL.
- Click Save.
Edit Order is not yet available publicly, but if you’d like to test the feature yourself and understand any implications it may have for your app, follow these steps:
- Install the EditThisCookie Chrome extension.
- Click + to add a new cookie, select
petri-ovrand fill out the following fields:
- Secure: Check the box
- HttpOnly: Check the box
- Create a new Wix website with Wix Stores installed (testing this change only works on new sites).
- Refresh the Orders page.
- Navigate to an unfulfilled order in the dashboard.
- Click on the More Actions button in the top right corner.
- Click on Edit Order.
All orders, including changes committed by Edit Order, are still available in the Stores Orders APIs and webhooks. However, we highly recommend planning your transition to eCommerce Orders and Edit Order/Draft Orders, as the Stores APIs will be deprecated in the coming months.