Skip to main content

Flows

info

The capabilities mentioned on this page must be registered with the EPOS Capabilities API prior to initiating an Order and Pay flow, learn more here.

The following diagram demonstrates how the Order and Pay product will interact with Dojo and the POS system for creating orders and completing payments:

Step-by-step: Order and Pay

Step 1: Customer creates order to Dojo

The first stage of the Order and Pay flow is triggered when a customer, having accessed a list of venue products using the Dojo Order and Pay interface, creates an order by adding one or more items to the basket and advancing to the payment screen.

Step 2: Dojo creates a Payment Intent and captures the payment

Main Page: Payment Intents

Once the order has been initiated via the Order and Pay interface, Dojo will pre-authorise the payment by creating a Payment Intent and initiating a checkout flow for the customer. This payment is to be captured once the POS has confirmed the order. This also generates a Payment Intent which can be used to recall payment details such as the authorization code, card type and receipt data upon payment completion.

Step 3: Dojo creates an order on the POS

POST REST /v1/orders

REQUEST
RESPONSE
WS CreateOrderV1

Main page: Orders

The next step in is for Dojo to create the customer order within the POS, using the CreateOrder capability. The request will contain fields such as item data, type of order and payment details, including the paymentIntentId. It may also contain any additional modifiers or discounts, for example, if specified.

The POS should respond to Dojo with a 200 response to confirm that this has been received and that the payment has been acknowledged and recorded, and the response should inlcude additional data such as the relevant status.

info

In any calls made from the POS to Dojo through the Dojo API, such as to retrieve the Payment Intent status, Dojo will refer to the POS "order ID" by externalId, this can be useful when retrieving payment details such as receipt data upon payment completion, for example.

Step 4: Dojo displays order status to customer

After receiving a successful response from the POS to the RecordOrderPayment request, Dojo will inform the customer of the outcome and given order status through the Order and Pay customer interface.