@startuml

Pending: Order is expecting payment\nOrder reduces quotas
Expired: Payment period is over\nOrder does not affect quotas
Paid: Order was successful\nOrder reduces quotas
Cancelled: Order has been cancelled\nOrder does not affect quotas
Refunded: Order has been refunded\nOrder does not affect quotas

[*] --> Pending: customer\nplaces order
Pending --> Paid: successful payment
Pending --> Expired: automatically\nor manually\non admin action
Expired --> Paid: if payment is received\nonly if quota left
Expired --> Cancelled
Paid --> Refunded: manually on\nadmin action\nor if an external\npayment provider\nnotifies about a\npayment refund
Pending --> Cancelled: on admin or\ncustomer action
Paid -> Pending: manually on admin action

@enduml
