About Orders Settings
With the Orders Settings API, you can retrieve and update settings that apply to a site’s eCommerce orders. These settings include adding or removing customer email notifications about order status, defining when to update the store inventory, and creating invoices.
The default orders settings are provided when you first create a Wix eCommerce site.
Before you begin
It’s important to note the following points before starting to code:
- Install the Wix Stores, Wix Bookings, or Wix Events & Tickets app from Wix App Market.
Use Cases
Terminology
- Order: The final stage of the eCommerce purchase flow: cart, checkout, and order. An order represents a customer's request to purchase one or more products or services from a seller. It typically includes details such as the type and quantity of items, shipping address, payment information, and any other relevant transaction details.
- Invoice: Commercial document issued by a seller to a buyer, providing a detailed account of products or services rendered, along with the corresponding costs.
- Inventory: List of goods, products, or materials that a business holds for the purpose of resale or use in its operations.
Orders Settings: Sample Use Cases and Flows
This article presents possible use cases and corresponding sample flows that your app can support. It provides a useful starting point as you plan your app's implementation.
Update orders settings across all sites
If you have several Wix eCommerce sites that use your app you might need to apply the same orders settings to those sites. For example, if now the store inventory is updated only after an order is paid, this change also needs to be reflected on other sites.
To update the orders settings across all sites:
- Call Get Orders Settings on the site where you updated the settings.
- Extract the
inventoryUpdateTrigger
field value. - Call Update Orders Settings for your other sites and pass the new settings to each.
- ON_ORDER_PAID: Stock quantities will update only after the payment is approved.
- ON_ORDER_PLACED: Stock quantities will update while the payment is being processed. If the payment did not go through, items will restock.
Default: false
Note: The issued invoice for an order is not a tax invoice and doesn't reflect refunds. You are responsible for ensuring that invoices you issue conform to any relevant legal requirements.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves the site's order settings.
Permission Scopes
For app development, you must have one of the following permission scopes:This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates the site's orders settings.
Permission Scopes
For app development, you must have one of the following permission scopes:This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when orders settings are updated.