This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered on successful creation of a new order. This means the order has been validated and the payment has cleared, and now the site owner can accept or cancel the order.
function onOrderNewOrder(handler: function): void;
handler(event: OrderNewOrderEnvelope): void | Promise<void>
import { orders } from "@wix/restaurants";
orders.onOrderNewOrder((event) => {
// handle your event here
});