The following diagram shows the version 2 of the order workflow with its states and actions.

Order states in the workflow V2.
Pending ("pending"): This is the first state of the order. When the cart place is performed, the order is created in the "Pending" state, waiting for the payment to be either authorized or rejected.
Canceled ("canceled"): This state is reached when the payment is rejected. When an order is in "Pending" state and the payment method notifies a rejection, the order is moved to "Canceled" state. This is a final state, which means the order cannot be moved to any other state.
Processing ("processing"): After the order payment was authorized (either including or excluding the capture), the order is moved from "Pending" to "Processing", which means the paymend is accepted and the order is ready to be invoiced.
Invoiced ("invoiced"): When the payment was authorized and the order is already in "Processing", it is invoiced. That means, an invoice document was created and the order was moved to "Invoiced". The invoicing process is done manually by an operator. Once the order is in this state, its logistic process is ready to be started.
Preparing ("preparing"): Once the order was invoiced, the logistics process is started by requesting a shipment manually. Then the order is moved to "Preparinng" state. In this state, the shipment is created and if required by the shipping method, a shipping order is created as well. Once the shipment is performed successfully, the order is moved to the state "Complete". In case the shipment failed, the order is put back in "Invoiced" state, to re-start the logistics process.
Complete ("complete"): When the order is in "Preparing", it is waiting to be shipped. When shipped, the order is moved to "Complete". This is a final state, which means the order cannot be moved to any other state.
The workflow actions are the initiators that trigger the transitions between states.
Place Order: The conversion of a cart into an order. It creates the order in "Pending" state.
Payment Rejected: The notification of rejection from the payment method. It moves the order from "Pending" to "Canceled". It can also be ran manually by an operator.
Payment Authorized: The notification of authorization success from the payment method. It moves the order from "Pending" to "Processing". It can also be ran manually by an operator.
Invoice: The invoicing process. Through this action, the order invoice is created, and the order is moved from "Processing" to "Invoiced".
Request Shipment: When the order is invoiced, its logistics process is ready to start. The first action to do so is to request a shipment. That creates a shipment document associated to the order, and depending on the shipping method, creates a shipping order (for API-based shipping methods). When this action is executed the order is moved to "Preparing".
Ship: When the products are delivered to the final consumer, the ship action is executed, and the order is moved to "Complete".
Shipment Canceled: In case a shipping request was performed, and the shipment failed, it is cancelled and the order goes back to the previous state "Invoiced" to try again.
Comment: In any state of the order, a comment can be added to it without affecting its status. For simplicity, this action is not shown in the diagram.
These are the limitations of the workflow v2, and related future work for new versions.
Supports only physical orders
Future versions features:
Supports only one payment method for the total of the order.
Future versions features:
Supports only two possible payment results: Authorized or Rejected.
Future versions features:
Performs total invoicing for the whole order.
Future versions features:
Supports only manual shipment (from an operator) for the whole order.
Future versions features:
Does not support approval flows.
Future versions features: