The Kushki instance that was previously initialized.
The session identifier value that can be user's ID, username, email address or empty.
import { init } from "@kushki/js-sdk";
import { requestInitAntiFraud, SiftScienceObject } from "Kushki/AntiFraud";
const onRequestInitAntiFraud = async () => {
try {
const kushkiInstance = await init({
inTest: true,
publicCredentialId: "merchantId"
});
const userId= "user-identification"
const response: SiftScienceObject = await requestInitAntiFraud(
kushkiInstance,
userId,
);
// On Success, can get Sift Science session object,
// ex. {"sessionId":"9a64960c-a1de-4878-b975-9ab1ea30e853","userId":"eda2b0b0c5f3426483a678c82cc8a5ef"}
console.log(response);
} catch (error: any) {
// On Error, catch response, ex. {code:"E023", message: "Error al configurar sesión de Sift"}
console.error(error.message);
}
};
Generated using TypeDoc
Introduction
Function to init the Sift Science service session independently.