# Flow error codes
See the definitions of the error codes you may receive when integrating [Flow](https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-website.md).
| Error | Description |
| --- | --- |
| `browser_environment_required` | Flow was loaded in a non-browser environment.
You should only load and execute Flow client-side.
If your integration involves server-side rendering or automated testing, ensure the [Window](https://developer.mozilla.org/en-US/docs/Web/API/Window) object exists before you load Flow. |
| `callback_result_invalid` | The result returned in a callback execution was invalid.
If you provide a custom callback, ensure it returns a result.
Flow supports `Promises` returned in callbacks, in addition to direct results. |
| `component_already_mounted` | Flow has already been mounted to DOM with `mount()` and cannot be mounted again.
If you need to mount Flow again because the checkout page changed, use the `unmount()` method first before you call `mount()` again. |
| `component_invalid` | The payment request was submitted with the `submit()` method before the customer had provided all of the details required by the chosen payment method.
If you're rendering a custom pay button and passed `showPayButton: false` when you created the `FlowComponent`, check that the customer inputs are valid with the `isValid()` method before you submit a payment request. |
| `component_is_available_not_checked` | The `isAvailable()` method was not called before mounting the `FlowComponent` with `mount()`. The component may not be supported by the customer device.
After you create the `FlowComponent`, call the `isAvailable()` method to verify that the payment method is supported by the customer device. This does not apply to a `FlowComponent` of type `payments`. |
| `component_not_supported` | The name specified when creating the `FlowComponent` using the `create()` method is not supported.
If you are providing `enabled_payment_methods` or `disabled_payment_methods` options when you [create the payment session](https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-website/get-started-with-flow.md#Create_a_new_Payment_Session_), ensure you also include the payment method that you want to offer.
You should also ensure that the `currency` and `billing.address.country` values provided to the payment session match the payment method's requirements. |
| `element_not_found` | The [Element selector](https://developer.mozilla.org/en-US/docs/Web/API/Element) or [DOM object](https://developer.mozilla.org/en-US/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors) you provided when calling the `mount()` method could not be found.
Ensure the Element selector you provide to the `mount()` method is already mounted to the DOM. Alternatively, you can query for the DOM object and provide the reference when you call `mount()`. |
| `payment_method_attempt_failed` | The payment attempt for the payment method specified in `details.type` failed due to an unexpected failure.
Unexpected failures may occur when Flow integrates with a payment method's client-side library, or makes network requests to the payment method's endpoints.
If you persistently encounter the error for a specific payment method, this could be caused by your account configuration. For example, incomplete onboarding to a payment method. Contact your account manager or [request support](https://dashboard.checkout.com/support?topic=case_transactions). |
| `payment_request_declined` | The payment request was declined.
The payment's ID is provided in the `details.paymentId` property. You can fetch the details of the payment by performing a [Get payment details](https://www.checkout.com/docs/payments/manage-payments/get-payment-details.md) request or searching for the payment record in the Dashboard.
The `details.requestErrorCodes` property will contain one of the following error codes:
- `not_enough_funds` – The customer has insufficient funds for the transaction.
- `invalid_payment_session_data` – You provided invalid details when creating the payment session. See the [API reference](https://api-reference.checkout.com/tag/Flow/#operation/CreatePaymentSession) for additional field details.
- `invalid_customer_data` – The customer provided invalid details.
- `merchant_misconfiguration` – Your account has invalid configurations.
- `try_again` – The payment request was declined due to technical issues. Contact your account manager or [request support](https://dashboard.checkout.com/support/new?topic=case_account_management_and_access&issue=issue_account_changes).
Flow automatically displays error messages to the customer, with suggested next actions to improve retry success. |
| `payment_request_failed` | The payment request failed due to unexpected error or network issue.
Any additional error codes from the network requests will be provided in the `details.requestErrorCodes` property. See the possible [error codes](https://www.checkout.com/docs/developer-resources/codes/error-codes.md#Payments_endpoint) for the Payment endpoint for more details.
Customers can typically complete their payment after a retry.
If you persistently encounter the error for a specific payment method, this could be caused by your account configuration. Contact your account manager or [request support](https://dashboard.checkout.com/support?topic=case_transactions). |
| `payment_session_invalid` | The payment session response provided when initializing `CheckoutWebComponent` was invalid.
After you create a payment session in your server-side integration, ensure you return the entire payment session response object to the client-side and provide it to Flow. |
| `update_parameters_invalid` | The `updateDetails` passed to the `CheckoutWebComponents.update()` [method](https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-website/flow-library-reference/checkoutwebcomponents.md#update(updateDetails)) contains invalid fields or values. |