POST

Create Order


Deprecated

This method has been replaced with Create Order, and will be removed on September 4, 2024.

Deprecation Notice:

This endpoint has been replaced with eCommerce Create Order and will be removed on September 4, 2024.

Creates a new order.

Notes:

  • Only orders with the paymentStatus parameter set as "PAID" or "NOT_PAID" will show up in the site owner's Stores Orders tab in their dashboard.
  • The billingInfo.paymentProviderTransactionId and billingInfo.paymentMethod parameters can only be passed when paymentStatus is PAID.
  • The billingInfo.address parameter is required unless channelInfo.type: "POS".
  • The shippingInfo.shipmentDetails.address parameter is required unless one of the following is true:
    • The shippingInfo.pickupDetails is passed instead
    • channelInfo.type: "POS"
    • All order items are of type digital - lineItems.lineItemType: "DIGITAL".
  • When passing lineItems.variantId, lineItems.options is required.
  • When passing lineItems.productId, lineItem.lineItemType is limited to "PHYSICAL".
  • When not passing lineItems.productId, lineItem.lineItemType is limited to "CUSTOM_AMOUNT_ITEM".
Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/stores/v2/orders

Body Params
orderOrderRequired
Response Object
orderOrder
Request
cURL
curl 'https://www.wixapis.com/stores/v2/orders' \ --data-binary '{ "order": { "totals": { "subtotal": "10", "total": "10" }, "billingInfo": { "address": { "email": "Ivanushka@example.com" } }, "shippingInfo": { "shipmentDetails": { "address": { "email": "Ivanushka@example.com" } } }, "paymentStatus": "PAID", "lineItems": [ { "quantity": 1, "name": "my product", "priceData": { "price": "10" } } ], "channelInfo": { "type": "WEB" } } }' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "order": { "totals": { "subtotal": "7", "total": "10" }, "billingInfo": { "address": { "email": "tomj5@example.com" } }, "paymentStatus": "PAID", "lineItems": [ { "quantity": 1, "price": "5", "name": "my product" } ], "channelInfo": { "type": "WEB" } } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?