Skip to main content

Unpaid Order Flow

The following flowchart shows the process for an unpaid order.

The order is created from the cart during the checkout process.

Stock is managed as follows:

  1. When a customer attempts to add products to a cart, the inventory service checks if there is enough available stock. If there is not enough stock available, you receive a 400 HTTP response with a warning. The response does not describe what products cannot be added, nor does it return how many products are in stock.
  2. If a customer successfully adds products to a cart, the customer can optionally choose the location of the stock (if this order is for collection).
  3. The inventory service checks if there is enough available stock at the location.
  4. If there is enough stock available at the location, then the customer can checkout to create an unpaid order.
  5. A final check on the available stock is performed.
  6. After creating the unpaid order, the payment for an order can be taken. When a customer attempts to pay for an order, the inventory service reserves the stock before the payment is processed internally. At any time before the point of payment, a customer might lose their order, if the customer is slower than everyone else.
  7. If the payment fails, the temporary stock allocation is removed, and the stock becomes available again for anyone to buy.

Once payment is completed, the order transitions to a paid order, allowing further processing, such as fulfillment or shipping.