fraud-check

0.4.1 • Public • Published

Fraud Check - V1

Installation

This is a Node.js module available through the npm registry.

Installation is done using the npm install command:

npm install fraud-check --save

Usage

const { verify } = require("fraud-check");

// Send the code to the User Email.

const getInfo = async (ip) => {
  const data = {
    ip,
    countryArr: ["US", "UK"],
  };
  const auth = await verify(data);

  console.log(auth);

  // false = fraud
  // true = not fraud
};

data

Option Type Default Description Required
ip String null Client ip to check (IPv4 or IPv6) True
countryArr Array null fraud all traffic coming from the following countries False

How it Work!

Detect VPN servers, open proxies, web proxies, Tor exits, search engine robots, data center ranges, and fraud All the country code you entered previously.

This package use ip-api non-commercial API. The free endpoint's limited at 45 requests per minutes.

A PRO Version ?

If you take a pro version of ip-api, the package can still work by adding a third parameter:

  // ...

  const data = {
    ip,
    countryArr: ["US", "UK"],
    custom: {
      link: "https://pro.ip-api.com/json/",
      key: // Your api key
    }
  };
  const auth = await verify(data);

  console.log(auth);

  // false = fraud
  // true = not fraud
};

License

MIT

/fraud-check/

    Package Sidebar

    Install

    npm i fraud-check

    Weekly Downloads

    5

    Version

    0.4.1

    License

    ISC

    Unpacked Size

    6.12 kB

    Total Files

    4

    Last publish

    Collaborators

    • fahdlaabi12