Card Spend Controls

This page will show you how to set card rules

This page explains how to manage card spend controls:

πŸ“˜

Be aware: Spend Controls can only be applied to certain Yordex card schemes

Speak with your Customer Success Manager to find out if your cards are eligable for controls.


Merchant category controls

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

On the Accounts page we showed you that for most transactions we receive an MCC code:

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

It's possible to only block or only allow specific categories on a card. Note, block and allow controls cannot be combined and must be one or the other.

Creating a card with MCC controls:

curl {baseURL}/cards  
-H "Authorization:your-api-key"  
-H "Content-type: application/json"  
-X POST  
-d '{ 
  "userId": "user-id",
  "accountId": "yordex-pay-account-id",
  "currency": "GBP",
  "virtual": false, 
  "shippingAddress": {
  	"address1": "addressLine1",
 	  "address2": "addressLine2",
	  "postalCode": "postalCode",
	  "city": "city",
	  "countryCode": "GB"
  },
  "mccSpendControls": {
  "allowed": "true/false",
  "mccs": [
      {
       "code": "4121",
       "merchantName": "Taxicabs and Limousines"
      },
      {
       "code": "4816",
       "merchantName": "Computer Network Services"
      }
    ]
  }
}'

Applying a MCC controls to a card:

curl {baseURL}/cards/:cardId/spendcontrols
-H "Authorization:your-api-key"  
-H "Content-type: application/json"  
-X PUT  '{
  "mccSpendControls": {
    "allowed": "true/false",
    "mccs": [
      {
        "code": "4121",
        "merchantName": "Taxicabs and Limousines"
      },
      {
       "code": "4816",
       "merchantName": "Computer Network Services"
      }
    ]
  }
}'

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

Successful requests will return a 204 response.

A full list of MCC codes can be found here.

🚧

PUT can delete previously specified MCCs

Updating spendcontrols 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

A card can not have both allowed and not allowed lists.


Per-transaction limit

A per-transaction limit can be added to an individual card which determines the maximum value of a single transaction a card is allowed to make. Be aware, cards can make multiple transactions if they fall below the per-transaction limit - this control only limits a single transaction.

Creating a card with a per-transaction limit:

curl {baseURL}/cards  
-H "Authorization:your-api-key"  
-H "Content-type: application/json"  
-X POST  
-d '{ 
  "userId": "user-id",
  "accountId": "yordex-pay-account-id",
  "currency": "GBP",
  "virtual": false, 
  "shippingAddress": {
  	"address1": "addressLine1",
 	  "address2": "addressLine2",
	  "postalCode": "postalCode",
	  "city": "city",
	  "countryCode": "GB"
  },
  "amountSpendControls":[
        {
            "amountInCents":1234,
            "velocityType":"PER_TRANSACTION"
        }
    ]
}'

Note: this is a sample request, please use our card creation guide to determine the fields you require.

Applying per-transaction limit to an existing card:

curl {baseURL}/cards/:cardId/spendcontrols
-H "Authorization:your-api-key"  
-H "Content-type: application/json"  
-X PUT  '{
    "amountSpendControls":[
        {
            "amountInCents":1234,
            "velocityType":"PER_TRANSACTION"
        }
    ]
}'

Successful requests will return a 204 response.