Limited availability
Transaction rules are currently in pilot phase. Some of the processes and documentation may change as the feature evolves. If you are interested in piloting transaction rules or have any feedback, reach out to your Adyen contact.
When you process payouts to third party bank accounts or cards, you can protect your balance platform from risk by evaluating and declining suspicious payout requests. You can use transaction rules to configure a logic that automatically declines a payout that does not meet your business' requirements.
We recommend that you use transaction rules to make decisions based on request data and static conditions: for example, a fixed list of banks that your team must not pay out funds to.
How it works
You create a transaction rule using the POST /transactionRules endpoint in the Configuration API. When creating transaction rules, you determine:
-
The criteria that determine when a payout is evaluated with the rule. For example, if the payout occurs in a specific time interval or if it applies to a specific resource in your balance platform. To define the rule criteria, you must consider the following:
Criterion Description Request type Defines the type
of transfer request to which you want to apply the rule. For payouts to third parties, set this to bankTransfer.Rule type Defines what data the rule must use to analyze the payout and check whether it meets the conditions. The rule either uses only the data of the current payout being analyzed, or uses accumulated data from previous payouts. Time interval Defines the time period in which a payout must meet the rule conditions. Entity Defines the balance platform resource to which the rule applies. -
The conditions that a payout must meet for the rule's outcome to be applied. For example, if it contains certain request data.
-
The outcome to apply when the payout is evaluated and meets the conditions of the rule, such as to decline the payout. This is called a hard-block outcome.
After you create a transaction rule, the process works as follows:
- Your user makes a payout to a third-party bank account or card.
-
If the payout meets the criteria of the transaction rule, Adyen evaluates the payout using the rule.
-
If the payout meets the conditions defined in the transaction rule, Adyen applies the outcome of the rule.
Hierarchy for transaction rules
You can create a rule with one or more conditions, and apply one or more rules to an entity. When you make a payout, Adyen evaluates all of the applicable rules.
When you have multiple conditions and rules, Adyen evaluates the payout based on the following:
- Multiple conditions within one rule: Adyen applies the outcome if the payout meets all conditions within the rule.
- Multiple rules: Adyen evaluates the rules based on a hierarchy of outcome and rule type. Transaction rules with a hard block outcome with a blocklist rule type are evaluated first. If a
payout is already declined, the remaining rules are no longer evaluated. A transaction rule is evaluated based on the following hierarchy:
- A hard block outcome with a blocklist rule type
- A hard-block outcome with a velocity rule type
You can create transaction rules that override other transaction rules in specific circumstances, such as for a specific balance platform resource. For more information, see Override a transaction rule.
Rule types
The rule type defines what data the rule uses to analyze and decide the outcome of a transfer request. Adyen can use the data of the current transfer, or use accumulated data from previous transfers.
The following rule types are available:
- Blocklist: decline a transfer if it meets the specified conditions.
- Velocity: decline a payout if a set amount of accumulated previous payouts have met the specified conditions. Adyen only considers previous payouts within a specified time interval. You can only accumulate payouts at the balance account level.
Time intervals
The time interval defines the period when the rule conditions and outcome apply. The interval also determines when counters are reset if the rule is accumulating data.
The following types of time intervals are available for business accounts:
Type of time interval | Description | Example |
---|---|---|
Per transaction |
The rule only uses data from the current transfer to make a decision. The outcome also applies only to the current transfer request. |
You can set a rule that allows a user to transfer a maximum of EUR 5000 per transfer request. |
Fixed interval |
The rule uses data from transfers made within the specified time interval, such as the ongoing day, week, or month. The outcome applies to the current transfer and all following transfers until the end of the interval. |
You can set a rule that allows a user to transfer a maximum of EUR 1000 from their account in a day. In this case, Adyen accumulates the data of all the outgoing transfers from that account within the current day. If the user exceeds the EUR 1000 limit, all subsequent transfer request are declined until the next day. |
Rolling interval |
The rule uses conditions that are applied and counters are reset based on a start time, timezone, and duration that you define. The outcome applies to the current transfer and all following transfers until the end of the interval. |
You can set a rule that allows a user to transfer a maximum of EUR 5000 from their account within a week. You can specify a schedule for that week that starts every Monday, for a duration of seven days. If the user exceeds the EUR 5000 limit, all subsequent transfer requests are declined until the start of the next week. |
Sliding interval |
The rule uses data from transfers that occurred within a specified time interval previous to the current transfer. For example, Adyen can check transfers made in the previous minutes, hours, or days. The outcome applies to the current transfer and all following transfer requests until the specified interval ends. |
You can set a rule that allows a user to make a maximum of five transfer requests within an hour. If the user makes five transfer requests in less than an hour, all subsequent transfers are declined until the next hour. |
Entity to which the rule applies
Each transaction rule must be applied to only one resource.
You can apply a transaction rule to any of the following resources:
- A balance account: the rule applies to a balance account.
- An account holder: the rule applies to all balance accounts linked to an account holder.
- A balance platform: the rule applies to all balance accounts and account holders on your balance platform.
If multiple rules apply to an account, Adyen prioritizes the rules according to the hierarchy of transaction rules.
Aggregating total amount or number of transactions
If you choose the velocity rule type, the payout data is always accumulated and aggregated at the balance account level, in the time interval you specified. For example, you can set a maximum total amount for the aggregated total of all payouts linked to a balance account in the past 24 hours. When aggregating amounts, we convert all payout amounts to the default currency of the account holder or balance platform.
Conditions
Conditions define the data that a payout must contain for the outcome to be applied. Transaction rules check whether the payout meets all of the conditions before accepting or declining the payout. We refer to these conditions as rule restrictions.
A rule restrictions consists of the following:
-
value
: one or more types of payout data that a payout must or must not contain, such as the country code, the merchant category code, or the start time and end time. -
operation
: the operation type, which determines how a payout's data must be evaluated against the values specified in thevalue
array. For example:-
The payout's merchant category code can Match any of the codes you specify in
value
. -
The payout's country code Does not match any of the country codes you specify in
value
. - The total amount of the payout Equals, is greater than or equal to, or is less than the total amount you specify in
value
.
-
The payout's merchant category code can Match any of the codes you specify in
Rule restriction name | Available values | Available operation types | Description |
---|---|---|---|
counterpartyAccounts |
|
anyMatch, noneMatch | Evaluates whether the counterparty's bank account type in the payout request matches the account types specified in counterpartyAccount.value . |
counterpartyBank |
|
anyMatch, noneMatch | Evaluates whether the bank account details of the counterparty in the payout request match the details specified in counterpartyBank.value . |
counterpartyCountries |
Two-character ISO 3166-1 alpha-2 country code. | anyMatch, noneMatch | Evaluates whether the counterparty's country in the payout request matches any of the countries specified in counterpartyCountries.value |
counterpartyNames |
Array of allowed counterparty names. | anyMatch, noneMatch | Evaluates whether the counterparty's name in the payout request matches any of the counterparty names specified in counterpartyNames.value |
descriptions |
Array of allowed payout descriptions. | anyMatch, noneMatch | Evaluates whether the payout's description matches any of the descriptions specified in descriptions.value . |
matchingTransactions |
An integer indicating the total number of allowed transactions. | equals, notEquals, greaterThanOrEqualTo, greaterThan, lessThanOrEqualTo, lessThan | Evaluates the total number of payouts against the number specified in matchingTransactions.value . |
percentageOfAvailableBalance |
An integer between 0 and 100 | notEquals, greaterThanOrEqualTo, greaterThan, lessThanOrEqualTo, lessThan | Evaluates the amount of the payout as a percentage of the available balance in the balance account, and compares it to the percentage specified in percentageOfAvailableBalance.value . |
platformActions |
intraBank, instant, fast, regular, crossBorder | anyMatch, noneMatch | Evaluates whether the priority of a payout matches any of the priorities specified in platformActions.value |
sameAmountRestriction |
true, false | equals | Can only be used together with matchingTransactions . Evaluates whether the number of payout requests with the same amount exceeds the number specified in matchingTransactions.value |
sameCounterpartyRestriction |
true, false | equals | Can only be used together with matchingTransactions . Evaluates whether the number of payout requests with the same counterparty exceeds the number specified in matchingTransactions.value |
sourceAccountTypes |
balanceAccount | anyMatch, noneMatch | Evaluates whether the type of the source account in the payout matches any of the account types specified in sourceAccountTypes.value . |
totalAmount |
|
notEquals, greaterThanOrEqualTo, greaterThan, lessThanOrEqualTo, lessThan | Evaluates the total amount of all payouts against the amount specified in totalAmount.value . |
Get updates when a rule is triggered
To get updated about payouts that are declined because they triggered one or more transaction rules:
- Subscribe to the
balancePlatform.transfer.updated
webhook. ThetransactionRulesResults
object contains the details of all the transactions rules that the payout triggered. Thereason
field returns declinedByTransactionRule. - In your Balance Platform Customer Area, go to the Transfers page and click on a declined payout. You can see all the transactions rules that the payout triggered.