Feel free to reach techsupport@surepass.io for any technical support or guidance.
Environment | Base URL | Usage |
---|---|---|
UAT (Testing) | https://sandbox.surepass.app | For development and testing |
Production | https://kyc-api.surepass.app | For live applications |
Parameter | Type | Required | Description | Default Value |
---|---|---|---|---|
signup_flow | boolean | ✅ Required | This parameter should always be true for SDK initialization | true |
logo_url | string | ❌ Optional | Your branding logo URL - customize with your own logo | - |
skip_main_screen | boolean | ❌ Optional | Whether to show the first intro screen or skip it | true |
{
"data": {
"signup_flow": true,
"logo_url": "YOUR BRAND LOGO URL",
"skip_main_screen": false
}
}
token
: Authentication token for SDK initialization (expires in 600 seconds by default)client_id
: Unique identifier for tracking purposesexpiry_seconds
: Token validity durationtoken
value - you'll need this for Step 3!
Authorization
header as Bearer TOKEN
.https://sandbox.surepass.app
https://kyc-api.surepass.app
Header | Required | Description |
---|---|---|
Content-Type | Yes | Must be application/json |
Authorization | Yes | Bearer token obtained from sales manager |
Parameter | Type | Required | Description |
---|---|---|---|
data.prefill_options | Object | No | User information to prefill in the DigiLocker form |
data.prefill_options.full_name | String | No | User's full name to prefill (max 250 characters) |
data.prefill_options.mobile_number | String | No | User's mobile number to prefill |
data.prefill_options.user_email | String | No | User's email address to prefill |
data.signup_flow | Boolean | Yes | Set to true for new users (they must provide a PIN during registration). Set to false for existing DigiLocker users (proceeds with login). |
data.auth_type | String | No | Authentication type: 'web' or 'app' (default: 'web') |
data.verify_phone | Boolean | No | Whether to verify user's phone number (default: false) |
data.verify_email | Boolean | No | Whether to verify user's email address (default: false) |
data.allow_selection | Boolean | No | Allow document selection (readonly, default: false) |
data.redirect_url | String | No | URL to redirect user after DigiLocker authentication |
data.webhook_url | String | No | Webhook URL for receiving verification callbacks |
data.state | String | No | Custom state parameter for tracking the session (max 100 characters) |
data.local_frontend_url | String | No | Local frontend URL for development purposes |
data.aadhaar_xml | Boolean | No | Whether to include Aadhaar XML data (default: false) |
data.send_sms | Boolean | No | Whether to send SMS notifications to user (default: false) |
data.send_email | Boolean | No | Whether to send email notifications to user (default: false) |
data.expiry_minutes | Integer | No | Session expiry time in minutes (min: 5, max: 30, default: 30) |
data.voice_assistant | Boolean | No | Enable voice assistant feature (default: false) |
data.voice_assistant_lang | String | No | Voice assistant language: 'hi', 'en', or 'both' (default: 'en') |
data.retry_count | Integer | No | Number of retry attempts allowed (min: 1, max: 5, default: 1) |
data.skip_main_screen | Boolean | No | Skip the main introduction screen (default: false) |
data.logo_url | String | No | Custom logo URL for branding |
{
"data": {
"signup_flow": true,
"logo_url": "YOUR BRAND LOGO URL",
"skip_main_screen": false
}
}
{
"data": {
"signup_flow": true,
"redirect_url": "https://google.com",
"webhook_url": "https://webhook.site/a6f4fcec-5ac8-4c82-96ea-7eded59fd59a"
}
}
Parameter | Type | Description |
---|---|---|
data.client_id | String | Unique client identifier for the session |
data.token | String | JWT authentication token for SDK initialization |
data.expiry_seconds | Number | Token expiry time in seconds |
status_code | Integer | HTTP status code |
message_code | String | Internal message code |
message | String | Human-readable response message |
success | Boolean | Indicates if the request was successful |
{
"data": {
"client_id": "digilocker_cntWpMxWHbcvgghtyvxw",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiry_seconds": 600.0
},
"status_code": 200,
"message_code": "success",
"message": "Success",
"success": true
}
Note: This is the response sent to your webhook URL, not the API response.
{
"client_id": "digilocker_lbsfmoudALfjHnrowLCl",
"status": "success",
"type": "digilocker"
}
{
"status_code": 401,
"message": "Unauthorized",
"message_code": "auth_failed",
"success": false
}
Parameter | Type | Required | Description |
---|---|---|---|
gateway | string | ✅ | Environment specification - use "sandbox" for testing or "production" for live environment |
token | string | ✅ | Authentication token for the verification process |
selector | string | ❌ | CSS selector where the button should be mounted (defaults to body ) |
style | object | ❌ | Custom CSS styles to apply to the button |
onSuccess | function | ❌ | Callback function called on successful verification |
onFailure | function | ❌ | Callback function called on verification failure or cancellation |
{
"data": {
"client_id": "digilocker_CLIENT_ID",
"digilocker_metadata": {
"name": "John Doe",
"gender": "M",
"dob": "1990-01-01"
},
"aadhaar_xml_data": {
"full_name": "John Doe",
"care_of": "S/O Someone",
"dob": "1990-01-01",
"yob": "1990",
"zip": "123456",
"profile_image": "/9j/4AAQSk...",
"gender": "M",
"masked_aadhaar": "XXXXXXXX1234",
"full_address": "123 Main St, City, State, Country",
"father_name": "S/O Someone",
"address": {
"country": "India",
"dist": "Some District",
"state": "Some State",
"po": "Some PO",
"house": "123 Main St",
"loc": "Some Locality",
"vtc": "Some VTC",
"subdist": "Some Subdist",
"street": "Main St",
"landmark": "Near Landmark"
}
},
"xml_url": "https://aadhaar-kyc-docs.s3.amazonaws.com/.../ADHAR_XXXXXXXXXXXX.xml?..."
},
"status_code": 200,
"success": true,
"message": "Success",
"message_code": "success"
}
curl --location --request POST 'https://kyc-api.surepass.app/api/v1/digilocker/initialize' \
--header 'Content-Type: application/json' \
--data-raw '{
"signup_flow": true,
"logo_url": "YOUR BRAND LOGO URL",
"skip_main_screen": false
}'
{
"data": {
"client_id": "digilocker_cntWpMxWHbcvgghtyvxw",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiry_seconds": 600.0
},
"status_code": 200,
"message_code": "success",
"message": "Success",
"success": true
}