> For the complete documentation index, see [llms.txt](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide-proposal/payment/payment-recording-and-management/payment-states/state-combinations.md).

# State Combinations

State combinations cases.

Understanding the various possible combination of Payment Transactions that are in the <mark style="color:orange;">`attempted`</mark> state with the Payment-Attempts states is crucial. Let's simplify them:

## [Multi-Attempt Transactions ](#multi-attempt-transactions)

**For the payment transactions that allow multiple attempts, we encounter two combinations:**

* When a Payment Transaction is in the <mark style="color:orange;">`attempted`</mark> state, and the Payment-Attempt state is <mark style="color:red;">`canceled`</mark> or <mark style="color:red;">`failed`</mark>, the payment transaction state remains <mark style="color:orange;">`attempted`</mark>. That means the transaction is open for another attempt until it either expires (i.e., <mark style="color:red;">`expired`</mark> state) or successfully reaches the <mark style="color:green;">`paid`</mark> state.\
  **In simple terms:**\ <mark style="color:orange;">`attempted`</mark> state for payment transaction ➕ <mark style="color:red;">`canceled`</mark> or <mark style="color:red;">`failed`</mark> state for payment attempt ➡ <mark style="color:orange;">`attempted`</mark> state for payment transaction, until it changed to <mark style="color:red;">`expired`</mark> or <mark style="color:green;">`paid`</mark>, and the payment transaction can be attempted again
* Alternatively, when a Payment Transaction is in the <mark style="color:orange;">`attempted`</mark> state and the Payment-Attempt succeeds (i.e., <mark style="color:blue;">`success`</mark> state), the payment transaction progresses into the <mark style="color:green;">`paid`</mark> or <mark style="color:green;">`authorized`</mark> state.\
  **In simple terms:**\ <mark style="color:orange;">`attempted`</mark> state for payment transaction ➕ <mark style="color:blue;">`success`</mark> state for payment attempt ➡ <mark style="color:green;">`paid`</mark> or <mark style="color:green;">`authorized`</mark> state for payment transaction.

## [Single-Attempt Transaction](#single-attempt-transaction)

For the payment transactions that do not allow multiple attempts:

* Such transactions do not have an <mark style="color:orange;">`attempted`</mark> state. Instead, they can either be in a <mark style="color:red;">`failed`</mark> or <mark style="color:green;">`authorized`</mark> state.

The following image sums it all up clearly:

<figure><img src="https://content.gitbook.com/content/uvuyQluEi5QMHcp2TcU7/blobs/7Ib0RXeyIJm321VAVuXw/image.png" alt=""><figcaption></figcaption></figure>
