Onboarding with ID

Register a new user with document verification — OCR on the ID plus a 1:1 face match against the document photo.

SDK Installation

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

POST /api/kyc/onboard
When to use this flow

Account opening, user registration, card activation — any onboarding case where you need to verify the user against a physical document.

Flow

1

Environment validation

RASP checks before any capture.

2

Face capture

Face capture with liveness check.

3

Document capture

OCR on the government-issued ID and 1:1 face match against the document photo.

4

Encrypted payload

The SDK returns template + payload (face + document data).

5

Onboard request

Your backend forwards template + payload + DNI to /api/kyc/onboard.

SDK call

Kotlin
// Onboarding flow — also scans the ID document
SmartId
    .getInstance()
    .captureBiometric(getApplicationContext())
    .withDocument()
    .onSuccess { template, payload ->
        // template + payload include the face capture
        // AND the OCR data from the document
    }
    .onFailure { message, errorCode ->
        // capture failed — surface a retry to the user
    }
    .start()
Swift
SID.shared.startLocation()

SID.shared
    .captureBiometric()
    .withDocument()
    .onSuccess(success: { template, payload in
        // face + document captured
    })
    .onFailure(failure: { message, errorCode in
        // capture failed
    })
    .start()

Backend call

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

Request body

FieldTypeRequiredDescription
UserstringRequiredUnique user identifier
DNIstringRequiredGovernment-issued ID number
TemplatestringRequiredEncrypted biometric template from the SDK
PayLoadstringRequiredDocument data + metadata from the SDK
OverWritestringOptional"true" to replace an existing enrollment for the user

Response codes

CodeMeaning
200Onboarding successful
403User or DNI cannot be null or empty
407Template validation failed
408User already enrolled
412Template format invalid
413Face↔document similarity below threshold
420No valid data extracted from document
421Failed to generate template from document image
425/426Timestamp invalid / template expired
500/701Internal error / service call error