@mimik/fraudifyr
v1.0.0
Published
Possibility of fraud determining library
Downloads
3
Readme
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.
| Param | Type | Description | | --- | --- | --- | | ipAddress | string | IP Address to fetch the results for. | | correlationId | string | Correlation ID for the request (to be used for logging). | | metrics | string | To 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.
| Param | Type | Description | | --- | --- | --- | | emailAddress | string | Email Address to fetch the results for. | | correlationId | string | Correlation ID for the request (to be used for logging). | | metrics | string | To collect metrics of the API request as described in @mimik/request-retry. |