> For the complete documentation index, see [llms.txt](https://legacy-docs.usesmileid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://legacy-docs.usesmileid.com/integration-options/mobile/products/enhanced-kyc.md).

# Enhanced KYC

Performing an Enhanced KYC requires you to

1. Determine the ID type
2. Gather inputs relevant for that ID type
3. Call the Smile ID API

{% tabs %}
{% tab title="Android" %}
Steps 1 and 2 are part of your own UI. The potential data required is available as a model: `com.smileidentity.models.IdInfo`

Step 3 can be accomplished by calling either the synchronous or asynchronous API:

{% hint style="info" %}
The API requests require the use of [coroutines](https://developer.android.com/kotlin/coroutines) to avoid blocking the UI thread
{% endhint %}

```kotlin
val idInfo: IdInfo = ...
val authRequest = AuthenticationRequest(
    jobType = JobType.EnhancedKyc,
    enrollment = false,
    userId = randomUserId(),
)
val authResponse = SmileID.api.authenticate(authRequest)
val enhancedKycRequest = EnhancedKycRequest(
    partnerParams = authResponse.partnerParams,
    signature = authResponse.signature,
    timestamp = authResponse.timestamp,
    country = idInfo.country,
    idType = idInfo.idType,
    idNumber = idInfo.idNumber ?: throw IllegalArgumentException("ID Number required"),
    firstName = idInfo.firstName,
    lastName = idInfo.lastName,
    dob = idInfo.dob,
    bankCode = idInfo.bankCode,
)
val response = SmileID.api.doEnhancedKyc(enhancedKycRequest)
```

{% endtab %}

{% tab title="iOS" %}
Steps 1 and 2 are part of your own UI. The potential data required is available as a model: `EnhancedKycRequest`

Step 3 can be accomplished by calling the API (currently, only the Asynchronous endpoint is available. This requires you to include a `callback_url` in the request):

**Usage**

```swift
let request = EnhancedKycRequest(...)
SmileID.api.authenticate(...)
SmileID.api.doEnhancedKycAsync(...)
SmileID.api.pollJobStatus(...)
```

{% endtab %}

{% tab title="Flutter" %}
Steps 1 and 2 are part of your own UI. The potential data required is available as a model: `FlutterEnhancedKycRequest`

Step 3 can be accomplished by calling the API (currently only the Asynchronous API is available. This requires you to include a `callback_url` in your request):

```dart
FlutterAuthenticationRequest authRequest = FlutterAuthenticationRequest(...);
FlutterEnhancedKycRequest eKycRequest = FlutterEnhancedKycRequest(...);
SmileID.authenticate(authRequest)
    .then((value) => SmileID.doEnhancedKycAsync(eKycRequest));
```

{% endtab %}

{% tab title="React Native" %}
{% hint style="info" %}
:warning: **Note:** Recommend wrapping this in a component that can be navigated to and out of view due to a known issue with views displaying dialogs particularly on failure and the dialog keeps showing,
{% endhint %}

Steps 1 and 2 are part of your own UI. The potential data required is available as a model: `FlutterEnhancedKycRequest`

Step 3 can be accomplished by calling the API (currently only the Asynchronous API is available. This requires you to include a `callback_url` in your request):

```typescript
const eKycRequest = EnhancedKycRequest(...);
SmileID.doEnhancedKyc(eKycRequest);
```

{% endtab %}
{% endtabs %}

### Asynchronous Enhanced KYC

You may also want to perform an Enhanced KYC asynchronously. For this, you will receive the results *only* to your callback URL. To do this, you *must:*

* Include a value for `callbackUrl` in your `EnhancedKycRequest`.
* Call `SmileID.api.doEnhancedKycAsync` instead


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://legacy-docs.usesmileid.com/integration-options/mobile/products/enhanced-kyc.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
