Order and Pay
This section covers integrating with Dojo Order and Pay.
Order and Pay enables the creation and management of orders on the POS without the need for physical hardware, as well as the paying of those orders from a customer device or other Dojo product, empowering customers with a seamless, integrated experience.
Order Entity
The Order entity represents the core component of the Ordering API, containing all relevant information about an order placed by customers at a given location. An order can consist of multiple items, each with details such as status, quantity, price, and applied modifiers.
Order Status
The Order Status represents the various stages in an order’s lifecycle. As an order progresses from creation to fulfilment, its status will update to reflect its current state.
Status | Description |
---|---|
New | The order has been created but has not yet been processed. |
Submitted | The order has been submitted to the POS and is awaiting confirmation. |
Confirmed | The order has been confirmed by the POS and is awaiting preparation. |
Accepted | The order has been accepted by the kitchen or staff for preparation. |
Preparing | The items in the order are currently being prepared. |
Prepared | The items have been fully prepared and are ready for service or collection. |
Ready | The order is ready for delivery or collection by the customer. |
Finalized | The order has been completed and paid for, and no further changes can be made. |
Canceled | The order has been canceled and is no longer active. |
Failed | The order has encountered an error and failed to process. This may require further investigation. |
These statuses help track the state of each order and ensure that any integrated systems can react to updates in a consistent manner.
In any calls made from the POS to Dojo, such as to retrieve the Payment Intent status, Dojo will refer to the POS "order ID" by externalId
, which can be used to match payment updates to an existing order.
Capabilities
In the Dojo EPOS Data API, capabilities represent specific actions that the POS system can perform. These capabilities are linked to corresponding API endpoints in the POS system. By defining these capabilities, the POS system communicates to Dojo which features are supported and accessible.
CreateOrder
POST REST /v1/orders
This capability allows the creation of new orders within the POS system. It is essential for handling customer orders and storing relevant order details.
GetOrderById
This capability enables the POS system to retrieve detailed information about a specific order using its unique order ID. This is crucial for order tracking and status updates.
CancelOrderById
DELETE REST /v1/orders/{orderId}
This capability provides the ability to cancel an order within the POS system, preventing further modifications or processing. Cancellations are performed using the order’s unique ID. The POS system can reject a CancelOrder
reqeuest if the order is not in a state where it can be cancelled.
SearchOrders
POST REST /v1/orders
This capability enables searching for orders based on various criteria. It supports filtering and pagination to help Dojo products efficiently find orders within the POS system. Each Dojo product has different requirements on what filters must be implemented which can be found on the product documentation page(s).
HandleEvent:payment_intent.status_updated
POST REST /v1/events
This capability enables the POS system to record status updates on payments against orders taken by Dojo products.