Requirements
Before you begin, take into account the following requirements and limitations.How it works
- Enable risk results in the API response and webhooks.
- Decide in which format you want to return fraud results.
Enable risk results in the API response and webhooks
To get risk information and fraud results in the API response and in webhooks, in your Customer Area:- Go to Developers > Additional data.
- Check the box under Risk > Fraud result.
- Select Save configuration.
- In the API response, the
additionalDataobject contains risk information, and thefraudResultobject shows which risk rules triggered. - In the webhook, the
additionalDataobject contains both risk information and the fraud results.
- The possible
fraudResultTypevalues are GREEN, AMBER, or RED. For Protect premium, AMBER means that the transaction has been sent to case management for manual review. - The possible
fraudRiskLevelvalues are veryLow, low, medium, high or veryHigh. For Protect premium, the risk level shows the classification by the Machine learning: fraud risk rule. - For any field that shows a fraud score, for example
accountScoreortotalFraudScore, the possible values are -100, 0, 100 or 200.
Overview of options
Option 1
If you want to return all risk rule result lines in one format in the API response and webhooks, including any custom rules, enabling the Fraud result in Additional data is all you need to do.Option 2
If you want to break down custom risk rules separately in the API response and webhooks, you also have to enable the following risk setting in your Customer Area:- Go to Revenue & risk > Settings.
- Enable Change risk result format for custom rules.
- Select Save configuration.
Option 3
This setting is optional and only affects webhooks. If you want to return any custom risk fields that were included in the request in webhooks, in your Customer Area.- Go to Developers > Webhooks.
- Next to Standard webhook, select the edit webhook icon **.
- Under Additional Settings > Risk, select the edit icon **.
- Select Include Risk Data.
- Select Apply.
Option 1: One format for all risk checks
Webhooks
All risk rule result lines in webhooks will be in the format: fraudCheck-[risk rule ID]-[risk rule name] For a list of the risk rule names, see the risk rule name reference.Example webhook - one format for all checks
Example webhook - one format for all checksAPI response
The following API response example includes more than one risk rules that triggered. When you choose option 1, if one or more (custom) rules trigger, all results are shown in the same way.Example API response - one format for all checks
Example API response - one format for all checksOption 2: Return custom risk rules in a different format
Webhooks
You can break custom risk rules into separate, more specific, rules. This lets you track when specific custom risk rules triggered.Example webhook - split custom risk rules
The following webhook example includes more than one custom risk rules that triggered. When you choose option 2, all custom risk rules that triggered are shown as separate fraud checks. Risk rule result lines will be in this format: fraudCheck-82-CustomFieldCheck-[Rule name] For a list of the risk rule names, see the risk rule name reference. Example webhook - split custom risk rulesAPI response
The following API response example includes two custom risk rules.When you choose option 2, all custom risk rules that triggered are shown as separate fraud check results.
Example API response - split custom risk rules
Example API response - split custom risk rulesOption 3: Return risk data in webhooks
When you turn on the optional setting Include Risk Data in your webhook configuration, if you use custom risk rules, the webhook also contains the customriskdata fields sent in the request, and their values.
Here is an example webhook where all fraud checks are returned in one format (option 1), and custom risk rules with custom fields triggered.
Example webhook including risk data
Example webhook including risk dataRisk rule name reference
Use the following table as a reference for risk rules that can appear in your API response or webhooks.Protect risk rules
Names of Adyen-provided rules contain spaces. Names of any custom rules that you create cannot contain spaces. Both Adyen-provided and custom rules are categorized asCustomFieldCheck.
