Custom Rules in minFraud

Custom rules are available to minFraud Score, Insights, and Factors customers. Users can create rules to automatically set the disposition (e.g. accept, reject, or flag for manual review) of transactions. 

The following guide gives step by step instructions on how to implement custom rules through your MaxMind account portal. We also provide a guide that explains what custom rules are and some example use cases.

Getting Started with Custom Rules
Accessing Custom Rules
Creating a Custom Rule
Defining a Condition
Grouping and Joining Conditions
Setting a Disposition
Using Dispositions
Ordering Rules
Labeling Rules

Getting Started with Custom Rules

Custom rules are used to bring your understanding of fraud patterns associated with your business into minFraud. If you know from experience that you always want to review transactions with a high risk shipping address, or always accept transactions of $20 or less, you can automate the disposition of transactions meeting those criteria. 

Custom rules can be integrated into your applications through the disposition output returned in a minFraud query response. You may also get dispositions programmatically through our Dispositions API. Integrating custom rules can help you to ensure rapid order fulfillment of good transactions, quick action against bad transactions, and easy identification of transactions requiring manual review.

Before you begin to use Custom Rules, please check the version of the client API that you have integrated to ensure that it includes disposition as part of the minFraud service response.


Accessing Custom Rules

To access Custom Rules, log in to your account and select Custom Rules from the left-hand menu.


Creating a Custom Rule

Note: Once you create a rule, you can place it in an inactive state, but you cannot delete it. You can create up to 150 rules in total for your account. For these reasons, it is recommended that you plan rules prior to creating them.

A Custom Rule will include one or more conditions applied to minFraud parameters. These conditions can be combined using logical operators (and/or). When a minFraud transaction meets the condition(s) it will automatically apply a disposition to the transaction. This disposition will be returned as part of the outputs in your minFraud query response.

For example, a rule could be created for all transactions which have an IP riskScore above 5.

Begin by clicking the “Create a rule” button.


Defining a Condition

Every rule must have at least one condition. Follow the steps below to define a condition:

Select a parameter.



You can build a rule based on an input parameter (a data point sent as part of a minFraud query), or an output parameter (a data point provided in response to a minFraud query). You can also create rules using custom inputs.


Set an operation and value for this parameter.



In this case, the condition will be met whenever the IP riskScore of a transaction is greater than 5.

To determine the appropriate values for your condition, consult the detailed specifications of minFraud inputs and outputs on our Developers Site. In order to function properly, the values used in your custom rules must reflect the values passed in your queries or returned by minFraud.


Grouping and Joining Conditions

Additional conditions can be added, either as part of the existing condition(s)’ group, or as a new group. Conditions within a group will be joined using logical operators (and/or), and groups of conditions will also be joined with one another using logical operators. This allows for more complex conditions in a custom rule. For example, you could create a rule that acts on transactions which have an IP riskScore above 5, and either an order amount more than $100 or in which the billing country does not match the shipping country.

To add a new condition group, click on the green “Add condition” button labeled “Add a new condition group”.

Join the new group to the existing group using a logical operator.

Next, add a condition to the new condition group following the steps outlined above. If you would like to add more than one condition to the new group, they will also be joined with a logical operator.

You may combine up to four conditions in this way, regardless of how those conditions are grouped.


Setting a Disposition

Once you have defined the conditions, select the action for the rule to take. The rule can set the disposition of a transaction to accept, reject, or manual review..


Using Dispositions

Dispositions can be integrated into your applications through the disposition output returned in a minFraud query response. You may also get dispositions programmatically through our Dispositions API. If you use minFraud Interactive for reviewing transactions, dispositions will also be displayed through that interface.


Ordering Rules

When you create a new rule, you will be prompted to position it in the list of existing rules.

If a transaction matches more than one rule, it will be dispositioned according to the initial match (the rule with the lowest order number).

Consider the following example. A company does not want to accept orders from a particular country, due to government restrictions. They also want to accept all orders with a riskScore less than 5.

The rule to reject orders from the restricted country must precede (be ordered with a lower number than) the rule to accept orders with a riskScore less than 5.


Labeling Rules

Once you’ve set the condition(s) and action for a Custom Rule, you’ll also have the option to set a custom label (up to 50 characters long) for the rule.

during rule creation

After a rule has been saved and activated, you can add, edit, or remove a label as needed on the Custom Rules page. In the example below, rule 1 has label “Example label”, and rule 2 has no label:

after rule created

Custom rule labels are also displayed on minFraud Interactive pages, along with their rule’s conditions, for reference during manual review:

  1. When hovering over the disposition icon in search results.

    mfi search label
  2. And at the top of the Transaction Details page for a transaction affected by a custom rule.transaction details page