### Install InContext SDK Source: https://devdocs.veriff.com/docs/incontext-sdk-1 Install the InContext SDK package using npm. This is the first step to integrating Veriff's verification flow. ```bash npm install @veriff/incontext-sdk ``` -------------------------------- ### POST /sessions Payload Example Source: https://devdocs.veriff.com/docs/us-database-verification Example cURL command for creating a verification session with user data provided via initData. ```bash curl -X POST \ --url '/v1/sessions/' \ -H 'Content-Type: application/json' \ -H 'X-AUTH-CLIENT: API-KEY' \ -d '{ "verification": { "callback": "https://veriff.com", "person": { "firstName": "John", "lastName": "Smith", "dateOfBirth": "1980-01-01", "phoneNumber": "88888888888", }, "address": { "fullAddress": "Lorem Ipsum 30, 13612 Tallinn, Estonia" }, } }' ``` -------------------------------- ### Install JS SDK via Package Manager Source: https://devdocs.veriff.com/docs/javascript-sdk-1 Install the Veriff JS SDK using npm for use in your project. ```bash $ npm install --save @veriff/js-sdk ``` -------------------------------- ### Install Dependencies for Webhook Listener Source: https://devdocs.veriff.com/docs/webhooks-guide Install the necessary Node.js packages, express and body-parser, for your webhook listener. ```bash npm install express body-parser ``` -------------------------------- ### GET /decision API Call Example Source: https://devdocs.veriff.com/docs/selfie2selfie-biometric-verification This section provides an example of the GET /decision API call payload, highlighting mandatory parameters for a Selfie2Selfie Biometric Verification session. Additional parameters may be required based on integration configuration. Refer to the GET sessions/{sessionId}/decision documentation for more details. ```APIDOC ## GET /decision ### Description Retrieves the decision and details of a biometric verification session. ### Method GET ### Endpoint /decision ### Parameters This endpoint primarily uses query parameters or session IDs to fetch decision data. The example below focuses on the response structure. ### Response #### Success Response (200) - **status** (string) - Status of the response. - **verification** (object) - Verification request decision object. `null` if decision is not available yet. - **id** (string) - UUID v4 which identifies the verification session. - **attemptId** (string) - UUID v4 of the attempt which received a status. - **vendorData** (string | null) - The unique identifier that you created for your end-user. - **endUserId** (string | null) - The `UUID` that you created for your end-user. - **status** (string) - Verification status, one of `approved`, `declined`, `resubmission_requested`, `review`, `expired`, `abandoned`. - **code** (integer) - Verification session decision code. - **reason** (string | null) - Reason why the verification failed. - **reasonCode** (integer | null) - Reason code of the failed verification. - **decisionTime** (string | null) - Timestamp of the decision, represented as `UTC YYYY-MM-DDTHH:MM:SS.SSS+Timezone Offset` (ISO 8601). - **acceptanceTime** (string) - Timestamp of the session generation, represented as `UTC YYYY-MM-DDTHH:MM:SS.SSS+Timezone Offset` (ISO 8601). - **submissionTime** (string) - Timestamp of when the session was submitted, represented as `UTC YYYY-MM-DDTHH:MM:SS.SSSSSS+Timezone Offset` (ISO 8601). - **person** (object) - Data about the verified person. - **firstName** (string | null) - Person's first name as written on the document. - **lastName** (string | null) - Person's last name as written on the document. - **dateOfBirth** (string) - Person’s date of birth, represented as `YYYY-MM-DD`. - **gender** (string | null) - Person’s gender, represented as M or F, or `null` if not present. - **nationality** (string | null) - Person’s nationality, represented as ISO 3166 `alpha-2` or `alpha-3` number. - **idNumber** (string | null) - National identification number. - **yearOfBirth** (string | null) - Person’s year of birth, represented as `YYYY`. - **placeOfBirth** (string | null) - Person’s place of birth. - **document** (object) - Verified document. - **number** (string | null) - Document number, `[a-zA-Z0-9]` characters only. - **type** (string | null) - Document type, one of `PASSPORT`, `ID_CARD`, `RESIDENCE_PERMIT`, `DRIVERS_LICENSE`, `VISA`, `OTHER`. - **country** (string | null) - Document issuing country, represented as ISO 3166 `alpha-2` code. - **state** (string | null) - Document issuing state, represented as ISO 3166 `alpha-2` or `alpha-3` code. - **remarks** (string) - Data extracted from document’s remarks field. - **additionalVerifiedData** (object) - Data that has been optionally verified for the session. - **faceMatch** (string) - Indicates the result of the reference image and selfie matching, one of `strong_match`, `possible_match`, `weak_match`. - **comments** (Deprecated) - Always returns empty []. - **technicalData** (object) - Technical data object. - **ip** (string | null) - IP of the device from which the verification was made. ### Request Example (No request example provided for this endpoint in the source material) ### Response Example ```json { "status": "success", "verification": { "id": "f04bdb47-d3be-4b28-b028-a652feb060b5", "attemptId": "fd5c1563-1d23-4b1a-ae46-7ba429927ed8", "code": 9001, "status": "approved", "reason": null, "reasonCode": null, "vendorData": "12345678", "endUserId": "a1b2c35d-e8f7-6d5e-3cd2-a1b2c35db3d4", "acceptanceTime": "2025-01-15T10:30:00.000Z", "submissionTime": "2025-01-15T10:31:00.000Z", "decisionTime": "2025-01-15T10:32:22.123Z", "person": { "firstName": "YAGO", "lastName": "FERRERAS", "dateOfBirth": null, "gender": null, "nationality": null, "idNumber": null, "yearOfBirth": null, "placeOfBirth": null }, "document": { "number": null, "type": null, "country": null, "state": null, "remarks": null }, "additionalVerifiedData": { "faceMatch": "strong_match" }, "comments": [] }, "technicalData": { "ip": "186.153.67.122" } } ``` ``` -------------------------------- ### Launch SDK with Appropriate Branding Source: https://devdocs.veriff.com/docs/ios-sdk-guide Select the branding configuration based on the detected system theme and launch the Veriff SDK. Ensure you provide a valid session URL, the configuration, and the presenting view controller. ```swift // Select branding based on system theme let branding = isDarkMode ? darkBranding : lightBranding // Create configuration with selected branding let configuration = VeriffSdk.Configuration(branding: branding, languageLocale: nil) // Launch SDK VeriffSdk.shared.startAuthentication( sessionUrl: sessionUrl, configuration: configuration, presentingFrom: viewController ) ``` -------------------------------- ### CPF Biometric Database Check - GET /decision Source: https://devdocs.veriff.com/docs/cpf-biometric-database-check This section provides an example of the GET /decision API call payload for a CPF Biometric Database Check session. It highlights mandatory parameters and references additional documentation for optional parameters. ```APIDOC ## GET /decision ### Description This endpoint retrieves the decision for a CPF Biometric Database Check session. It is used to obtain the verification status and related details after a session has been processed. ### Method GET ### Endpoint /decision ### Parameters This endpoint primarily relies on session context and may not have explicit query parameters documented here. Refer to the linked documentation for session-specific details. ### Request Example (No request body is typically sent for a GET request. Parameters are usually part of the URL or session context.) ### Response #### Success Response (200) - **status** (string) - Indicates the overall status of the request, e.g., "success". - **verification** (object) - Contains detailed information about the verification process. - **id** (string) - Unique identifier for the verification. - **attemptId** (string) - Identifier for the specific verification attempt. - **code** (integer) - A code representing the verification outcome. - **person** (object) - Information about the person being verified. - **firstName** (string) - First name of the person. - **lastName** (string) - Last name of the person. - **dateOfBirth** (string) - Date of birth in YYYY-MM-DD format. - **gender** (string) - Gender of the person. - **nationality** (string) - Nationality of the person. - **idNumber** (string) - Identification number. - **yearOfBirth** (integer) - Year of birth. - **placeOfBirth** (string) - Place of birth. - **reason** (string) - Reason for the verification decision, if any. - **status** (string) - The final verification status (e.g., "approved", "declined"). - **comments** (array) - Any comments related to the verification. - **document** (object) - Information about the document used for verification. - **number** (string) - Document number. - **type** (string) - Document type. - **country** (string) - Country of issue. - **state** (string) - State of issue. - **reasonCode** (integer) - A code indicating the reason for the decision. - **vendorData** (string) - Data from the vendor. - **acceptanceTime** (string) - Timestamp when the verification was accepted. - **submissionTime** (string) - Timestamp when the verification was submitted. - **decisionTime** (string) - Timestamp when the decision was made. - **additionalVerifiedData** (object) - Additional verified data, including biometric registry results. - **biometricRegistryValidationResults** (object) - Results from biometric registry validation. - **BR** (object) - Results specific to the "BR" registry. - **isFirstNameMatch** (boolean) - Indicates if the first name matched. - **isLastNameMatch** (boolean) - Indicates if the last name matched. - **isDobMatch** (boolean) - Indicates if the date of birth matched. - **isFaceMatch** (boolean) - Indicates if the face matched. - **technicalData** (object) - Technical details related to the session. - **ip** (string) - IP address used during the session. #### Response Example ```json { "status": "success", "verification": { "id": "12df6045-3846-3e45-946a-14fa6136d78b", "attemptId": "00bca969-b53a-4fad-b065-874d41a7b2b8", "code": 9001, "person": { "firstName": "JOÃO", "lastName": "SILVA", "dateOfBirth": "1990-01-15", "gender": null, "nationality": null, "idNumber": "12345678901", "yearOfBirth": null, "placeOfBirth": null }, "reason": null, "status": "approved", "comments": [], "document": { "number": null, "type": null, "country": null, "state": null }, "reasonCode": null, "vendorData": "12345678", "acceptanceTime": "2024-01-15T09:30:00.000Z", "submissionTime": "2024-01-15T10:16:15.736755Z", "decisionTime": "2024-01-15T10:20:00.000Z", "additionalVerifiedData": { "biometricRegistryValidationResults": { "BR": { "isFirstNameMatch": true, "isLastNameMatch": true, "isDobMatch": true, "isFaceMatch": true } } }, "technicalData": { "ip": "186.153.67.122" } } } ``` ``` -------------------------------- ### GET /decision API Call Source: https://devdocs.veriff.com/docs/pro-bet-database-verification This section provides an example and explanation of the GET /decision API call payload, focusing on mandatory parameters for a Pro Bet Database Verification session. Additional parameters may be available based on integration configuration. ```APIDOC ## GET /decision ### Description Retrieves the decision and verification details for a Pro Bet Database Verification session. This endpoint shows mandatory parameters and provides a sample response. ### Method GET ### Endpoint /decision ### Parameters #### Query Parameters This endpoint primarily uses a request body for session data, but the documentation implies a GET method. For detailed parameter information, refer to the linked documentation for sessions/{sessionId}/decision. #### Request Body This section is not explicitly detailed in the provided text for the GET /decision call itself, but the sample response indicates the kind of data processed. ### Request Example (Refer to linked documentation for specific request body structure) ### Response #### Success Response (200) - **status** (string) - Indicates the success or failure of the API call. - **verification** (object) - Contains detailed verification information. - **id** (string) - Unique identifier for the verification. - **attemptId** (string) - Identifier for the specific verification attempt. - **vendorData** (string) - Data provided by the vendor. - **endUserId** (string) - Identifier for the end user. - **status** (string) - The final status of the verification (e.g., "declined"). - **code** (integer) - A specific code associated with the verification status. - **reason** (string) - A human-readable reason for the verification status. - **reasonCode** (integer) - A numerical code for the reason. - **decisionTime** (string) - Timestamp when the decision was made. - **acceptanceTime** (string) - Timestamp when the verification was accepted. - **submissionTime** (string) - Timestamp when the verification was submitted. - **person** (object) - Information about the person being verified. - **document** (object) - Information about the document used for verification. - **additionalVerifiedData** (object) - Additional verified data, including Pro Bet specific details. - **proBet** (object) - Pro Bet specific verification data. - **validations** (object) - Results of various validation checks. - **registryResponse** (object) - Response from Pro Bet registries. - **comments** (array) - Any comments related to the verification. - **technicalData** (object) - Technical details related to the API call. - **ip** (string) - The IP address from which the request was made. #### Response Example ```json { "status": "success", "verification": { "id": "12df6045-3846-3e45-946a-14fa6136d78b", "attemptId": "00bca969-b53a-4fad-b065-874d41a7b2b8", "vendorData": "12345678", "endUserId": "a1b2c35d-e8f7-6d5e-3cd2-a1b2c35db3d42", "status": "declined", "code": 9102, "reason": "User is on PIA registry", "reasonCode": 570, "decisionTime": "2025-12-12T13:00:00.000+02:00", "acceptanceTime": "2025-12-12T12:00:00.000+02:00", "submissionTime": "2025-12-12T12:05:00.000000+02:00", "person": { "firstName": "MARIA", "lastName": "SILVA SANTOS", "dateOfBirth": "1990-01-15", "gender": "F", "nationality": "BR", "idNumber": "12345678901", "yearOfBirth": "1990", "placeOfBirth": "SAO PAULO" }, "document": { "number": "AB123456", "type": "ID_CARD", "country": "BR", "state": "SP" }, "additionalVerifiedData": { "proBet": { "validations": { "processing": { "result": "success", "reasons": null }, "isUserDataValid": { "result": "success", "reasons": null }, "isNotOnPia": { "result": "failure", "reasons": ["User is on PIA registry"] }, "isNotOnProBet": { "result": "failure", "reasons": ["User is on Pro Bet registry"] } }, "registryResponse": { "pepData": { "name": "MARIA SILVA SANTOS", "role": "SECRETARIO GERAL", "organization": "SECRETARIA NACIONAL DE DESENVOLVIMENTO REGIONAL", "exerciseStartDate": "25/07/2023", "exerciseEndDate": "", "pepValidityDate": "" }, "artistData": { "cpf": "12345678901", "name": "MARIA SILVA SANTOS", "artisticName": "MARIA SILVA SANTOS", "occupation": "CANTORA" }, "piaData": { "isInRegistry": true, "cnpj": "29872262000128", "companyName": "LOTERICA BOM DESTINO LTDA", "type": "CASAS LOTERICAS" }, "influencerData": { "artisticName": "MARIA SILVA SANTOS", "socialMediaUrl": "", "areaOfActivity": "INFLUENCER" }, "scoreData": { "isAllowedToBet": false } } } }, "comments": [] }, "technicalData": { "ip": "192.168.1.1" } } ``` ``` -------------------------------- ### Manage Multiple Theme Presets Source: https://devdocs.veriff.com/docs/android-sdk-guide Demonstrates how to create and manage multiple theme presets (e.g., light and dark modes) and select the appropriate branding based on the current theme. ```java Map themes = new HashMap<>(); themes.put("light", new ThemeConfig("light", /* colors... */)); themes.put("dark", new ThemeConfig("dark", /* colors... */)); ThemeConfig selectedTheme = isDarkMode ? themes.get("dark") : themes.get("light"); Branding branding = selectedTheme != null ? selectedTheme.toBranding() : null; ``` -------------------------------- ### Romania Official Voter Register (RO4) POST /sessions Example Source: https://devdocs.veriff.com/docs/match-database-verifications This JSON payload is used to start a verification against the Romanian Official Voter Register (RO4). It requires first and last names, with optional date of birth, gender, and address. ```json { "verification": { "person": { "firstName": "John", "lastName": "Smith", "dateOfBirth": "1990-01-01", "gender": "M" }, "address": { "fullAddress": "123, Main Street, Your County, Anytown 12345" } } } ``` -------------------------------- ### POST /sessions Example with Full Address (GB_CREDIT_BUREAU) Source: https://devdocs.veriff.com/docs/metadata-database-verification Use this snippet for GB_CREDIT_BUREAU verification when providing the address as a single string via `address.fullAddress`. Ensure consents are also provided. ```json { "verification": { "person": { "firstName": "Charlotte", "lastName": "Pemberton", "dateOfBirth": "1977-06-19" }, "address": { "fullAddress": "45 Threadneedle Street, London EC2R 8AH" }, "consents": [ { "type": "general", "approved": true } ] } } ``` -------------------------------- ### USA Credit Database Verification Response Example Source: https://devdocs.veriff.com/docs/match-database-verifications Sample JSON snippet from a decision webhook or GET /decision endpoint payload, showing validation results for the USA Credit Database. Indicates matches or lack thereof for various data points. ```json {"...", "additionalVerifiedData": { "validationResults": [ { "registryName": "USA - Credit + US Identity Graph (US15)", "firstName": "MATCH", "lastName": "MATCH", "dateOfBirth": "NO_DATA", "address": "PARTIAL_MATCH", "idNumber": "MATCH", "phoneNumber": "PARTIAL_MATCH" } ] } } ``` -------------------------------- ### Enable Custom Intro Screen in Swift Source: https://devdocs.veriff.com/docs/ios-sdk-guide Set this configuration option to true to enable a custom introduction screen before the Veriff SDK is launched. Contact your solutions engineer to enable this feature from the backend. ```swift configuration.customIntroScreen = true ``` -------------------------------- ### Peru Official Voter Register (PE1) POST /sessions Example Source: https://devdocs.veriff.com/docs/match-database-verifications This JSON payload is used to start a verification session with Peru's Official Voter Register. It requires mandatory person and address details, with optional fields for date of birth, gender, and DNI. ```json { "verification": { "person": { "firstName": "John", "lastName": "Smith", "dateOfBirth": "1990-01-01", "gender": "M" }, "document": { "number": "12345678" }, "address": { "fullAddress": "Anytown" } } } ``` -------------------------------- ### POST /sessions example (GB_FINANCIAL_SERVICES) Source: https://devdocs.veriff.com/docs/metadata-database-verification Initiates a verification session for UK financial services. Supports both parsed address fields and a full address string. ```APIDOC ## POST /sessions (GB_FINANCIAL_SERVICES) ### Description Verifies UK financial services information using provided person and address details. ### Method POST ### Endpoint /sessions ### Parameters #### Request Body - **verification.person.lastName** (string) - Required - Last name of the person. - **verification.address.street** (string) - Required (if address.fullAddress is not used) - Street name and number. - **verification.address.city** (string) - Required (if address.fullAddress is not used) - City name. - **verification.address.postcode** (string) - Required (if address.fullAddress is not used) - Postal code. - **verification.address.fullAddress** (string) - Required (if address.street, address.city, address.postcode are not used) - Full address string. - **verification.person.firstName** (string) - Optional - First name of the person. - **verification.person.dateOfBirth** (string) - Optional - Date of birth in YYYY-MM-DD format. - **verification.person.phoneNumber** (string) - Optional - Phone number. ### Request Example **With parsed address fields** ```json { "verification": { "person": { "firstName": "James", "lastName": "Whitfield", "dateOfBirth": "1975-03-22", "phoneNumber": "+447911123456" }, "address": { "street": "8 Canary Wharf", "city": "London", "postcode": "E14 5AB" } } } ``` **With fullAddress parameter** ```json { "verification": { "person": { "firstName": "James", "lastName": "Whitfield", "dateOfBirth": "1975-03-22", "phoneNumber": "+447911123456" }, "address": { "fullAddress": "8 Canary Wharf, London E14 5AB" } } } ``` ### Response #### Success Response (200) - **GB_FINANCIAL_SERVICES** (object) - Contains verification status, data, and validation details. - **status** (string) - Verification status (e.g., "success"). - **data** (object) - Contains verified data points. - **validations** (object) - Details of validation checks performed. #### Response Example ```json { "GB_FINANCIAL_SERVICES": { "status": "success", "data": { "addressElement1": "8 Canary Wharf", "addressElement3": "London", "addressElement4": "Greater London", "addressElement5": "E14 5AB", "firstName": "James", "lastName": "Whitfield", "identityStrength": 85, "identityValidity": "valid", "identityFraud": false, "activityHistory": "established", "deathRegistration": false, "amberhill": false, "siraFraud": false, "siraImpersonation": false, "synthIdNoMatch": false }, "validations": { "processing": { "result": "success", "reason": null }, "is_input_valid": { "result": "success", "reason": null }, "identity_is_valid": { "result": "success", "reason": null }, "first_name_match": { "result": "success", "reason": null }, "last_name_match": { "result": "success", "reason": null }, "date_of_birth_match": { "result": "success", "reason": null }, "address_full_address_match": { "result": "success", "reason": null }, "phone_number_match": { "result": "success", "reason": null } }, "error": null, "timestamp": null } } ``` ``` -------------------------------- ### Enable Custom Intro Screen in Objective-C Source: https://devdocs.veriff.com/docs/ios-sdk-guide Set this configuration option to YES to enable a custom introduction screen before the Veriff SDK is launched. Contact your solutions engineer to enable this feature from the backend. ```objective-c configuration.customIntroScreen = YES; ``` -------------------------------- ### POST /sessions example (GB_CREDIT_BUREAU) Source: https://devdocs.veriff.com/docs/metadata-database-verification Initiates a verification session for UK Credit Bureau data. This endpoint requires mandatory person details, address information (either parsed or full address), and consent. ```APIDOC ## POST /sessions example (GB_CREDIT_BUREAU) ### Description Initiates a verification session for UK Credit Bureau data. This endpoint requires mandatory person details, address information (either parsed or full address), and consent. ### Method POST ### Endpoint /sessions ### Parameters #### Request Body - **verification.person.firstName** (string) - Required - First name of the person. - **verification.person.lastName** (string) - Required - Last name of the person. - **verification.person.dateOfBirth** (string) - Required - Date of birth of the person (YYYY-MM-DD). - **verification.address.street** (string) - Required (if `address.fullAddress` is not provided) - Street name and number. - **verification.address.city** (string) - Required (if `address.fullAddress` is not provided) - City name. - **verification.address.postcode** (string) - Required (if `address.fullAddress` is not provided) - Postal code. - **verification.address.fullAddress** (string) - Required (if parsed address fields are not provided) - Full address string. - **verification.consents** (array) - Required - An array of consent objects. - **type** (string) - The type of consent (e.g., "general"). - **approved** (boolean) - Indicates if consent is approved. ### Request Example (Parsed Address) ```json { "verification": { "person": { "firstName": "Charlotte", "lastName": "Pemberton", "dateOfBirth": "1977-06-19" }, "address": { "street": "45 Threadneedle Street", "city": "London", "postcode": "EC2R 8AH" }, "consents": [ { "type": "general", "approved": true } ] } } ``` ### Request Example (Full Address) ```json { "verification": { "person": { "firstName": "Charlotte", "lastName": "Pemberton", "dateOfBirth": "1977-06-19" }, "address": { "fullAddress": "45 Threadneedle Street, London EC2R 8AH" }, "consents": [ { "type": "general", "approved": true } ] } } ``` ### Response #### Success Response (200) - **GB_CREDIT_BUREAU** (object) - Contains verification results for the UK Credit Bureau database. - **status** (string) - The status of the verification (e.g., "success"). - **data** (object) - Contains matched data elements. - **validations** (object) - Details of validation checks performed. - **error** (object or null) - Error details if verification failed. - **timestamp** (string or null) - Timestamp of the verification. #### Response Example ```json { "GB_CREDIT_BUREAU": { "status": "success", "data": { "addressElement1": "45 Threadneedle Street", "addressElement3": "London", "addressElement4": "Greater London", "addressElement5": "EC2R 8AH", "firstName": "Charlotte", "lastName": "Pemberton", "middleName": "Anne" }, "validations": { "processing": {"result": "success", "reason": null}, "is_input_valid": {"result": "success", "reason": null}, "consent_obtained": {"result": "success", "reason": null}, "identity_is_valid": {"result": "success", "reason": null}, "first_name_match": {"result": "success", "reason": null}, "last_name_match": {"result": "success", "reason": null}, "date_of_birth_match": {"result": "success", "reason": null}, "address_full_address_match": {"result": "success", "reason": null} }, "error": null, "timestamp": null } } ``` ``` -------------------------------- ### Customize Branding and Launch SDK (Java) Source: https://devdocs.veriff.com/docs/android-sdk-guide Use the Branding.Builder to customize various aspects of the SDK's appearance, such as logos, colors, and button radius. Then, create a Configuration object with the branding and launch the SDK using Sdk.createLaunchIntent. ```java Branding branding = new Branding.Builder() .logo(R.drawable.logo) // Screen and dialog background color .background(getResources().getColor(R.color.background_color)) // Non-surface content (such as text, icons) displayed on `background`. // Accessibility: Must have a contrast ratio of at least 4.5:1 vs `background` .onBackground(getResources().getColor(R.color.on_background_color)) // Secondary non-surface content (such as text) displayed on `background`. // Accessibility: Must have a contrast ratio of at least 4.5:1 vs `background` .onBackgroundSecondary(getResources().getColor(R.color.on_background_secondary_color)) // Tertiary non-surface content (such as text) displayed on `background`. // Accessibility: Must have a contrast ratio of at least 4.5:1 vs `background` .onBackgroundTertiary(getResources().getColor(R.color.on_background_tertiary_color)) // Primary surfaces (such as buttons) displayed on `background`. // Accessibility: Must have a contrast ratio of at least 3:1 vs `background` .primary(getResources().getColor(R.color.primary_color)) // Non-surface content (such as text) displayed on `primary` surfaces. // Accessibility: Must have a contrast ratio of at least 4.5:1 vs `primary` .onPrimary(getResources().getColor(R.color.on_primary_color)) // Secondary surfaces (such as bullet points and illustrations) displayed on `background`. // Accessibility: Must have a contrast ratio of at least 3:1 vs `background` .secondary(getResources().getColor(R.color.secondary_color)) // Non-surface content (such as text) displayed on `secondary` surfaces. // Accessibility: Must have a contrast ratio of at least 4.5:1 vs `secondary` .onSecondary(getResources().getColor(R.color.on_secondary_color)) // Backgroung color of the overlay area on all the screens with camera .cameraOverlay(getResources().getColor(R.color.camera_overlay_color)) // Secondary color for elements on all the screens with camera on top of camera overlay .onCameraOverlaySecondary(getResources().getColor(R.color.on_camera_overlay_secondary_color)) // Color used for various outlines and boundaries of UI elements .outline(getResources().getColor(R.color.outline_color)) // Success background .feedbackSuccess(getResources().getColor(R.color.success_color)) // Success content on top of success background color .onFeedbackSuccess(getResources().getColor(R.color.on_success_color)) // Error background .feedbackError(getResources().getColor(R.color.error_color)) // Error content on top of feedback error background color .onFeedbackError(getResources().getColor(R.color.on_error_color)) // Button corner radius, in `dp` .buttonRadius(48f) .build(); Configuration configuration = new Configuration.Builder() .branding(branding) .build(); Intent intent = Sdk.createLaunchIntent(activity, sessionUrl, configuration); ``` -------------------------------- ### Enable Custom Intro Screen in Android SDK Source: https://devdocs.veriff.com/docs/android-sdk-guide Configure the SDK to use a custom intro screen instead of Veriff's default one. This requires backend enablement and agreement with a Solutions Engineer. ```kotlin val configuration = Configuration.Builder() .customIntroScreen(true) .build() ``` ```java Configuration configuration = new Configuration.Builder() .customIntroScreen(true) .build(); ``` -------------------------------- ### Start Veriff Verification Flow Source: https://devdocs.veriff.com/docs/flutter-plugin Initialize the Veriff object and start the verification flow using the created configuration. Handle potential PlatformExceptions during the process. ```dart Veriff veriff = Veriff(); try { Result result = await veriff.start(config); print(result.status); print(result.error); } on PlatformException { // handle exception } ``` -------------------------------- ### POST /sessions Example with All Optional Data (GB_CONSUMER) Source: https://devdocs.veriff.com/docs/metadata-database-verification Use this snippet to send a POST /sessions request with all optional data for consumer verification. Ensure all mandatory fields are also included. ```json { "verification": { "person": { "firstName": "Emma", "lastName": "Clark", "dateOfBirth": "1995-04-18", "email": "emma.clark@example.co.uk", "phoneNumber": "+447911123456" }, "address": { "street": "25 Baker Street", "neighbourhood": "Marylebone", "city": "London", "state": "England", "postcode": "W1U 8EW" } } } ``` -------------------------------- ### Enable Custom Intro Screen in Veriff SDK Source: https://devdocs.veriff.com/docs/cordova-plugin Set `customIntroScreen` to `true` to enable a custom introduction screen. This requires backend enablement by Veriff and coordination with your Solutions Engineer. ```javascript var result = await VeriffSdk.launchVeriff({ sessionUrl: SESSION_URL, locale: 'et', customIntroScreen: true }); ``` -------------------------------- ### Example CSP Meta Tag in HTML Source: https://devdocs.veriff.com/docs/incontext-sdk-1 An example of how to implement the Content Security Policy directives within a meta tag in your HTML's head section. ```html ``` -------------------------------- ### Add Veriff iOS SDK using Cocoapods Source: https://devdocs.veriff.com/docs/ios-sdk-guide Integrate the Veriff iOS SDK by adding 'VeriffSDK' to your Podfile and running 'pod install'. Use the .xcworkspace file after installation. ```ruby pod 'VeriffSDK' ``` -------------------------------- ### Initialize Veriff SDK with iFrame Source: https://devdocs.veriff.com/docs/incontext-sdk-1 Initialize the Veriff SDK to display the verification process in a modal iFrame. Import the necessary function and pass the session URL. ```javascript // CommonJS const { createVeriffFrame } = require('@veriff/incontext-sdk'); // ES6 import { createVeriffFrame } from '@veriff/incontext-sdk'; const veriffFrame = createVeriffFrame({ url: VERIFF_SESSION_URL }) ``` -------------------------------- ### Get Session Decision Source: https://devdocs.veriff.com/docs/biometric-liveness You can use the GET sessions/{sessionId}/decision endpoint to retrieve the decision data for a verification session. This endpoint provides comprehensive information about the verification outcome, including status, decision codes, timestamps, and details about the person and document involved. It is also used for other purposes, so refer to the general GET sessions/{sessionId}/decision documentation for more context. ```APIDOC ## GET sessions/{sessionId}/decision ### Description Retrieves the decision and associated data for a biometric liveness verification session. ### Method GET ### Endpoint /sessions/{sessionId}/decision ### Parameters #### Path Parameters - **sessionId** (string) - Required - The unique identifier of the verification session. ### Response #### Success Response (200) - **status** (string) - Status of the response. - **verification** (object) - Verification request decision object. `null` if decision is not available yet. - **id** (string) - UUID v4 which identifies the verification session. - **attemptId** (string) - UUID v4 of the attempt which received a status. - **vendorData** (string | null) - The unique identifier that you created for your end-user. - **endUserId** (string | null) - The `UUID` that you created for your end-user. - **status** (string) - Verification status, one of `approved`, `declined`, `resubmission_requested`, `review`, `expired`, `abandoned`. - **code** (integer) - Verification session decision code. - **reason** (string | null) - Reason why the verification failed. - **reasonCode** (integer | null) - Reason code of the failed verification. - **decisionTime** (string | null) - Timestamp of the decision, represented as `UTC YYYY-MM-DDTHH:MM:SS.SSS+Timezone Offset` (ISO 8601). - **acceptanceTime** (string) - Timestamp of the session generation, represented as `UTC YYYY-MM-DDTHH:MM:SS.SSS+Timezone Offset` (ISO 8601). - **person** (object) - Data about the verified person. - **firstName** (string | null) - Person's first name as written on the document. - **lastName** (string | null) - Person's last name as written on the document. - **dateOfBirth** (string) - Date of birth, represented as `YYYY-MM-DD`. - **gender** (string | null) - Person’s gender, represented as M or F, or `null` if not present. - **nationality** (string | null) - Person’s nationality, represented as `ISO 3166 alpha-2` or `alpha-3 number`. - **idNumber** (string | null) - National identification number. - **yearOfBirth** (string | null) - Person’s year of birth, represented as `YYYY`. - **placeOfBirth** (string | null) - Person’s place of birth. - **pepSanctionMatch** (string | null) - Legacy field, may return incorrect result, should be ignored. - **citizenship** (null) - Deprecated, always returns null. - **document** (object) - Verified document. - **number** (string | null) - Document number, `[a-zA-Z0-9]` characters only. - **type** (string | null) - Document type, one of `PASSPORT`, `ID_CARD`, `RESIDENCE_PERMIT`, `DRIVERS_LICENSE`, `VISA`, `OTHER`. - **country** (string | null) - Document issuing country, represented as ISO 3166 `alpha-2` code. - **state** (string | null) - Document issuing state, represented as ISO 3166 `alpha-2` or `alpha-3` code. - **additionalVerifiedData** (object) - Data that has been optionally verified for the session. - **comments** (array) - Deprecated, always returns empty []. - **highRisk** (boolean) - Deprecated, marked if session was considered high risk or not. - **technicalData** (object) - Technical data object. - **ip** (string | null) - IP of the device from which the verification was made. ### Response Example { "status": "success", "verification":{ "id":"12df6045-3846-3e45-946a-14fa6136d78b", "attemptId":"c6cab5b0-c506-47a6-922d-6ae3b72ca172", "vendorData":null, "endUserId":"a1b2c35d-e8f7-6d5e-3cd2-a1b2c35db3d4", "status":"approved", "code":9001, "reason":null, "reasonCode":null, "decisionTime":"2025-01-05T12:55:01.232923Z", "acceptanceTime":"2025-01-05T07:18:36.916Z", "person":{ "firstName":null, "lastName":null, "dateOfBirth":null, "gender":null, "nationality":null, "idNumber":null, "yearOfBirth":null, "placeOfBirth":null, "pepSanctionMatch":null, "citizenship":null }, "document":{ "number":null, "type":null, "country":null, "state":null }, "additionalVerifiedData":{}, "comments":[], "riskLabels":[] }, "technicalData": { "ip": "186.153.67.122" } } ``` -------------------------------- ### Turkey (TR1) POST /sessions Example Source: https://devdocs.veriff.com/docs/match-database-verifications Provides an example of the input parameters for the Turkey Official Voter Register (TR1) verification via POST /sessions. Includes mandatory and optional fields. ```json { "verification": { "person": { "firstName": "John", "lastName": "Smith", "dateOfBirth": "1990-01-01", "phoneNumber": "8888888888", "gender": "M" }, "document": { "number": "12345678901" }, "address": { "fullAddress": "Any State" } } } ```