# gateway.transaction_processing.invalid_status

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


**gateway**

The operation failed because the transaction is in an invalid or unexpected status. This typically occurs when attempting actions like refunds on transactions that have not yet reached a finalized state, or when there are status synchronization issues.

## Recommended Customer Message

To proceed, your transaction needs to be completed successfully. Please verify that the transaction status is finalized. If you need help, contact our support team.

## Root Cause[](#root-cause)

-   **Premature refund attempt:** A refund was attempted before the transaction reached a finalized state.
-   **Incorrect status mapping:** The transaction's internal status was not updated correctly in the system.
-   **Integration logic errors:** Actions such as refunds or voids are triggered on transactions that are still pending authorization or processing.
-   **Asynchronous processing delays:** The status update from the gateway has not yet completed, leading to temporary mismatches.

## Troubleshooting and Solutions[](#troubleshooting-and-solutions)

-   Confirm that the transaction is in one of the allowed statuses: CAPTURED, SETTLED, or SETTLED\_BY\_MERCHANT.
-   Wait for the status to be updated if the transaction is still processing.
-   Review system logic to ensure downstream operations are triggered only after valid statuses are reached.
-   Ask the customer to retry the transaction later, if applicable.
-   Contact support if the transaction continues to fail despite appearing completed.

