# CheckoutError The Flow `CheckoutError` class extends the standard JavaScript `Error` class and contains the following properties: | Property | Type | Description | | --- | --- | --- | | `message` | `string` | A human-readable description of the error.

The description is subject to change. For example, to improve clarity. To ensure you catch errors correctly, you must reference the values returned by the `type` and `code` fields instead. | | `name` | `string` | The error class name.

This will always return `CheckoutError`. | | `type` | `string` | The type of error encountered, as one of the following values:

- [Integration](#Integration_errors)
- [PaymentMethod](#Payment_method_errors)
- [Request](#Request_errors)
- [Submit](#Submit_errors)
- [Validation](#Validation_errors) | | `code` | `string` | A code representing the error.

For more information on how to resolve the errors, see [Error codes](https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-website/flow-library-reference/flow-error-codes.md). | | `details` | `object` | Additional error properties.

All error types provide the following properties in the `details` object:

- `browserSessionId`
- `paymentSessionId`
- `type`

Errors of type `Integration` and `Request` provide additional properties. | --- ## Integration errors Integration errors are caused by an invalid use of the Flow Components library. Errors of type `Integration` contain the following properties within the `details` object: | Property | Type | Description | | --- | --- | --- | | `browserSessionId` | `string` | The unique identifier of the browser session that created the `FlowComponent`. | | `paymentSessionId` | `string` | The unique identifier of the provided [payment session response](https://api-reference.checkout.com/tag/Flow/#operation/CreatePaymentSession!c=201&path=id&t=response). | | `type` | `string` | The name of the payment method used for the payment. | | `element` | `string` | 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) that caused the mounting error.

This property is only returned for errors with an `element_not_found` error code. | --- ## Payment method errors Payment method errors are caused by unexpected failures when integrating a payment method's client-side library. Errors of type `PaymentMethod` contain the following properties within the `details` object: | Property | Type | Description | | --- | --- | --- | | `browserSessionId` | `string` | The unique identifier of the browser session that created the `FlowComponent`. | | `paymentSessionId` | `string` | The unique identifier of the provided [payment session response](https://api-reference.checkout.com/tag/Flow/#operation/CreatePaymentSession!c=201&path=id&t=response). | | `type` | `string` | The name of the payment method used for the payment. | --- ## Request errors Request errors are caused by network request failures. Errors of type `Request` contain the following properties within the `details` object: | Property | Type | Description | | --- | --- | --- | | `browserSessionId` | `string` | The unique identifier of the browser session that created the `FlowComponent`. | | `paymentSessionId` | `string` | The unique identifier of the provided [payment session response](https://api-reference.checkout.com/tag/Flow/#operation/CreatePaymentSession!c=201&path=id&t=response). | | `type` | `string` | The name of the payment method used for the payment. | | `paymentId` | `string` | The unique identifier for the declined [payment request](https://api-reference.checkout.com/tag/Payments/#operation/requestAPaymentOrPayout!c=201&path=id&t=response). | | `requestErrorCodes` | Array of `strings` | Additional error codes returned from the network request. | | `requestId` | `string` | The unique identifier for the network request. | | `status` | `number` | The [HTTP response status code](https://www.checkout.com/docs/developer-resources/codes/api-response-codes.md#HTTP_status_codes) for the network request. | --- ## Submit errors Submit errors are caused by invalid attempts to submit a payment request. For example, if you call the `submit()` method before the customer has completed all of the required input fields. Errors of type `Submit` contain the following properties within the `details` object: | Property | Type | Description | | --- | --- | --- | | `browserSessionId` | `string` | The unique identifier of the browser session that created the `FlowComponent`. | | `paymentSessionId` | `string` | The unique identifier of the provided [payment session response](https://api-reference.checkout.com/tag/Flow/#operation/CreatePaymentSession!c=201&path=id&t=response). | | `type` | `string` | The name of the payment method used for the payment. | --- ## Validation errors Validation errors are caused by invalid fields or values in 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)). Errors of type `Validation` contain the following properties within the `details` object: | Property | Type | Description | | --- | --- | --- | | `browserSessionId` | `string` | The unique identifier of the browser session that created the `FlowComponent`. | | `paymentSessionId` | `string` | The unique identifier of the provided [payment session response](https://api-reference.checkout.com/tag/Flow/#operation/CreatePaymentSession!c=201&path=id&t=response). | | `type` | `string` | The name of the payment method used for the payment. | | `validationErrors` | `object` | Describes the error for each `updateDetails` field that has validation issues. |