Controls

Set spending controls to limit how much can be spent over a given period of time.

Create a control

Creates a control and applies it to the specified target.

Headers
  • Cko-Idempotency-Key
    Type: string
    min length:  
    1
    max length:  
    256
    Pattern: ^[A-Za-z0-9._-]+$

    An optional idempotency key for safely retrying Issuing requests.

Body·
required
application/json

The control to create.

  • The control to create.

    The control to create.

    • control_type
      Discriminator
      Type: string · enum
      required

      The control's type.

      A velocity_limit determines how much can be spent over a given period of time. An mcc_limit determines the types of businesses from which transactions can be processed. A mid_limit specifies the merchants from whom transactions can be processed.

      values
      • velocity_limit
      • mcc_limit
      • mid_limit
    • 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.

    • velocity_limit
      Type: object ·
      required

      The velocity limit, which determines how much a target card can spend over a given timeframe.

    • description
      Type: string
      max length:  
      256

      A description for the control.

Responses
  • application/json
  • 401

    Unauthorized

  • 404

    Target not found

  • application/json
  • 500

    Internal Server Error

  • 503

    Service Unavailable

Request Example for post/issuing/controls
curl 'https://{prefix}.api.sandbox.checkout.com/issuing/controls' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "description": "Maximum spend of 500€ per week for restaurants",
  "control_type": "velocity_limit",
  "target_id": "crd_fa6psq42dcdd6fdn5gifcq1491",
  "velocity_limit": {
    "amount_limit": 50000,
    "velocity_window": {
      "type": "weekly"
    },
    "mcc_list": [
      ""
    ],
    "mid_list": [
      "1234567890"
    ]
  }
}'
{
  "id": "ctr_gp7vkmxayztufjz6top5bjcdra",
  "description": "Maximum spend of 500€ per week for restaurants",
  "control_type": "velocity_limit",
  "target_id": "crd_fa6psq42dcdd6fdn5gifcq1491",
  "is_editable": true,
  "created_date": "2023-03-12T18:20:12Z",
  "last_modified_date": "2023-03-12T18:20:12Z",
  "velocity_limit": {
    "amount_limit": 50000,
    "velocity_window": {
      "type": "weekly"
    },
    "mcc_list": [
      "4121",
      "4582"
    ]
  },
  "_links": {
    "self": {
      "href": "https://{prefix}.api.checkout.com/issuing/controls/ctr_gp7vkmxayztufjz6top5bjcdra",
      "actions": [
        "GET"
      ],
      "types": [
        "application/json"
      ]
    }
  }
}

Get controls by target

Retrieves a list of spending controls 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
Shell Curl
curl 'https://{prefix}.api.sandbox.checkout.com/issuing/controls?target_id=crd_fa6psq42dcdd6fdn5gifcq1491' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "controls": [
    {
      "id": "ctr_gp7vkmxayztufjz6top5bjcdra",
      "target_id": "crd_fa6psq42dcdd6fdn5gifcq1491",
      "description": "Maximum spend of 500€ per week for restaurants",
      "control_type": "velocity_limit",
      "is_editable": true,
      "created_date": "2021-09-09T19:41:39Z",
      "last_modified_date": "2021-09-09T19:41:39Z",
      "velocity_limit": {
        "amount_remaining": 45000,
        "amount_limit": 50000,
        "velocity_window": {
          "type": "weekly"
        },
        "mcc_list": [
          "4121",
          "4582"
        ]
      }
    },
    {
      "id": "ctr_gp7vkmxayztufjz6top5bjcdra",
      "target_id": "crd_fa6psq42dcdd6fdn5gifcq1491",
      "description": "Allow the card to be used only in restaurants and supermarkets",
      "control_type": "mcc_limit",
      "is_editable": true,
      "created_date": "2021-09-09T19:41:39Z",
      "last_modified_date": "2021-09-09T19:41:39Z",
      "mcc_limit": {
        "type": "allow",
        "mcc_list": [
          "5932",
          "5411"
        ]
      }
    },
    {
      "id": "ctr_gp7vkmxayztufjz6top5bjcdra",
      "target_id": "crd_fa6psq42dcdd6fdn5gifcq1491",
      "description": "Allow the card to be used only in AZ Pizza",
      "control_type": "mid_limit",
      "is_editable": true,
      "created_date": "2021-09-09T19:41:39Z",
      "last_modified_date": "2021-09-09T19:41:39Z",
      "mid_limit": {
        "type": "allow",
        "mid_list": [
          "593278",
          "541114"
        ]
      }
    }
  ]
}

Get control details

Retrieves the details of an existing control.

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

    The control's unique identifier.

Query Parameters
  • cardId
    Type: string ·
    min length:  
    30
    max length:  
    30
    Pattern: ^crd_[a-z0-9]{26}$

    The unique identifier for the card you want to get the remaining cascading velocity control for.

    The card's unique identifier.

Responses
  • application/json
  • 401

    Unauthorized

  • 404

    Control not found

  • 500

    Internal Server Error

Request Example for get/issuing/controls/{controlId}
Shell Curl
curl 'https://{prefix}.api.sandbox.checkout.com/issuing/controls/ctr_gp7vkmxayztufjz6top5bjcdra' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": "ctr_gp7vkmxayztufjz6top5bjcdra",
  "target_id": "crd_fa6psq42dcdd6fdn5gifcq1491",
  "description": "Maximum spend of 500€ per week for restaurants",
  "control_type": "velocity_limit",
  "is_editable": true,
  "created_date": "2023-03-12T18:20:12Z",
  "last_modified_date": "2023-03-12T18:20:12Z",
  "velocity_limit": {
    "amount_remaining": 45000,
    "amount_limit": 50000,
    "velocity_window": {
      "type": "weekly"
    },
    "mcc_list": [
      "4121",
      "4582"
    ]
  }
}

Update a control

Updates an existing control.

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

    The control's unique identifier.

Body
required
application/json
  • The control you want to update.

    You can update only one control per request.

    • description
      Type: string
      max length:  
      256

      A description for the control.

    • mcc_limit
      Type: object ·

      The merchant category code (MCC) rule, which determines the types of businesses transactions can be processed from.

Responses
  • application/json
  • 401

    Unauthorized

  • 404

    Control not found

  • application/json
  • 500

    Internal Server Error

  • 503

    Service Unavailable

Request Example for put/issuing/controls/{controlId}
curl 'https://{prefix}.api.sandbox.checkout.com/issuing/controls/ctr_gp7vkmxayztufjz6top5bjcdra' \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "description": "Allow the card to be used only in restaurants and supermarkets",
  "mcc_limit": {
    "type": "allow",
    "mcc_list": [
      "5932",
      "5411"
    ]
  }
}'
{
  "id": "ctr_gp7vkmxayztufjz6top5bjcdra",
  "target_id": "crd_fa6psq42dcdd6fdn5gifcq1491",
  "description": "Maximum spend of 500€ per week for restaurants",
  "control_type": "velocity_limit",
  "is_editable": true,
  "created_date": "2023-03-12T18:20:12Z",
  "last_modified_date": "2023-03-12T18:20:12Z",
  "velocity_limit": {
    "amount_remaining": 45000,
    "amount_limit": 50000,
    "velocity_window": {
      "type": "weekly"
    },
    "mcc_list": [
      "4121",
      "4582"
    ]
  }
}

Remove a control

Removes an existing control from the target it was applied to.

If you want to reapply an equivalent control to the target, you must create a new control.

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

    The control's unique identifier.

Responses
  • application/json
  • 401

    Unauthorized

  • 404

    Control not found

  • application/json
  • 500

    Internal Server Error

  • 503

    Service Unavailable

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