Payment state machine
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 may have multiple payment states, (one for each payment).
Payment state machine is internal to Litium Studio, 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: 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 phase) 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 put to Processing.
If any of the payments fail and go into either Reserve failed or Direct payment failed statuses, order is automatically placed to "Attention" state.
If all payments are "Paid" and all deliveries are "Delivered" order is placed into "Completed" state automatically.