# Error codes
See the definitions of the error codes you may receive when integrating Flow for mobile.
| Error | Description |
| --- | --- |
| `base64EncodingFailed` | Encoding the `sessionData` passed to the `handleSubmit` callback failed. |
| `callbackNotProvided` | You must provide the `onTokenized()` [callback](https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-mobile-app/flow-for-mobile-library-reference/ios/componentcallback.md#onTokenized(TokenDetails)) before you call the `tokenize()` [method](https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-mobile-app/flow-for-mobile-library-reference/ios/actionable.md#tokenize()). |
| `cardAuthenticationFailed` | The 3DS authentication challenge did not complete for a card payment. This error occurs when the customer dismisses the challenge before it finishes, for example, by swiping away the challenge sheet.
The `message` property contains `"User dismissed 3DS page"`. |
| `componentInvalid` | The selected component's inputs are invalid.
For the `Flow` component, this is also called if there are no embedded components selected. |
| `componentIsAvailableNotChecked` | The `isAvailable()` method was not called before rendering the `Component`.
The component may not be supported by the customer's device. After you create the `Actionable`, call the `isAvailable()` method to verify that the device supports the payment method. This does not apply to the `CheckoutComponent`. |
| `componentNotSupported` | The name specified when creating the `Actionable` using the `create()` method is not supported.
If you provide `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-mobile-app/get-started-with-flow-for-mobile.md#Create_a_new_Payment_Session_), ensure you also include the payment method that you want to offer.
You must also ensure that the `currency` and `billing.address.country` values you provide to the payment session match the payment method's requirements. |
| `configurationInvalid` | The `Configuration` provided when initializing Flow for mobile was invalid. After you create a payment session in your server-side integration, ensure you return the public key and the entire payment session response object to the client-side and provide it to Flow for mobile. |
| `invalidSetup` | The SDK was initialized or invoked with an invalid setup. For example:
- Missing or malformed `publicKey`
- Missing or partial payment session
- Calling methods in the wrong order
- Using unsupported configuration combinations
Review your initialization of Flow for Mobile and payment session payload, then re-create the session and retry. |
| `merchantHandleSubmitCallbackFailed` | The payment session submission using the `handleSubmit` callback failed. |
| `merchantRejectedTokenDetails` | The merchant rejected the token using the `onTokenized` callback. |
| `methodNotSupported` | The `tokenize()` method is not supported for the selected component.
For the `Flow` component, this is also called if a card component is not embedded. |
| `paymentCancelled` | The payment attempt was cancelled before completion. For example, the customer closed the Apple Pay screen. |
| `paymentMethodAttemptFailed` | The payment attempt for the payment method specified in `details.type` encountered 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/new?topic=case_integration&issue=case_integration_issue_other). |
| `paymentRequestDeclined` | The payment request was declined. This error occurs in one of the following situations:
- The payment session was declined – The payment's ID is provided in the `details.paymentId` property. You can fetch the details of the payment by calling the [Get payment details](https://www.checkout.com/docs/payments/manage-payments/get-payment-details.md) endpoint, or searching for the payment record in the Dashboard. The `paymentRequestDeclined` enum case contains one of the following messages:
- `not_enough_funds` – The customer does not have enough 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 for mobile automatically displays these error messages to the customer, with suggested next actions to improve retry success.
- The customer completes the 3DS challenge, but the payment was declined – The SDK reports this through the `paymentRequestDeclined` error and provides the reason in the `error.message`:
- If a decline reason exists, `error.message` returns `The payment request was declined. Decline reason: `.
- If no decline reason exists, `error.message` returns `The payment request was declined`.
Display a generic, localized message to the customer. The `` value (for example, `insufficient_funds`, or `do_not_honor`) is the decline reason response from the issuer or acquirer. Use it for internal purposes only. |
| `paymentRequestFailed` | The payment request failed due to an unexpected error or network issue.
Any additional error codes from the network requests are 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 Request a payment endpoint for more information.
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/new?topic=case_account_management_and_access&issue=issue_account_changes). |
| `paymentSessionFailed` | The payment session request failed due to an unexpected error or network issue. If you persistently encounter this error for a specific payment method, contact your account manager or [request support](https://dashboard.checkout.com/support/new?topic=case_account_management_and_access&issue=issue_account_changes). |
| `serverCommunicationError` | A required backend response could not be retrieved due to a network or server issue.
Check connectivity and server availability, inspect any attached request error details, and retry. If the issue persists, contact your account manager or [request support](https://dashboard.checkout.com/support/new?topic=case_account_management_and_access&issue=issue_account_changes). |
| `tokenizeRequestFailed` | The CVV component's tokenization request failed. The `message` property contains `"CVV tokenize request failed: {message}"`, or `"CVV tokenize request failed"` when the failure carries no message. |
| `updateParametersInvalid` | The `updateDetails` passed to the `CheckoutComponents.update()` method contains invalid values. |
| `validationFailed` | One or more input values failed client-side validation for the selected component. Ensure all required fields are present and correctly formatted, update the inputs, and retry the operation. |