> ## 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.

# iOS SDK Bank Card Verification

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

> [!WARNING]
>
> Bank card verification works from iOS SDK version 9.2.9.

## 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/ios/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:

```swift theme={"system"}
idenfyController.handleIdenfyCallbacksForBankCardVerification(bankCardVerificationResult: { bankCardVerificationResult in
    switch bankCardVerificationResult.bankCardVerificationStatus {
    case .SUCCESS:
        // The user completed the bank card verification flow and was successfully verified
        break
    case .FAILED:
        // The user completed the bank card verification flow but verification failed
        break
    case .EXIT:
        // The user did not complete the bank card verification flow
        break
    @unknown default:
        break
    }
})
```

### Initialize SDK

Pass the bank card verification token to start the flow:

```swift theme={"system"}
let bankCardVerificationInitialization = BankCardVerificationInitialization(
    bankCardVerificationToken: token
)

let idenfyController = IdenfyController.shared
idenfyController.initializeBankCardVerification(
    bankCardVerificationInitialization: bankCardVerificationInitialization
)

let idenfyVC = idenfyController.instantiateNavigationController()
present(idenfyVC, animated: true, completion: nil)
```

## 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.

```swift theme={"system"}
let bankCardVerificationInitialization = BankCardVerificationInitialization(
    bankCardVerificationToken: token,
    withImmediateRedirect: true
)
```

## UI Customization

The UI can be customized the same as the [KYC verification flow](https://documentation.idenfy.com/sdks/ios/ui-customization.md#customization-by-changing-views-from-idenfyviews-module). Common colors or ViewUISettings can be overridden:

```swift theme={"system"}
IdenfyCommonColors.idenfyMainColorV2 = UIColor.green
IdenfyCommonColors.idenfyMainDarkerColorV2 = UIColor.green
IdenfyCommonColors.idenfySecondColorV2 = UIColor.blue
```

Custom implementations of iDenfy viewables can also be passed to the **IdenfyController**:

```swift theme={"system"}
let idenfyViewsV2: IdenfyViewsV2 = IdenfyViewsBuilderV2()
    .build()

idenfyController.initializeBankCardVerification(
    bankCardVerificationInitialization: bankCardVerificationInitialization,
    idenfyViewsV2: idenfyViewsV2
)

let idenfyVC = idenfyController.instantiateNavigationController()
present(idenfyVC, animated: true, completion: nil)
```


## Related topics

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


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