Issuin icon

Create and manage rules

Use transaction rules to automatically approve or decline a transaction.

Requirements

Before you create a transaction rule, make sure you are familiar with how transaction rules work.

Create a transaction rule

When you have defined your business logic and requirements, turn your requirements into a transaction rule. You can do this by using your Balance Platform Customer Area or by making an API request.

The following tabs explain both procedures.

To create a transaction rule in your Balance Platform Customer Area:

  1. Go to Issuing > Transaction rules.
  2. Select + Create new rule.
  3. Add the required rule details.
  4. Set the rule conditions.
  5. Review and test your rule.

Add details

Add the following rule details:

  • Entity type: The type of entity to which you want to apply the rule.
  • Entity key: The ID of the selected entity.
  • Aggregation level: The level at which the data is accumulated when selecting rule types that involve counting a number of transactions within a time interval.
  • Rule type: Specify when the outcome of the rule applies. In the Balance Platform Customer Area, you can use one of the following rule types:
    • Per transaction: The outcome applies to every transaction.
    • Fixed time interval: You specify a time interval. During the time interval, we aggregate any transaction data that you specify. The outcome applies when, cumulatively, all transactions that occur within the time interval surpass a specified limit. The aggregation is reset when a new interval begins.
      For example: you can specify that a cardholder cannot spend more than EUR 200 in a day, which starts daily at 9 AM.
    • Moving time interval: You specify the duration of a time interval. When a cardholder attempts a payment, we aggregate all transaction data before this payment attempt, for the duration that you specified. The outcome applies when, cumulatively, the transactions surpass a specified limit.
      For example: you can specify that a cardholder cannot spend more than EUR 200 in six hours. If the cardholder attempts a payment at 7 PM, we check that between 1 PM and 7 PM the cardholder hasn't spent more than EUR 200.
    • Maximum usage: We aggregate transaction data during the entire lifetime of a card. After the amount of transactions surpass a specified limit, the card is deactivated.
  • Description: Describe what the rule does so you identify it later.
    For example: Allow only point-of-sale transactions.
  • Reference: An internal identifier that helps you track the rule later.
    For example: RULE_1234.

Set conditions

To set a condition, select:

  1. A parameter. For example: Total amount, Countries, Day of week.
  2. An operator. For example: equals, greater than, is in.
  3. A value. For example: 100, Netherlands, Monday.

You can have up to five conditions per rule. If any of the specified conditions is met, Adyen applies the rule outcome to the transaction.

Test rule

In the Review page, you can select Test rule. This enables you test the rule with previous transactions in your platform.

View transaction rules

You can see the transaction rules that you created on the Balance Platform Customer Area or by making API requests.

To view the transaction rules:

  1. Log in to your Balance Platform Customer Area.
  2. Go to Transaction rules.
  3. Select a specific rule ID to view the transaction rule details.

To view which transaction rules apply to a payment instrument:

  1. Go to Payment instruments.
  2. Select a specific payment instrument ID.
  3. Go to the Related transaction rules section.

Update a transaction rule

You can update transaction rules by making a PATCH /transactionRules/{id} request, specifying the id in the path.

For example, to add the US to the previous transaction rule, send the request below:

Update a transaction rule
Expand view
Copy link to code block
Copy code
Copy code
curl https://balanceplatform-api-test.adyen.com/bcl/v2/transactionRules/TR3227C223222B5FCB756DV9H \
-H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \
-H 'content-type: application/json' \
-X PATCH \
-d '{
"ruleRestrictions": {
"countries": {
"operation": "noneMatch",
"value": [
"NL", "US"
]
}
}
}'

The response returns the updated transaction rule, along with NL and US in the list of countries. If the location where the transaction is processed does not match either the NL or US, then the transaction is blocked.

Activate or deactivate a transaction rule

You can activate or deactivate transaction rules using the Balance Platform Customer Area or by making API requests.

To deactivate a transaction rule:

  1. Log in to your Balance Platform Customer Area.
  2. Go to Transaction rules.
  3. Select the specific rule ID.
  4. Select the Deactivate button.

Next steps