Documentation Index Fetch the complete documentation index at: https://docs.legitimuz.com/llms.txt
Use this file to discover all available pages before exploring further.
It is responsible for mounting the SDK and should be called after configuration. Example: < div id = "legitimuz-root" ></ div >
< script src = "https://cdn.legitimuz.com/js/sdk/legitimuz-sdk.js" ></ script >
< script type = "text/javascript" >
const sdkInstance = Legitimuz ({
/* ...Options */
});
// Mount SDK
sdkInstance . mount ();
</ script >
verifyDocument
function({ cpf: '99999999999' }): void
Responsible for starting the verification process programmatically wherever you want in your code. CPF to be verified
Example: 99999999999
Phone number
Example: 99999999999
Reference ID, any string that you want to use to identify the verification
Example: my-reference-id
Example: < div id = "legitimuz-root" ></ div >
< script src = "https://cdn.legitimuz.com/js/sdk/legitimuz-sdk.js" ></ script >
< script type = "text/javascript" >
const sdkInstance = Legitimuz ({
/* ...options */
});
// need to mount the SDK before you can call verifyDocument
sdkInstance . mount ();
// Function to start the verification flow programmatically
sdkInstance . verifyDocument ({ cpf: "99999999999" });
</ script >
setLang
function(lang: 'pt' | 'en' | 'es'): void
It is responsible for changing the language of the OCR + Facematch validation flow. Example: < div id = "legitimuz-root" ></ div >
< script src = "https://cdn.legitimuz.com/js/sdk/legitimuz-sdk.js" ></ script >
< script type = "text/javascript" >
const sdkInstance = Legitimuz ({
/* ...options */
});
// Mount SDK
sdkInstance . mount ();
// Change language
sdkInstance . setLang ( 'en' );
</ script >
changeFieldId
function(params: object): void
It is responsible for changing the id
of the enriched fields. New field id Example: my-custom-id
Example: < div id = "legitimuz-root" ></ div >
< script src = "https://cdn.legitimuz.com/js/sdk/legitimuz-sdk.js" ></ script >
< script type = "text/javascript" >
const sdkInstance = Legitimuz ({
/* ...options */
});
// Mount SDK
sdkInstance . mount ();
// Change field id for cpf
sdkInstance . changeFieldId ({
fieldName: "cpf" ,
fieldId: "my-custom-id" ,
});
</ script >
changeActionId
function(params: object): void
It is responsible for changing the id
of the elements that trigger the actions . Action name Click here to see the available fields.New id of the element that triggers the action Example: my-custom-id
Example: < div id = "legitimuz-root" ></ div >
< script src = "https://cdn.legitimuz.com/js/sdk/legitimuz-sdk.js" ></ script >
< script type = "text/javascript" >
const sdkInstance = Legitimuz ({
/* ...options */
});
// Mount SDK
sdkInstance . mount ();
// Change action id for verify
sdkInstance . changeActionId ({
actionName: "verify" ,
actionId: "my-custom-id" ,
});
</ script >
setWithdraw
function(value: number | string): void
Accept formats like: R$ 1,23, R$ 1.23, 1.23, 1,23, 123. Example: < div id = "legitimuz-root" ></ div >
< script src = "https://cdn.legitimuz.com/js/sdk/legitimuz-sdk.js" ></ script >
< script type = "text/javascript" >
const sdkInstance = Legitimuz ({
/* ...options */
});
// Mount SDK
sdkInstance . mount ();
sdkInstance . setWithdraw ( 123 );
</ script >
setBalance
function(value: number | string): void
Accept formats like: R$ 1,23, R$ 1.23, 1.23, 1,23, 123. Example: < div id = "legitimuz-root" ></ div >
< script src = "https://cdn.legitimuz.com/js/sdk/legitimuz-sdk.js" ></ script >
< script type = "text/javascript" >
const sdkInstance = Legitimuz ({
/* ...options */
});
// Mount SDK
sdkInstance . mount ();
sdkInstance . setBalance ( 123 );
</ script >
It is responsible for closing the OCR + Facematch validation modal. Example: < div id = "legitimuz-root" ></ div >
< script src = "https://cdn.legitimuz.com/js/sdk/legitimuz-sdk.js" ></ script >
< script type = "text/javascript" >
const sdkInstance = Legitimuz ({
/* ...options */
});
// Mount SDK
sdkInstance . mount ();
// Close verification modal
sdkInstance . closeModal ();
</ script >