> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.idenfy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Android SDK Bank Card Verification

> Implement bank card verification in your Android app using the iDenfy SDK to verify ownership of a bank card in a standalone flow.

> [!WARNING]
>
> Bank card verification works from Android SDK version 9.2.4.

## Introduction

Bank card verification is a standalone flow that allows your users to verify ownership of a bank card. The user is guided through capturing the front and back of their bank card, which is then verified by the iDenfy platform.

## Pre-Conditions

A bank card verification token must be obtained before initializing the flow. See the [Create a Bank Card Session](https://documentation.idenfy.com/bank-card/create-session.md) documentation.

## Getting Started

Follow the [iDenfy SDK integration guide](https://documentation.idenfy.com/sdks/android/quickstart.md), which is required for bank card verification as well.

After completing the steps and the application **compiles successfully**, you are ready to implement **bank card verification specific** logic.

### Handle Callback in SDK

Implement the result handling in the SDK:

```Kotlin theme={"system"}
private var identificationResultsCallback = registerForActivityResult(
    ActivityResultContracts.StartActivityForResult()
) { result: ActivityResult ->
    val resultCode = result.resultCode
    val data = result.data

    if (resultCode == IdenfyController.IDENFY_BANK_CARD_VERIFICATION_RESULT_CODE) {
        val bankCardVerificationResult: BankCardVerificationResult =
            data!!.getParcelableExtra(IdenfyController.IDENFY_BANK_CARD_VERIFICATION_RESULT)!!
        when (bankCardVerificationResult.bankCardVerificationStatus) {
            BankCardVerificationStatus.SUCCESS -> {
                // The user completed the bank card verification flow and was successfully verified
            }
            BankCardVerificationStatus.FAILED -> {
                // The user completed the bank card verification flow but verification failed
            }
            BankCardVerificationStatus.EXIT -> {
                // The user did not complete the bank card verification flow
            }
        }
    }
}
```

### Initialize SDK

Pass the bank card verification token to start the flow:

```Kotlin theme={"system"}
val bankCardVerificationInitialization = BankCardVerificationInitialization(token)
IdenfyController.getInstance().initializeBankCardVerificationSDK(
    this,
    identificationResultsCallback,
    bankCardVerificationInitialization
)
```

## Callback Status Reference

### bankCardVerificationStatus

| Name | Description |
| - | - |
| `SUCCESS` | The user completed the bank card verification flow and the verification status is SUCCESS. |
| `FAILED` | The user completed the bank card verification flow and the verification status is FAILED. |
| `EXIT` | The user did not complete the bank card verification flow and exited. |

## Customization

### Immediate Redirect

You can pass an additional boolean to set the immediate redirect feature. This controls whether you **receive results immediately** from the SDK without any additional result pages.

The user completes the verification, a loading state appears and closes -- without showing the final status screen.

```Kotlin theme={"system"}
val bankCardVerificationInitialization = BankCardVerificationInitialization(token, true)
```

## UI Customization

The UI can be customized the same as the [KYC verification flow](https://documentation.idenfy.com/sdks/android/ui-customization.md). Main [colors or styles](https://documentation.idenfy.com/sdks/android/ui-customization.md#customization-with-overriding-layouts-of-sdk) in the **styles.xml** or **colors.xml** files of your app target can be overridden, as well as the [layouts](https://documentation.idenfy.com/sdks/android/ui-customization.md#customization-with-overriding-layouts-of-sdk).

### Color Scheme

The `IdenfyColorScheme` class lets you override SDK colors programmatically from Kotlin -- no XML changes required. Create an instance, set the colors you want to change, and pass it via `IdenfyBankCardVerificationUISettings`:

```Kotlin theme={"system"}
val colorScheme = IdenfyColorScheme().apply {
    idenfyMainColorV2 = "#A50000".toColorInt()
    idenfyMainDarkerColorV2 = "#820000".toColorInt()
    idenfyBackgroundColorV2 = Color.BLACK
}

val bcvUISettings = IdenfyBankCardVerificationUISettings.IdenfyBankCardVerificationUIBuilder()
    .withColorScheme(colorScheme)
    .build()

val bankCardVerificationInitialization = BankCardVerificationInitialization(
    bankCardVerificationToken = token,
    idenfyBankCardVerificationUISettings = bcvUISettings
)

IdenfyController.getInstance().initializeBankCardVerificationSDK(
    this,
    identificationResultsCallback,
    bankCardVerificationInitialization
)
```

For the complete color property list, see the [UI Customization - Color Scheme](https://documentation.idenfy.com/sdks/android/ui-customization.md#customization-with-color-scheme) documentation.

Find colors, styles, and layouts in the [repository](https://github.com/idenfy/iDenfyResources/tree/main/sdk/android/).


## Related topics

- [Android SDK Additional Features](https://documentation.idenfy.com/sdks/android/additional-features.md)
- [Bank Card Verification](https://documentation.idenfy.com/guides/dashboard/features/bank-card-verification.md)
- [Android SDK Migration Guide](https://documentation.idenfy.com/sdks/android/migration-guide.md)
- [iOS SDK Bank Card Verification](https://documentation.idenfy.com/sdks/ios/bank-card-verification.md)
- [iOS SDK Migration Guide](https://documentation.idenfy.com/sdks/ios/migration-guide.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.