Payment state machine
The payment state machine defines the states and transitions of a payment. The user can get a clear idea of the stage a transaction is in by looking at the payment status.
In a single order there can be many payments, and therefore it may have multiple payment states, one for each payment. The payment state machine is internal to Litium, and can not be modified. This is due to security considerations of financial transactions.
There are four types of payment states.
- Initial state: State before any processing starts.
- Transition states: States used to track communication flows. A payment should not normally be in these states.
- Intermediate states: States that a payment can be in, before it is completed.
- End states: The final states a payment can be in.
The payment state flow will be based on the payment mode of the transaction. The payment mode is set in the checkout page settings.
Charge mode (one phased) payment state flow

Reserve mode (two phased) payment state flow

Automated transitions (related state transitions)
When the payment leaves the Init state, the order state is automatically set to Processing.
If any of the payments fail and go into either Reserve failed or Direct payment failed statuses, the order is automatically set to the Attention state.
If all payments are Paid and all deliveries are Delivered, the order is set to Completed automatically.