Biometric Enrollment

Register a user's face template once they're already trusted upstream.

SDK Installation

Before integrating, install the SDK in Getting Started → Install the SDK →

POST /api/kyc/enroll

Flow

1

Environment validation

The SDK runs RASP checks (device, network, location) before starting the capture.

2

Face capture

The capture component runs liveness (active or passive) and generates the biometric template.

3

Encrypted payload

The SDK returns the encrypted template + payload to your banking app.

4

Register request

Your backend forwards template + payload to /api/kyc/enroll.

SDK call

Kotlin
// Just before submitting enrollment
SmartId
    .getInstance()
    .captureBiometric(getApplicationContext())
    .onSuccess { template, payload ->
        // template: encrypted face template
        // payload:  SDK metadata
        // forward both to your backend
    }
    .onFailure { message, errorCode ->
        // capture failed — surface a retry to the user
    }
    .start()
Swift
SID.shared.startLocation()

SID.shared
    .captureBiometric()
    .onSuccess(success: { template, payload in
        // template: encrypted face template
        // payload:  SDK metadata
    })
    .onFailure(failure: { message, errorCode in
        // capture failed — surface a retry to the user
    })
    .start()

Backend call

cURL
curl -X POST https://<api-url>/api/kyc/enroll \\
  -H "Content-Type: application/json" \\
  -H "X-Api-Key: <your-api-key>" \\
  -d '{
    "User": "[email protected]",
    "Template": "<template from SDK>",
    "PayLoad": "<payload from SDK>",
    "OverWrite": "true"
  }'

Request body

FieldTypeRequiredDescription
UserstringRequiredUnique user identifier
TemplatestringRequiredEncrypted biometric template from the SDK
PayLoadstringRequiredAdditional metadata from the SDK
OverWritestringOptional"true" to replace an existing enrollment for the user

Response codes

CodeMeaning
200Enrollment successful
403User cannot be null or empty
407Template validation failed
408User already enrolled (send OverWrite=true to replace)
412Template format invalid
425/426Timestamp invalid / template expired
500/701Internal error / service call error

Un-enroll

Removes a user's biometric enrollment so they can re-enroll from scratch. Useful for customer-requested resets or after a device change.

POST /api/kyc/unenroll
cURL
curl -X POST https://<api-url>/api/kyc/unenroll \\
  -H "Content-Type: application/json" \\
  -H "X-Api-Key: <your-api-key>" \\
  -d '{ "User": "[email protected]" }'

Response codes

CodeMeaning
200Un-enroll successful
403User cannot be null or empty
406User not found
410User channel not found
500/701Internal error / service call error