Control groups

Create a control group

Creates a control group and applies it to the specified target.

Body·
required
application/json

The control group to create.

  • target_id
    Type: string ·
    min length:  
    30
    max length:  
    30
    Pattern: ^(crd|cpr)_[a-z0-9]{26}$
    required

    The ID of the card or control profile to apply the control to. Note that control profiles cannot be a target for velocity_limit controls.

  • fail_if
    Type: string · enum
    required

    Sets how to determine the result of the group.

    values
    • all_fail
    • any_fail
  • controls
    Type: array object[] ·
    required

    The controls that belong to the group.

    The control to create.

  • description
    Type: string
    max length:  
    256

    A description for the control group.

Responses
  • application/json
  • 401

    Unauthorized

  • 404

    Target not found

  • application/json
  • 500

    Internal Server Error

  • 503

    Service Unavailable

Request Example for post/issuing/controls/control-groups
curl 'https://{prefix}.api.sandbox.checkout.com/issuing/controls/control-groups' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "description": "Block grocery shopping except Walmart",
  "fail_if": "all_fail",
  "target_id": "crd_fa6psq42dcdd6fdn5gifcq1491",
  "controls": [
    {
      "description": "Block the card being used for groceries",
      "control_type": "mcc_limit",
      "mcc_limit": {
        "type": "block",
        "mcc_list": [
          "5422"
        ]
      }
    },
    {
      "description": "Allow the card to be used at Walmart",
      "control_type": "mid_limit",
      "mid_limit": {
        "type": "allow",
        "mid_list": [
          "1234"
        ]
      }
    }
  ]
}'
{
  "id": "cgr_oemoyd3otivelkhf4zcnimwdva",
  "description": "Block grocery shopping except Walmart",
  "target_id": "crd_dba7tjsh7utufgid7yety4gnxq",
  "fail_if": "all_fail",
  "controls": [
    {
      "mcc_limit": {
        "type": "block",
        "mcc_list": [
          "5422"
        ]
      },
      "description": "Block the card being used for groceries",
      "control_type": "mcc_limit"
    },
    {
      "mid_limit": {
        "type": "allow",
        "mid_list": [
          "1234"
        ]
      },
      "description": "Allow the card to be used at Walmart",
      "control_type": "mid_limit"
    }
  ],
  "is_editable": true,
  "created_date": "2023-12-06T14:01:31.7155085Z",
  "last_modified_date": "2023-12-06T14:01:31.7155085Z",
  "_links": {
    "self": {
      "href": "https://{prefix}.api.checkout.com/issuing/controls/control-groups/cgr_oemoyd3otivelkhf4zcnimwdva",
      "actions": [
        "GET"
      ],
      "types": [
        "application/json"
      ]
    }
  }
}

Get a target's control groups

Retrieves a list of control groups applied to the specified target.

Query Parameters
  • target_id
    Type: string ·
    min length:  
    30
    max length:  
    30
    Pattern: ^(crd|cpr)_[a-z0-9]{26}$
    required

    The ID of the card or control profile.

Responses
  • application/json
  • 401

    Unauthorized

  • 404

    Target not found

  • application/json
  • 500

    Internal Server Error

Request Example for get/issuing/controls/control-groups
Shell Curl
curl 'https://{prefix}.api.sandbox.checkout.com/issuing/controls/control-groups?target_id=crd_fa6psq42dcdd6fdn5gifcq1491' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "control_groups": [
    {
      "id": "cgr_oemoyd3otivelkhf4zcnimwdva",
      "description": "Block grocery shopping except Walmart",
      "target_id": "crd_dba7tjsh7utufgid7yety4gnxq",
      "fail_if": "all_fail",
      "controls": [
        {
          "mcc_limit": {
            "type": "block",
            "mcc_list": [
              "5422"
            ]
          },
          "description": "Block the card being used for groceries",
          "control_type": "mcc_limit"
        },
        {
          "mid_limit": {
            "type": "allow",
            "mid_list": [
              "1234"
            ]
          },
          "description": "Allow the card to be used at Walmart",
          "control_type": "mid_limit"
        }
      ],
      "is_editable": true,
      "created_date": "2023-12-06T14:01:31.7155085Z",
      "last_modified_date": "2023-12-06T14:01:31.7155085Z"
    },
    {
      "id": "cgr_xvrszbgkaifuflnslzkt2uimkm",
      "description": "Allow restaurants except McDonalds",
      "target_id": "crd_dba7tjsh7utufgid7yety4gnxq",
      "fail_if": "all_fail",
      "controls": [
        {
          "mcc_limit": {
            "type": "allow",
            "mcc_list": [
              "6789"
            ]
          },
          "description": "Allow the card being used for restaurants",
          "control_type": "mcc_limit"
        },
        {
          "mid_limit": {
            "type": "block",
            "mid_list": [
              "9876"
            ]
          },
          "description": "Block the card to be used at McDonalds",
          "control_type": "mid_limit"
        }
      ],
      "is_editable": true,
      "created_date": "2023-12-06T14:01:31.7155085Z",
      "last_modified_date": "2023-12-06T14:01:31.7155085Z"
    }
  ]
}

Get control group details

Retrieves the details of a control group you created previously.

Path Parameters
  • controlGroupId
    Type: string ·
    min length:  
    30
    max length:  
    30
    Pattern: ^cgr_[a-z0-9]{26}$
    required

    The control group's unique identifier.

Responses
  • application/json
  • 401

    Unauthorized

  • 404

    Control group not found

  • 500

    Internal Server Error

Request Example for get/issuing/controls/control-groups/{controlGroupId}
Shell Curl
curl 'https://{prefix}.api.sandbox.checkout.com/issuing/controls/control-groups/cgr_oemoyd3otivelkhf4zcnimwdva' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": "cgr_oemoyd3otivelkhf4zcnimwdva",
  "description": "Block grocery shopping except Walmart",
  "target_id": "crd_dba7tjsh7utufgid7yety4gnxq",
  "fail_if": "all_fail",
  "controls": [
    {
      "mcc_limit": {
        "type": "block",
        "mcc_list": [
          "5422"
        ]
      },
      "description": "Block the card being used for groceries",
      "control_type": "mcc_limit"
    },
    {
      "mid_limit": {
        "type": "allow",
        "mid_list": [
          "1234"
        ]
      },
      "description": "Allow the card to be used at Walmart",
      "control_type": "mid_limit"
    }
  ],
  "is_editable": true,
  "created_date": "2023-12-06T14:01:31.7155085Z",
  "last_modified_date": "2023-12-06T14:01:31.7155085Z",
  "_links": {
    "self": {
      "href": "https://{prefix}.api.checkout.com/issuing/controls/control-groups/cgr_oemoyd3otivelkhf4zcnimwdva",
      "actions": [
        "GET"
      ],
      "types": [
        "application/json"
      ]
    }
  }
}

Remove a control group

Removes the control group and all the controls it contains.

If you want to reapply an equivalent control group to the card, you'll need to create a new control group.

Path Parameters
  • controlGroupId
    Type: string ·
    min length:  
    30
    max length:  
    30
    Pattern: ^cgr_[a-z0-9]{26}$
    required

    The control group's unique identifier.

Responses
  • application/json
  • 401

    Unauthorized

  • 404

    Control group not found

  • application/json
  • 500

    Internal Server Error

  • 503

    Service Unavailable

Request Example for delete/issuing/controls/control-groups/{controlGroupId}
Shell Curl
curl 'https://{prefix}.api.sandbox.checkout.com/issuing/controls/control-groups/cgr_oemoyd3otivelkhf4zcnimwdva' \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": "cgr_oemoyd3otivelkhf4zcnimwdva"
}