StateState machineMedium
E-commerce order lifecycle
State transitions of an order from creation through fulfillment, cancellation, or refund.
What this diagram shows
Step 01
Creation
Orders start in Created and move to Paid once payment is captured.
Step 02
Fulfilment branches
Paid orders either ship and complete, or roll back via refund.
Step 03
Terminal states
Cancelled, Completed, and Refunded all close the lifecycle.
About state diagrams
State diagrams describe the states an entity can be in and the transitions between them. Use them for order lifecycles, subscription statuses, approval flows, or any object with meaningful modes.
This template is written in Mermaid — plain text you can edit, version in git, and regenerate the image from any time.
View Mermaid sourcePlain-text diagram syntax — copy or edit directly.
diagram.mmd
1stateDiagram-v22 [*] --> Created3 Created --> Paid: payment captured4 Created --> Cancelled: user cancels5 Paid --> Fulfilled: shipped6 Paid --> Refunded: refund requested7 Fulfilled --> Completed: delivered8 Fulfilled --> Refunded: return approved9 Cancelled --> [*]10 Completed --> [*]11 Refunded --> [*]Related
Related templates
More templates that cover similar workflows.