Are you looking for test card numbers?

Would you like to contact support?

Issuin icon

Examples of transaction rules

See examples of use cases and how they are defined as transaction rules.

On this page we show sample use cases and how you can create corresponding transaction rules.

Set processing types

Decline payments based on from which channel it is processed.

Example

Only allow payments from a point-of-sale terminal.

Only allow point-of-sale payments
{
  "interval": {
    "type": "perTransaction"
  },
  "ruleRestrictions": {
    "processingTypes" : {
      "operation": "noneMatch",
      "value": ["pos"]
    }
  },
  "type" : "blockList",
  "outcomeType": "hardBlock"
}

When an ecommerce payment is processed, the transaction meets the condition and is therefore declined.

If you want to do the opposite, which is to allow all transactions except for point-of-sale, change the operation to anyMatch. When an in-store payment is processed, the transaction meets the condition and is therefore declined.

Block point-of-sale payments
{
  "interval": {
    "type": "perTransaction"
  },
  "ruleRestrictions": {
    "processingTypes" : {
      "operation": "anyMatch",
      "value": ["pos"]
    }
  },
  "type" : "blockList",
  "outcomeType": "hardBlock"
}

Set country and MCC

Decline transactions based on from which country and merchant category codes (MCCs) it is processed.

Example

Decline payments in the US except for grocery stores (5411), restaurants (5812), and fast food (5814) purchases.

Only allow transactions from specific MCCs in the US
{
  "interval": {
    "type": "perTransaction"
  },
  "ruleRestrictions": {
    "countries" : {
      "operation": "anyMatch",
      "value": ["US"]
    },
    "mccs" : {
      "operation": "noneMatch",
      "value": ["5411", "5812", "5814"]
    }
  },
  "type" : "blockList",
  "outcomeType": "hardBlock"
}

Set a total amount or number of transactions

Decline transactions when the amount or number of transactions exceeds a certain value.

Example

Decline transactions when the amount exceeds USD 100 per transaction.

Set a limit of 100 USD per payment
{
  "interval": {
    "type": "perTransaction"
  },
  "ruleRestrictions": {
    "totalAmount" : {
      "operation": "greaterThan",
      "value": {
        "value": 10000,
        "currency": "USD"
      }
    }
  },
  "type" : "velocity",
  "outcomeType": "hardBlock"
}

Here is an example of setting a limit of up to 50 transactions per month, with the counter resetting every 15th of the month.

Up to 50 transactions per month
{
  "interval": {
    "type": "rolling",
    "dayOfMonth": 15,
    "duration" : {
        "unit" : "months",
        "value" : 1
    }
  },
  "ruleRestrictions": {
    "matchingTransactions" : {
      "operation": "greaterThan",
      "value": 50
    }
  },
  "type" : "velocity",
  "outcomeType": "hardBlock"
}

Combine amount and number of transactions with the MCC and country

Decline transactions when the amount or number of transactions exceeds a certain value over a time period for specific countries or MCCs.

Example

Decline gas or fuel refill-related payments in the US and Canada if they exceed 10 transactions per month or if the total amount exceeds USD 500.

To implement this use case, you need to create two rules: one for the maximum amount and another one for the maximum number of payments.

Up to 500 USD per month for gas station purchases in US and CA
{
  "interval": {
    "type": "rolling",
    "dayOfMonth": 1,
    "duration" : {
      "unit" : "months",
      "value" : 1
    }
  },
  "ruleRestrictions": {
    "countries" : {
      "operation": "anyMatch",
      "value": ["US", "CA"]
    },
    "mccs": {
      "operation": "anyMatch",
      "value": ["5541","5542","7538"]
    },
    "totalAmount" : {
      "operation": "greaterThan",
      "value": {
        "value": 50000,
        "currency": "USD"
      }
    }
  },
  "type" : "velocity",
  "outcomeType": "hardBlock"
}
Up to 10 transactions per month for gas station purchases in US and CA

{
  "interval": {
    "type": "rolling",
    "dayOfMonth": 1,
    "duration" : {
      "unit" : "months",
      "value" : 1
    }
  },
  "ruleRestrictions": {
    "countries" : {
      "operation": "anyMatch",
      "value": ["US", "CA"]
    },
    "mccs": {
      "operation": "anyMatch",
      "value": ["5541","5542","7538"]
    },
    "matchingTransactions" : {
      "operation": "greaterThan",
      "value": 10
    }
  },
  "type" : "velocity",
  "outcomeType": "hardBlock"
}

When a payment meets the conditions of either of the two rules, the payment is declined.

Set limits for international transactions

Decline international transactions when the amount exceeds the specified limit.

Example

Block international transactions when the total amount exceeds 50 EUR per day for the payment instrument.

Up to 50 EUR for international transactions per day
{
   "interval": {
    "type": "rolling",
    "timeZone": "Europe/Amsterdam",
    "timeOfDay": "00:00:00",
    "duration": {
        "unit": "days",
        "value": 1
    }
  },
  "entityKey": {
    "entityType": "PaymentInstrument",
    "entityReference": "PI322LZ2233WMJ5F6SDBS45FD"
  },
  "ruleRestrictions": {
    "totalAmount": {
      "operation": "greaterThan",
      "value": {
        "currency": "EUR",
        "value": 5000
      }
    },
    "internationalTransaction": {
      "operation": "equals",
      "value": true
    }
  },
  "type": "velocity",
  "outcomeType": "hardBlock"
}

Set limits for a sliding time window

Decline transactions when the amount exceeds a certain value over a specified time window.

Example

Decline a transaction if the total accumulated amount for the whole balance platform exceeds 2000 EUR in the last 12 hours.

Up to 2000 EUR in the last 12 hours
{
  "entityKey": {
    "entityReference": "YOUR_BALANCE_PLATFORM",
    "entityType": "BalancePlatform"
  },
  "aggregationLevel": "balancePlatform",
  "interval": {
    "type": "sliding",
     "duration":
     {
         "value": "12",
         "unit": "hours"
      }
  },
  "ruleRestrictions": {
    "totalAmount": {
      "operation": "greaterThan",
      "value": {
        "value": 200000,
        "currency": "EUR"
      }
    }
  },
  "type": "velocity",
  "outcomeType": "hardBlock"
}

Set a daily limit for a balance account

Decline transactions when the total amount for all payment instruments in a balance account exceeds a specified limit.

Example

Decline a transaction if the total accumulated amount for a balance account exceeds 1000 EUR within a day. Reset the counter daily at 00:00 Europe/Amsterdam time.

Up to 1000 EUR per day for a balance account

Set a weekly limit for ATM withdrawals

Decline ATM withdrawals when the total amount withdrawn from ATMs exceed the specified limit.

Example

Decline an ATM withdrawal if the total amount withdrawn from an ATM exceeds 2000 EUR every two weeks for the whole balance platform. Reset the counter every Monday at 00:00 Europe/Amsterdam time.

Up to 2000 EUR every two weeks for ATM withdrawals
{
  "entityKey": {
    "entityReference": "YOUR_BALANCE_PLATFORM",
    "entityType": "BalancePlatform"
  },
  "interval": {
    "type": "rolling",
    "timeZone": "Europe/Amsterdam",
    "dayOfWeek": "Monday",
    "timeOfDay": "00:00:00",
    "duration": {
        "unit": "weeks",
        "value": 2
    }
  },
  "ruleRestrictions": {
    "processingTypes": {
      "operation": "anyMatch",
      "value": ["atmWithdraw"]
    },
    "totalAmount": {
      "operation": "greaterThan",
      "value": {
        "value": 200000,
        "currency": "EUR"
      }
    }
  },
  "type": "velocity"
}

Increase score of a payment instrument

Increase the score of a payment instrument when a payment meets the conditions.

Example

Increase the score by 30 when a transaction happens between 11AM to 6PM Europe/Amsterdam time.

Increase score by 30 for transactions between 11AM to 6PM
{
  "interval": {
    "type": "perTransaction"
  },
  "entityKey": {
    "entityType": "PaymentInstrument",
    "entityReference": "PI322VJ223222B5F8CRBP5MH3"
  },
  "ruleRestrictions": {
    "timeOfDay": {
      "operation": "equals",
       "value": {
         "startTime": "10:00:00+01:00",
         "endTime": "17:00:00+01:00"
       }
    }
  },
  "type": "blockList",
  "outcomeType": "scoreBased",
  "score": 30
}

Decrease score of a payment instrument

Decrease the score of a payment instrument when a payment meets the conditions.

Example

Decrease the score by 25 when a payment is made through a token.

Decrease score by 25 for token transactions
{
  "interval": {
    "type": "perTransaction"
  },
  "entityKey": {
    "entityType": "PaymentInstrument",
    "entityReference": "PI322LZ2236D5J5F5SD5R2TRB"
  },
  "ruleRestrictions": {
    "processingTypes": {
      "operation": "anyMatch",
      "value": ["token"]
    }
  },
  "type": "blockList",
  "outcomeType": "scoreBased",
  "score": -25
}