1.0.0 • Published 1 year ago

@mimik/fraudifyr v1.0.0

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
1 year ago

fraudifyr

Example

const fraudifyr = require('@mimik/fraudifyr');
const { checkIpFraud, checkEmailFraud } = fraudifyr({ ipqsApiSecretKey: '--secret-key--' })

fraudifyr~checkIpFraud(ipAddress, correlationId, metrics) ⇒ Promise

Request to check the likelihood IP address being associated with any fraud activity.

Kind: inner method of fraudifyr
Returns: Promise - Will return the same response as bluebird.
Category: async
Throws:

  • Promise Will throw the same error as bluebird.

A successful response would contain properties to determine if provided ipAddress is fraud. The structure is:

{
   "fraudScore": 0, // Values can range between `0`-`100`; where `0` means that the system has determined that the likelihood of `ipAddress` being associated with fraudulent activity is zero.
   "externalRequestId": "--external-id--" // Request ID in the IPQS system
}

Requires: module:@mimik/response-helper
Fulfil: object - Response of the fraud checking request.

ParamTypeDescription
ipAddressstringIP Address to fetch the results for.
correlationIdstringCorrelation ID for the request (to be used for logging).
metricsstringTo collect metrics of the API request as described in @mimik/request-retry.

fraudifyr~checkEmailFraud(emailAddress, correlationId, metrics) ⇒ Promise

Request to check the likelihood email address being associated with any fraud activity.

Kind: inner method of fraudifyr
Returns: Promise - Will return the same response as bluebird.
Category: async
Throws:

  • Promise Will throw the same error as bluebird.

A successful response would contain properties to determine if provided emailAddress is fraud. The structure is:

{
   "fraudScore": 0, // Values can range between `0`-`100`; where `0` means that the system has determined that the likelihood of `ipAddress` being associated with fraudulent activity is zero.
   "externalRequestId": "--external-id--" // Request ID in the IPQS system
}

Requires: module:@mimik/response-helper
Fulfil: object - Response of the fraud checking request.

ParamTypeDescription
emailAddressstringEmail Address to fetch the results for.
correlationIdstringCorrelation ID for the request (to be used for logging).
metricsstringTo collect metrics of the API request as described in @mimik/request-retry.