Card rules

This page will show you how to set card rules

This page explains who to manage card rules:

Get existing card rules

Call this API to get the existing card rules

curl {baseURL}/cardlimits  
-H "Authorization:your-api-key"  
-X GET

The response will look like this

{
   "cardLimits": [
       {
           "id": "cardlimit-id",
           "name": "Contractors",
           "default": true,
           "limitRule": {
               "mccBlacklist": [
                   {
                       "mcc": "7801",
                       "name" : "Government-Licensed On-Line Casinos (On-Line Gambling)"
                   }
               ]
           }
       }
   ]
}

id is a unique id for this rule and name can be anything and will help you distinguish between different card rules you have. You can have many card rules each with a different id and name.

If you have card rules specified, every card has to have a rule. The rule with default:true rule will be set if you do not specify the card rule for a card so you always have to have one default rule.

In this example there is a mccBlackList. It is also possible to have a mccWhiteList, midBlackList or midWhiteList. It is however not possible to have more than one type per rule, so you can't have a mccBlackList and mccWhiteList or a mccBlackList and midBlackList etc. in the same rule.

Merchant blocking

Visa and MasterCard use Merchant IDs (MIDs) to indicate merchants.

On the Accounts page we showed you that for most transactions we receive the mid:

"mid": "merchant-id",

You can block or allow specific MIDs using card rules:

curl {baseURL}/cardlimits/cardlimit-id
-H "Authorization:your-api-key"  
-H "Content-type: application/json"  
-X PUT  '{
  "name" : "Contractors", 
  "limitRule" : {
    "midWhitelist" : [
      {
        "mid":"359857239",
        "merchantName":"Tesco"
      }
    ]
  }
}'

If you use a midWhiteList only MIDs included in the list will be accepted. Payments at any other MID will be blocked. You can also specify a midBlackList .

There is no universally available list of MIDs. If you need help building your list of MIDs to white- or blacklist, please contact us.

The card rule name can also be updated using this API call.

🚧

PUT can delete previously specified MIDs

Updating cardLimits is a PUT. That means that if you want to add one MID to the list, you need to specify that MID plus all previously added MIDs in the request. If you do not add previously added MIDs, they will be deleted from the list

Merchant category blocking

Visa and MasterCard have their own lists of merchant categories (MCC).

On the Accounts page we showed you that for most transactions we receive the mcc:

"mcc": "7801",
"mccDescription": "merchant category description",

You can block or allow specific MCC using card rules:

curl {baseURL}/cardlimits/cardlimit-id
-H "Authorization:your-api-key"  
-H "Content-type: application/json"  
-X PUT  '{
  "name" : "Contractors", 
  "limitRule" : {
    "mccWhitelist" : [
      {
        "mcc":"7801"
      }
    ]
  }
}'

All full list of MCC codes can be found here. You do not need to specify the Name of the MCC in the request, that will be returned in the response as shown at the top of this page.

If you use a mccWhiteList only MCCs included in the list will be accepted. Payments at any other MCC will be blocked. You can also specify a mccBlackList .

The card rule name can also be updated using this API call.

🚧

PUT can delete previously specified MCCs

As with MIDs, updating cardLimits is a PUT. That means that if you want to add one MCC to the list, you need to specify that MCC plus all previously added MCCs in the request. If you do not add previously added MCCs, they will be deleted from the list

ATM blocking

You can block usage of ATMs on a card by adding MCC '6011' to the MCC block list

Velocity limits

Velocity limits define how many transactions can be made by day, week or month.

Velocity limits can today not be changed by API. They are linked to the cardProgram which is specified when creating the card.

The most common velocity limits can be found here.


What’s Next