Creates an order from a specified checkout.
The createOrder() function returns a Promise that resolves to the new order's ID and paymentGatewayOrderID when the order is created.
Pass the paymentGatewayOrderId as the paymentId param to the startPayment() function to allow a customer to pay for their order.
Note: The following requirements must be met for an order to be created from a checkout.
checkout._id to Get Checkout and take a look at the calculationErrors field.availability.status of "AVAILABLE" or "PARTIALLY_AVAILABLE".priceSummary.total is greater than 0, the billingInfo.address field must be provided.shippingInfo.shippingDestination.address and shippingInfo.selectedCarrierServiceOption fields must be provided.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails field must be provided.Checkout ID.
Further order creation options.
There is 1 error with this status code.
There are 2 errors with this status code.
There are 13 errors with this status code.
There is 1 error with this status code.
This method may also return standard errors. Learn more about standard Wix errors.