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

This is the simplest version (see the limitations) of the workflow that is completely functional.
More complete workflow version can be implemented on top of this one.
Order states in the workflow v1.
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 is authorized (either including or excluding the capture), the order is moved from "Pending" to "Processing", which means the paymend is accepted and the logistics of the order is ready to begin.
Invoiced ("invoiced"): When the payment was authorized and the order is already in "Processing", it automatically is invoiced. That means, an invoice document is created and the order is moved to "Invoiced". This invoice process is automatic in version 1 of the order workflow. Once the order is in this state, it is ready to be shipped. If the order is virtual, it is moved automatically from "Invoiced" to "Complete", since it doesn't require shipping.
Complete ("complete"): When the order is in "Invoiced", it is waiting to be shipped. After the shipping is manually performed by an operator, the order is moved to "Complete". For virtual orders, the transition from "Invoiced" to "Complete" is automatic, since there's no shipping. 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".
Payment Authorized: The notification of authorization success from the payment method. It moves the order from "Pending" to "Processing".
Invoice: The (automatic in v1) invoicing process. Through this action, the order invoice is created, and the order is moved from "Processing" to "Invoiced".
Ship: When the shipment is manually notified by an operator (in v1), the order is marked as shipped moving it from "Invoiced" to "Complete".
These are the limitations of the workflow v1, and related future work for new versions.
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: