Show / Hide Table of Contents

Class DocuPass

DocuPass identity verification solution, simply send your user a verification link to start DIY identity verification, or embed DocuPass inside your website and mobile app.

Inheritance
System.Object
DocuPass
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IDAnalyzer
Assembly: IDAnalyzer.dll
Syntax
public class DocuPass

Constructors

| Improve this Doc View Source

DocuPass(String, String, String)

Initialize DocuPass API with an API key, company name and optional region (US, EU)

Declaration
public DocuPass(string apikey, string companyName = "Your Company Name", string region = "US")
Parameters
Type Name Description
System.String apikey

You API key

System.String companyName

Your company name

System.String region

US/EU

Methods

| Improve this Doc View Source

CreateIframe()

Create a DocuPass session for embedding in web page as iframe

Declaration
public Task<JObject> CreateIframe()
Returns
Type Description
System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JObject>

DocuPass API response

| Improve this Doc View Source

CreateLiveMobile()

Create a DocuPass Live Mobile verification session for users to open on mobile phone

Declaration
public Task<JObject> CreateLiveMobile()
Returns
Type Description
System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JObject>

DocuPass API response

| Improve this Doc View Source

CreateMobile()

Create a DocuPass session for users to open on mobile phone, or embedding in mobile app

Declaration
public Task<JObject> CreateMobile()
Returns
Type Description
System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JObject>

DocuPass API response

| Improve this Doc View Source

CreateRedirection()

Create a DocuPass session for users to open in any browser

Declaration
public Task<JObject> CreateRedirection()
Returns
Type Description
System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JObject>

DocuPass API response

| Improve this Doc View Source

CreateSignature(String, String, Object)

Create a DocuPass signature session for user to review and sign legal document without identity verification

Declaration
public Task<JObject> CreateSignature(string templateId, string format = "PDF", dynamic prefillData = null)
Parameters
Type Name Description
System.String templateId

Contract Template ID displayed under web portal

System.String format

Output file format: PDF, DOCX or HTML

System.Object prefillData

Hashtable or JSON string, to autofill dynamic fields in contract template.

Returns
Type Description
System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JObject>
| Improve this Doc View Source

EnableAMLCheck(Boolean)

Check document holder's name and document number against ID Analyzer AML Database for sanctions, crimes and PEPs.

Declaration
public void EnableAMLCheck(bool enabled = false)
Parameters
Type Name Description
System.Boolean enabled

Enable or disable AML check

| Improve this Doc View Source

EnableAMLStrictMatch(Boolean)

By default, entities with identical name or document number will be considered a match even though their birthday or nationality may be unknown. Enable this parameter to reduce false-positives by only matching entities with exact same nationality and birthday.

Declaration
public void EnableAMLStrictMatch(bool enabled = false)
Parameters
Type Name Description
System.Boolean enabled

Enable or disable AML strict match mode

| Improve this Doc View Source

EnableAuthentication(Boolean, String, Double)

Validate the document to check whether the document is authentic and has not been tampered

Declaration
public void EnableAuthentication(bool enabled = false, string module = "2", double minimum_score = 0.3)
Parameters
Type Name Description
System.Boolean enabled

Enable or disable Document Authentication

System.String module

Authentication Module: "1", "2" or "quick"

System.Double minimum_score

Minimum score to pass verification

| Improve this Doc View Source

EnableDualsideCheck(Boolean)

Check if the names, document number and document type matches between the front and the back of the document when performing dual-side scan. If any information mismatches error 14 will be thrown.

Declaration
public void EnableDualsideCheck(bool enabled = false)
Parameters
Type Name Description
System.Boolean enabled

Enable or disable dual-side information check

| Improve this Doc View Source

EnableFaceVerification(Boolean, Int32, Double)

Whether users will be required to submit a selfie photo or record selfie video for facial verification.

Declaration
public void EnableFaceVerification(bool enabled = false, int verification_type = 1, double threshold = 0.4)
Parameters
Type Name Description
System.Boolean enabled

Enable or disable Facial Biometric Verification

System.Int32 verification_type

1 for photo verification, 2 for video verification

System.Double threshold

Minimum confidence score required to pass verification, value between 0 to 1

| Improve this Doc View Source

EnablePhoneVerification(Boolean)

Whether to ask user to enter a phone number for verification, DocuPass supports both mobile or landline number verification. Verified phone number will be returned in callback JSON.

Declaration
public void EnablePhoneVerification(bool enabled = false)
Parameters
Type Name Description
System.Boolean enabled

Enable or disable user phone verification

| Improve this Doc View Source

EnableVault(Boolean)

Save document image and parsed information in your secured vault. You can list, search and update document entries in your vault through Vault API or web portal.

Declaration
public void EnableVault(bool enabled = true)
Parameters
Type Name Description
System.Boolean enabled

Enable or disable Vault

| Improve this Doc View Source

GenerateContract(String, String, Object)

Generate legal document using data from user uploaded ID

Declaration
public void GenerateContract(string templateId, string format = "PDF", dynamic prefillData = null)
Parameters
Type Name Description
System.String templateId

Contract Template ID displayed under web portal

System.String format

Output file format: PDF, DOCX or HTML

System.Object prefillData

Hashtable or JSON string, to autofill dynamic fields in contract template.

| Improve this Doc View Source

HideBrandingLogo(Boolean)

Hide all branding logo

Declaration
public void HideBrandingLogo(bool hide = false)
Parameters
Type Name Description
System.Boolean hide

Hide logo

| Improve this Doc View Source

ResetConfig()

Reset all API configurations except API key and region.

Declaration
public void ResetConfig()
| Improve this Doc View Source

RestrictCountry(String)

Only accept document issued by specified countries. Separate multiple values with comma. For example "US,CA" would accept documents from United States and Canada.

Declaration
public void RestrictCountry(string countryCodes = "US,CA,UK")
Parameters
Type Name Description
System.String countryCodes

ISO ALPHA-2 Country Code separated by comma

| Improve this Doc View Source

RestrictState(String)

Only accept document issued by specified state. Separate multiple values with comma. For example "CA,TX" would accept documents from California and Texas.

Declaration
public void RestrictState(string states = "CA,TX")
Parameters
Type Name Description
System.String states

State full name or abbreviation separated by comma

| Improve this Doc View Source

RestrictType(String)

Only accept document of specified types. For example, "PD" would accept both passport and drivers license.

Declaration
public void RestrictType(string documentType = "DIP")
Parameters
Type Name Description
System.String documentType

P: Passport, D: Driver's License, I: Identity Card.

| Improve this Doc View Source

SetAMLDatabase(String)

Specify the source databases to perform AML check, if left blank, all source databases will be checked. Separate each database code with comma, for example: un_sc,us_ofac. For full list of source databases and corresponding code visit AML API Overview.

Declaration
public void SetAMLDatabase(string databases = "au_dfat,ca_dfatd,ch_seco,eu_fsf,fr_tresor_gels_avoir,gb_hmt,ua_sfms,un_sc,us_ofac,eu_cor,eu_meps,global_politicians,interpol_red")
Parameters
Type Name Description
System.String databases

Database codes separated by comma

| Improve this Doc View Source

SetCallbackImage(Boolean, Boolean, Int32)

Enable/Disable returning user uploaded document and face image in callback, and image data format.

Declaration
public void SetCallbackImage(bool return_documentimage = true, bool return_faceimage = true, int return_type = 1)
Parameters
Type Name Description
System.Boolean return_documentimage

Return document image in callback data

System.Boolean return_faceimage

Return face image in callback data

System.Int32 return_type

0 for base64, 1 for url

| Improve this Doc View Source

SetCallbackURL(String)

Set server-side callback/webhook URL to receive verification results

Declaration
public void SetCallbackURL(string url = "https://www.example.com/docupass_callback.php")
Parameters
Type Name Description
System.String url

URL

| Improve this Doc View Source

SetCustomHTML(String)

Replace DocuPass page content with your own HTML and CSS, you can download the HTML/CSS template from DocuPass API Reference page

Declaration
public void SetCustomHTML(string url = "")
Parameters
Type Name Description
System.String url

URL pointing to your own HTML page

| Improve this Doc View Source

SetCustomID(String)

Set a custom string that will be sent back to your server's callback URL, and appended to redirection URLs as a query string. It is useful for identifying your user within your database. This value will be stored under docupass_customid under Vault.

Declaration
public void SetCustomID(string customID = "")
Parameters
Type Name Description
System.String customID

A string used to identify your customer internally

| Improve this Doc View Source

SetLanguage(String)

DocuPass automatically detects user device language and display corresponding language. Set this parameter to override automatic language detection.

Declaration
public void SetLanguage(string language = "")
Parameters
Type Name Description
System.String language

Check DocuPass API reference for language code

| Improve this Doc View Source

SetLogo(String)

Replace footer logo with your own logo

Declaration
public void SetLogo(string url = "https://docupass.app/asset/logo1.png")
Parameters
Type Name Description
System.String url

Logo URL

| Improve this Doc View Source

SetMaxAttempt(Int32)

Set max verification attempt per user

Declaration
public void SetMaxAttempt(int max_attempt = 1)
Parameters
Type Name Description
System.Int32 max_attempt

1 to 10

| Improve this Doc View Source

SetParameter(String, Object)

Set an API parameter and its value, this function allows you to set any API parameter without using the built-in functions

Declaration
public void SetParameter(string parameterKey, dynamic parameterValue)
Parameters
Type Name Description
System.String parameterKey

Parameter key

System.Object parameterValue

Parameter value

| Improve this Doc View Source

SetQRCodeFormat(String, String, Int32, Int32)

Configure QR code generated for DocuPass Mobile and Live Mobile

Declaration
public void SetQRCodeFormat(string foregroundColor = "000000", string backgroundColor = "FFFFFF", int size = 5, int margin = 1)
Parameters
Type Name Description
System.String foregroundColor

Image foreground color HEX code

System.String backgroundColor

Image background color HEX code

System.Int32 size

1 to 50

System.Int32 margin

1 to 50

| Improve this Doc View Source

SetRedirectionURL(String, String)

Declaration
public void SetRedirectionURL(string successURL = "https://www.example.com/success.php", string failURL = "https://www.example.com/failed.php")
Parameters
Type Name Description
System.String successURL
System.String failURL
| Improve this Doc View Source

SetReusable(Boolean)

Enabling this parameter will allow multiple users to verify their identity through the same URL, a new DocuPass reference code will be generated for each user automatically.

Declaration
public void SetReusable(bool reusable = false)
Parameters
Type Name Description
System.Boolean reusable

Set true to allow unlimited verification for a single DocuPass session

| Improve this Doc View Source

SetWelcomeMessage(String)

Display a custom message to the user in the beginning of verification

Declaration
public void SetWelcomeMessage(string message = "")
Parameters
Type Name Description
System.String message

Plain text string

| Improve this Doc View Source

SignContract(String, String, Object)

Have user review and sign autofilled legal document after successful identity verification

Declaration
public void SignContract(string templateId, string format = "PDF", dynamic prefillData = null)
Parameters
Type Name Description
System.String templateId

Contract Template ID displayed under web portal

System.String format

Output file format: PDF, DOCX or HTML

System.Object prefillData

Hashtable or JSON string, to autofill dynamic fields in contract template.

| Improve this Doc View Source

SMSContractLink(String)

DocuPass will send SMS to this number containing DocuPass link to review and sign legal document.

Declaration
public void SMSContractLink(string mobileNumber = "+1333444555")
Parameters
Type Name Description
System.String mobileNumber

Mobile number should be provided in international format such as +1333444555

| Improve this Doc View Source

SMSVerificationLink(String)

DocuPass will send SMS to this number containing DocuPass link to perform identity verification, the number provided will be automatically considered as verified if user completes identity verification. If an invalid or unreachable number is provided error 1050 will be thrown. You should add your own thresholding mechanism to prevent abuse as you will be charged 1 quota to send the SMS.

Declaration
public void SMSVerificationLink(string mobileNumber = "+1333444555")
Parameters
Type Name Description
System.String mobileNumber

Mobile number should be provided in international format such as +1333444555

| Improve this Doc View Source

ThrowAPIException(Boolean)

Raise APIException when API returns an error

Declaration
public void ThrowAPIException(bool throwException = false)
Parameters
Type Name Description
System.Boolean throwException

Enable or Disable APIException being thrown

| Improve this Doc View Source

Validate(String, String)

Validate a data received through DocuPass Callback against DocuPass Server to prevent request spoofing

Declaration
public Task<bool> Validate(string reference, string hash)
Parameters
Type Name Description
System.String reference

DocuPass reference

System.String hash

DocuPass callback hash

Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>

Validation result

| Improve this Doc View Source

VerifyAddress(String)

Check if supplied address matches with document.

Declaration
public void VerifyAddress(string address = "123 Sample St, California, US")
Parameters
Type Name Description
System.String address

Address requiring validation

| Improve this Doc View Source

VerifyAge(String)

Check if the document holder is aged between the given range.

Declaration
public void VerifyAge(string ageRange = "18-99")
Parameters
Type Name Description
System.String ageRange

Age range, example: 18-40

| Improve this Doc View Source

VerifyDOB(String)

Check if supplied date of birth matches with document.

Declaration
public void VerifyDOB(string dob = "1990/01/01")
Parameters
Type Name Description
System.String dob

Date of birth in YYYY/MM/DD

| Improve this Doc View Source

VerifyDocumentNumber(String)

Check if supplied document or personal number matches with document.

Declaration
public void VerifyDocumentNumber(string documentNumber = "X1234567")
Parameters
Type Name Description
System.String documentNumber

Document or personal number requiring validation

| Improve this Doc View Source

VerifyExpiry(Boolean)

Check if the document is still valid based on its expiry date.

Declaration
public void VerifyExpiry(bool enabled = false)
Parameters
Type Name Description
System.Boolean enabled

Enable or disable expiry check

| Improve this Doc View Source

VerifyName(String)

Check if supplied name matches with document.

Declaration
public void VerifyName(string fullName = "ELON MUSK")
Parameters
Type Name Description
System.String fullName

Full name requiring validation

| Improve this Doc View Source

VerifyPhone(String)

DocuPass will attempt to verify this phone number as part of the identity verification process, both mobile or landline are supported, if this value is provided phoneverification will be automatically enabled but users will not be able to enter their own numbers or change the provided number.

Declaration
public void VerifyPhone(string phoneNumber = "+1333444555")
Parameters
Type Name Description
System.String phoneNumber

Mobile or landline number should be provided in international format such as +1333444555

| Improve this Doc View Source

VerifyPostcode(String)

Check if supplied postcode matches with document.

Declaration
public void VerifyPostcode(string postcode = "90001")
Parameters
Type Name Description
System.String postcode

Postcode requiring validation

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX