---
updatedAt: 2026-04-21T09:29:18.000Z
agentTools:
  projectIndex: https://partner.getpliant.com/llms.txt
---

# Change Card Controls

> 🔒 **Required scope:** `cards:write`
>
> The API credential calling this endpoint must be granted the `cards` category with `read & write` access.
> Scopes are assigned to the credential when it is created or edited in Pliant, not requested when obtaining the access token.
> A credential without this scope receives `403 Forbidden` with the error code `INSUFFICIENT_PERMISSION`.

Updates card controls for a single card. If the card control does not exist, it will be created. If the card control exists, it will be updated with the given values. Thus when updating, you have to provide all the values for the card control you want to set. Missing or not provided values are deleted if they exist.


# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "contact": {
      "name": "API Support",
      "email": "support@getpliant.com",
      "url": "https://www.getpliant.com"
    },
    "title": "Pliant Partner API",
    "description": "Pliant Partner API",
    "version": "2.1.0",
    "license": {
      "name": "MIT",
      "url": "https://opensource.org/license/MIT"
    }
  },
  "servers": [
    {
      "url": "https://partner-api.getpliant.com/api",
      "description": "Pliant Production Server"
    },
    {
      "url": "https://sandbox.partner-api.getpliant.com/api",
      "description": "Pliant Sandbox Server"
    },
    {
      "url": "https://pci-api.getpliant.com",
      "description": "PCI Vault Production Server"
    },
    {
      "url": "https://pci-sandbox.partner-api.getpliant.com",
      "description": "PCI Vault Sandbox Server"
    }
  ],
  "x-readme": {
    "explorer-enabled": false,
    "samples-languages": [
      "curl",
      "java",
      "kotlin"
    ],
    "headers": [
      {
        "key": "Pliant-API-Version",
        "value": "2.1.0"
      }
    ]
  },
  "tags": [
    {
      "name": "Card Controls",
      "description": "This tag is for operations related to card controls"
    }
  ],
  "paths": {
    "/cards/{cardId}/card-controls": {
      "put": {
        "summary": "Change Card Controls",
        "description": "> 🔒 **Required scope:** `cards:write`\n>\n> The API credential calling this endpoint must be granted the `cards` category with `read & write` access.\n> Scopes are assigned to the credential when it is created or edited in Pliant, not requested when obtaining the access token.\n> A credential without this scope receives `403 Forbidden` with the error code `INSUFFICIENT_PERMISSION`.\n\nUpdates card controls for a single card. If the card control does not exist, it will be created. If the card control exists, it will be updated with the given values. Thus when updating, you have to provide all the values for the card control you want to set. Missing or not provided values are deleted if they exist.\n",
        "x-required-scopes": [
          "cards:write"
        ],
        "tags": [
          "Card Controls"
        ],
        "operationId": "update-card-controls-by-card",
        "parameters": [
          {
            "name": "cardId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the card.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CardControls"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content. The card controls are saved when this response is returned."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "This API uses oAuth2 with client credentials flow to [obtain the Bearer Token](/docs/authenticated-api-usage).",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "CardControls": {
        "type": "object",
        "properties": {
          "categories": {
            "type": "object",
            "nullable": true,
            "required": [
              "type",
              "values",
              "restriction"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "MCC",
                  "CATEGORY"
                ],
                "description": "Type of the category control to use. `MCC` represents the merchant category code as defined by card networks, whereas `CATEGORY` is a Pliant internal grouping of transactions done with a credit card. Both values can be found in the response from the [transaction details endpoint](./get-transactions-detail-batch) or in our [guide section](/docs/card-controls-1)."
              },
              "values": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Values for this category control which should be allowed or blocked. Can be either a list of `MCCs` or Pliant's payment categories. Both values can be found in the response from the [transaction details endpoint](./get-transactions-detail-batch) or in our [guide section](/docs/card-controls-1)."
              },
              "restriction": {
                "type": "string",
                "enum": [
                  "ALLOWED",
                  "BLOCKED"
                ]
              }
            }
          },
          "merchants": {
            "type": "object",
            "nullable": true,
            "required": [
              "type",
              "values",
              "restriction"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "MATCH_TERM",
                  "MID"
                ],
                "description": "Type of the merchant control to use. `MATCH_TERM` is the merchant name to match. Matching here works by checking if the provided term is part of a merchant name, the check is case insensitive. `MID` represents the merchant identifier as assigned by the card network. It can be found in the [transaction details response](./get-transactions-detail-batch). There it is named `mid`."
              },
              "values": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Values for this merchant control which should be allowed or blocked."
              },
              "restriction": {
                "type": "string",
                "enum": [
                  "ALLOWED",
                  "BLOCKED"
                ]
              }
            }
          },
          "dates": {
            "type": "object",
            "nullable": true,
            "required": [
              "type",
              "values",
              "timezone",
              "restriction"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "YEARLY",
                  "MONTHLY",
                  "WEEKLY",
                  "FIXED"
                ],
                "description": "Type of the date control to use. `YEARLY`, `MONTHLY` and `WEEKLY` are recurring dates, whereas `FIXED` is a fixed date range."
              },
              "values": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Values for this date control which should be allowed or blocked.\n`YEARLY`, `MONTHLY` and `FIXED` each take exactly one value. A second value is rejected.\n`WEEKLY` takes one or more weekdays.\nPatterns:\n`YEARLY`: one range `dd.MM-dd.MM`.\n`MONTHLY`: one range `dd-dd`. Days are `01` to `28`, or `last`, `last-1` or `last-2` for the last day of the month or one to two days before.\n`WEEKLY`: one or more of `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`.\n`FIXED`: one range `dd.MM.yyyy-dd.MM.yyyy`.\nTo block transactions at the end of the month, use `MONTHLY` with the single value `20-last`.\n"
              },
              "timezone": {
                "type": "string",
                "description": "Timezone to use for the date control. A list of valid timezones can be found in our [guide section](/docs/card-controls-1)."
              },
              "restriction": {
                "type": "string",
                "enum": [
                  "ALLOWED",
                  "BLOCKED"
                ]
              }
            }
          },
          "times": {
            "type": "object",
            "nullable": true,
            "required": [
              "type",
              "values",
              "timezone",
              "restriction"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "TIMERANGE"
                ],
                "description": "Type of the time control. Currently only `TIMERANGE` is supported."
              },
              "values": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Only one time range is allowed for this control. The allowed pattern is `HH:mm-HH:mm`.\nSo for example if you want to block all transactions between 10pm and 6am, you can use `TIMERANGE` with the value `22:00-06:00`.\n"
              },
              "timezone": {
                "type": "string",
                "description": "Timezone to use for the time control. A list of valid timezones can be found in our [guide section](/docs/card-controls-1)."
              },
              "restriction": {
                "type": "string",
                "enum": [
                  "ALLOWED",
                  "BLOCKED"
                ]
              }
            }
          },
          "locations": {
            "type": "object",
            "nullable": true,
            "required": [
              "type",
              "values",
              "restriction"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "POSTAL_CODE",
                  "REGION"
                ],
                "description": "Type of the location-based control.\n- `POSTAL_CODE`: Then `values` are postal codes\n- `REGION`: Then `values` are region IDs of your organization\n"
              },
              "values": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Values for this location control which should be allowed or blocked.\nFor `POSTAL_CODE`, each value is matched in full and case-insensitively against the merchant postal code. A shorter value is not a prefix, and `*` is not a wildcard: `68` matches only `68`, and `68*` matches only the literal `68*`.\nFor `REGION`, each value is a region ID of your organization.\nIf the transaction has no merchant postal code, this control does not decline it.\nExample: to block postal codes `12345` and `67890`, send both values with restriction `BLOCKED`.\n"
              },
              "restriction": {
                "type": "string",
                "enum": [
                  "ALLOWED",
                  "BLOCKED"
                ]
              }
            }
          },
          "countries": {
            "type": "object",
            "nullable": true,
            "required": [
              "restriction",
              "values"
            ],
            "description": "Optional object defining country-based transaction restrictions.\nYou can configure cards to either allow transactions only in specified countries (whitelist)\nor block transactions in specified countries (blacklist).\nCountry codes must be valid ISO 3166-1 alpha-3 codes (e.g., `DEU`, `AUT`, `USA`).\nThis control is not available for US-issued cards.\n",
            "properties": {
              "restriction": {
                "type": "string",
                "enum": [
                  "ALLOWED",
                  "BLOCKED"
                ],
                "description": "Defines the restriction type for the country control.\n- `ALLOWED`: Only transactions in the listed countries are permitted (whitelist).\n- `BLOCKED`: Transactions in the listed countries are declined (blacklist).\n"
              },
              "values": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "List of ISO 3166-1 alpha-3 country codes (e.g., `DEU`, `AUT`, `USA`).\nAt least one country code must be provided.\n"
              }
            }
          },
          "currencies": {
            "type": "object",
            "nullable": true,
            "required": [
              "restriction",
              "values"
            ],
            "description": "Optional object defining currency-based transaction restrictions.\nYou can configure cards to either allow transactions only in specified currencies (whitelist)\nor block transactions in specified currencies (blacklist).\nCurrency codes must be valid ISO 4217 codes (e.g., `EUR`, `GBP`, `USD`).\n",
            "properties": {
              "restriction": {
                "type": "string",
                "enum": [
                  "ALLOWED",
                  "BLOCKED"
                ],
                "description": "Defines the restriction type for the currency control.\n- `ALLOWED`: Only transactions in the listed currencies are permitted (whitelist).\n- `BLOCKED`: Transactions in the listed currencies are declined (blacklist).\n"
              },
              "values": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "List of ISO 4217 currency codes (e.g., `EUR`, `GBP`, `USD`).\nAt least one currency code must be provided.\n"
              }
            }
          },
          "acceptanceMethods": {
            "type": "object",
            "nullable": true,
            "required": [
              "type",
              "values",
              "restriction"
            ],
            "description": "Optional object defining which acceptance methods are permitted.\nThis control is an allow-list only. `restriction` must be `ALLOWED`.\nThe methods in `values` are the only ones permitted; every other method is declined.\nThere is no block-list. Do not send `BLOCKED`: it is not applied, and the methods in `values` are stored as the allowed set.\n",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "ACCEPTANCE_METHOD"
                ],
                "description": "Type of the acceptance method control to use. Currently only `ACCEPTANCE_METHOD` is supported.\n"
              },
              "values": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "ONLINE",
                    "MOBILE_WALLET",
                    "MANUAL_ENTRY",
                    "CONTACTLESS",
                    "CHIP_DIP",
                    "NOT_AVAILABLE",
                    "MAGNETIC_STRIPE",
                    "OTHER"
                  ]
                },
                "description": "List of acceptance methods that are allowed for transactions. \nOnly the methods listed here will be permitted if this control is provided.\nPossible values:\n- `ONLINE`: Card-not-present transactions\n- `MOBILE_WALLET`: Payments via mobile wallets (e.g., Apple Pay, Google Pay)\n- `MANUAL_ENTRY`: Card number entered manually\n- `CONTACTLESS`: Tap-based payments\n- `CHIP_DIP`: Inserted chip transactions\n- `NOT_AVAILABLE`: Transactions where acceptance method information is unavailable\n- `MAGNETIC_STRIPE`: Swipe-based payments\n- `OTHER`: Any other unspecified acceptance method\n"
              },
              "restriction": {
                "type": "string",
                "enum": [
                  "ALLOWED"
                ],
                "description": "Must be `ALLOWED`. Only the methods in `values` are permitted.\n`BLOCKED` is not a supported restriction and does not block the methods in `values`.\n"
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "description": "The error code"
          },
          "exceptionId": {
            "type": "string",
            "format": "uuid",
            "description": "The id of the exception that was thrown"
          },
          "message": {
            "type": "string",
            "description": "The cause of the error or further explanations on the error"
          }
        }
      }
    },
    "responses": {
      "400": {
        "description": "Bad Request. The API consumer sent a malformed request which could not be processed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "401": {
        "description": "Unauthorized. The API consumer is not authorized to access the requested resource.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "403": {
        "description": "Forbidden. The API consumer is not allowed to access the requested resource.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "404": {
        "description": "Not Found. The requested resource could not be found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "500": {
        "description": "Internal Server Error. The request was not completed due to an internal error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ]
}
```