State Combinations
State combinations cases.
Understanding the various possible combination of Payment Transactions that are in the attempted state with the Payment-Attempts states is crucial. Let's simplify them:
For the payment transactions that allow multiple attempts, we encounter two combinations:
When a Payment Transaction is in the
attemptedstate, and the Payment-Attempt state iscanceledorfailed, the payment transaction state remainsattempted. That means the transaction is open for another attempt until it either expires (i.e.,expiredstate) or successfully reaches thepaidstate. In simple terms:attemptedstate for payment transaction ➕canceledorfailedstate for payment attempt ➡attemptedstate for payment transaction, until it changed toexpiredorpaid, and the payment transaction can be attempted againAlternatively, when a Payment Transaction is in the
attemptedstate and the Payment-Attempt succeeds (i.e.,successstate), the payment transaction progresses into thepaidorauthorizedstate. In simple terms:attemptedstate for payment transaction ➕successstate for payment attempt ➡paidorauthorizedstate for payment transaction.
For the payment transactions that do not allow multiple attempts:
Such transactions do not have an
attemptedstate. Instead, they can either be in afailedorauthorizedstate.
The following image sums it all up clearly:
