MaxMind minFraud Score, Insights, and Factors Java API


This package provides an API for the MaxMind minFraud Score, Insights, Factors and Report Transaction web services.



We recommend installing this package with Maven. To do this, add the dependency to your pom.xml:



Add the following to your build.gradle file:

repositories {
dependencies {
    compile 'com.maxmind.minfraud:minfraud:2.0.0'

API Documentation

API documentation is viewable on our GitHub Page under the API tab.


To use this API, first create a new WebServiceClient object. The constructor takes your MaxMind account ID, license key, and an optional options array as arguments. For example:

WebServiceClient client = new WebServiceClient.Builder(6, "ABCD567890").build();

Then create a new Transaction object. This represents the transaction that you are sending to minFraud. The class is instantiated using an inner builder class, Transaction.Builder. Each builder method takes a corresponding request model object. Each of these objects is similarly built up with corresponding builder classes. For example:

Transaction transaction = new Transaction.Builder(
        new Device.Builder(InetAddress.getByName("")).build()
        new Email.Builder()

After creating the transaction object, send a Score request by calling the score method:

ScoreResponse score = client.score(transaction);

an Insights request by calling insights method:

InsightsResponse insights = client.insights(transaction);

a Factors request by calling factors method:

FactorsResponse factors = client.factors(transaction);

If the request succeeds, a model object will be returned for the endpoint. If the request fails, an exception will be thrown.

To report a transaction:

TransactionReport transaction = new TransactionReport.Builder(
         InetAddress.getByName(""), Tag.NOT_FRAUD

reportTransaction() has a void return type. If the request fails, an exception will be thrown.

See the API documentation for more details.


Runtime exceptions:

Checked exceptions:



Transaction request = new Transaction.Builder(
        new Device.Builder(InetAddress.getByName(""))
            .userAgent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36")
        new Account.Builder()
        new Billing.Builder()
            .address("11 Wall St.")
            .address2("Apt 1")
            .city("New Haven")
            .company("Company, Inc")
        new CreditCard.Builder()
            .bankName("BanK of New Haven")
        new Email.Builder()
        new Event.Builder()
            .time(new Date())
        new Order.Builder()
            .amount(new BigDecimal(Double.toString(1.1)))
            .referrerUri(new URI(""))
        new Payment.Builder()
        new Shipping.Builder()
            .address("32 Washington Ave.")
        new ShoppingCartItem.Builder()
        new ShoppingCartItem.Builder()
        new CustomInputs.Builder()
            .put("float_input", 12.1)
            .put("integer_input", 3123)
            .put("string_input", "This is a string input.")
            .put("boolean_input", true)

WebServiceClient client = new WebServiceClient.Builder(6, "ABCD567890").build();


Report Transactions API

MaxMind encourages the use of this API, as data received through this channel is continually used to improve the accuracy of our fraud detection algorithms.

To use the Report Transactions API, create a new TransactionReport object. An IP address and a valid tag are required arguments. Additional params may also be set, as documented below.

If the report is successful, nothing is returned. If the report fails, an exception with be thrown.

See the API documentation for more details.

TransactionReport transaction = new TransactionReport.Builder(InetAddress.getByName(""), Tag.NOT_FRAUD)
    .notes("notes go here")

WebServiceClient client = new WebServiceClient.Builder(6, "ABCD567890").build();



Please report all issues with this code using the GitHub issue tracker.

If you are having an issue with the minFraud service that is not specific to the client API, please see our support page.


This code requires Java 11+.


Patches and pull requests are encouraged. Please include unit tests whenever possible.


This API uses Semantic Versioning.

This software is Copyright (c) 2015-2022 by MaxMind, Inc.

This is free software, licensed under the Apache License, Version 2.0.