No sooner you initialize the client you can send transaction using the next method.

You have to pass as entry parameters the Transaction ID and the User ID.

    .sendTransaction(transactionID, userID)

And that is all. Every time the method is called it will send a transaction.

Full example

The following code is a very simple example to test the SDK


import { LBFraudSDK, LBFraudSDKEnvironment } from '';

const client = new LBFraudSDK({
  apiKey: 'api-key',
  environment: LBFraudSDKEnvironment.Testing

const myButton = document.getElementById('myButton');

function setListener() {
  myButton.onclick = function(){
    const transactionID = document.getElementById('transactionId').value;
    const userID = document.getElementById('userId').value;
    .sendTransaction(transactionID, userID)
    .then((success) => {console.log(success)})
    .catch((errorMsg) => {



<!DOCTYPE html>
    <title>Web SDK test</title>
    <label for="transactionId">Transaction ID:</label>
    <input type="text" id="transactionId" name="transactionId">
    <label for="userId">User ID:</label>
    <input type="text" id="userId" name="userId">
    <button id="myButton">Send transaction</button>
    <script type="module" src="test.js"></script>

Additional documentation

To properly use the SDK, it is necessary to activate the location permission.

In Safari if your browser doesn´t show the modal to allow it, it is necessary to activate it, for this follow the following steps:

  • On your Mac, choose Apple menu > System Settings, click Privacy & Safety in the sidebar, and click Location Services on the right.
    Metrics Fraud
  • Turn on Location Services for Safari in the list to the right.
    Metrics Fraud