Set card controls
api reference limit the amount of money that can be spent through different channels in a given period you can update controls on existing card without reissuing the card { "name" "endpoint /cardmanagement/v1/cards/{cardid}/controls", "method" "put", "url" "https //sandbox crbcos com/cardmanagement/v1/cards/{cardid}/controls", "description" "", "tab" "examples", "examples" { "languages" \[ { "id" "hiyb6hxbzbif03ihcjxah", "language" "curl", "code" "curl location request put 'https //sandbox crbcos com/cardmanagement/v1/cards/cc25620c d865 4801 9128 b44700ccb94c/controls' \\\\\n data '{\n \\"authorizationcontrols\\" \[\n {\n \\"type\\" \\"country\\",\n \\"action\\" \\"allow\\",\n \\"list\\" \[\n \\"string\\"\n ]\n }\n ],\n \\"velocitycontrols\\" \[\n {\n \\"type\\" \\"pos\\",\n \\"action\\" \\"allow\\",\n \\"list\\" \[\n {\n \\"period\\" \\"day\\",\n \\"amount\\" 0,\n \\"usagelimit\\" 0\n }\n ],\n \\"cashback\\" \\"allow\\"\n }\n ]\n}'", "customlabel" "" }, { "id" "ft5vkqvlm1ibrbf8xc9i5", "language" "nodejs", "code" "var https = require('follow redirects') https;\nvar fs = require('fs');\n\nvar options = {\n 'method' 'put',\n 'hostname' 'sandbox crbcos com',\n 'path' '/cardmanagement/v1/cards/cc25620c d865 4801 9128 b44700ccb94c/controls',\n 'headers' {\n },\n 'maxredirects' 20\n};\n\nvar req = https request(options, function (res) {\n var chunks = \[];\n\n res on(\\"data\\", function (chunk) {\n chunks push(chunk);\n });\n\n res on(\\"end\\", function (chunk) {\n var body = buffer concat(chunks);\n console log(body tostring());\n });\n\n res on(\\"error\\", function (error) {\n console error(error);\n });\n});\n\nvar postdata = \\"{\\\r\\\n \\\\\\"authorizationcontrols\\\\\\" \[\\\r\\\n {\\\r\\\n \\\\\\"type\\\\\\" \\\\\\"country\\\\\\",\\\r\\\n \\\\\\"action\\\\\\" \\\\\\"allow\\\\\\",\\\r\\\n \\\\\\"list\\\\\\" \[\\\r\\\n \\\\\\"string\\\\\\"\\\r\\\n ]\\\r\\\n }\\\r\\\n ],\\\r\\\n \\\\\\"velocitycontrols\\\\\\" \[\\\r\\\n {\\\r\\\n \\\\\\"type\\\\\\" \\\\\\"pos\\\\\\",\\\r\\\n \\\\\\"action\\\\\\" \\\\\\"allow\\\\\\",\\\r\\\n \\\\\\"list\\\\\\" \[\\\r\\\n {\\\r\\\n \\\\\\"period\\\\\\" \\\\\\"day\\\\\\",\\\r\\\n \\\\\\"amount\\\\\\" 0,\\\r\\\n \\\\\\"usagelimit\\\\\\" 0\\\r\\\n }\\\r\\\n ],\\\r\\\n \\\\\\"cashback\\\\\\" \\\\\\"allow\\\\\\"\\\r\\\n }\\\r\\\n ]\\\r\\\n}\\";\n\nreq write(postdata);\n\nreq end();", "customlabel" "" }, { "id" "ikg44td3zax081w4orxvv", "language" "python", "code" "import requests\n\nurl = \\"https //sandbox crbcos com/cardmanagement/v1/cards/cc25620c d865 4801 9128 b44700ccb94c/controls\\"\n\npayload = \\"{\\\r\\\n \\\\\\"authorizationcontrols\\\\\\" \[\\\r\\\n {\\\r\\\n \\\\\\"type\\\\\\" \\\\\\"country\\\\\\",\\\r\\\n \\\\\\"action\\\\\\" \\\\\\"allow\\\\\\",\\\r\\\n \\\\\\"list\\\\\\" \[\\\r\\\n \\\\\\"string\\\\\\"\\\r\\\n ]\\\r\\\n }\\\r\\\n ],\\\r\\\n \\\\\\"velocitycontrols\\\\\\" \[\\\r\\\n {\\\r\\\n \\\\\\"type\\\\\\" \\\\\\"pos\\\\\\",\\\r\\\n \\\\\\"action\\\\\\" \\\\\\"allow\\\\\\",\\\r\\\n \\\\\\"list\\\\\\" \[\\\r\\\n {\\\r\\\n \\\\\\"period\\\\\\" \\\\\\"day\\\\\\",\\\r\\\n \\\\\\"amount\\\\\\" 0,\\\r\\\n \\\\\\"usagelimit\\\\\\" 0\\\r\\\n }\\\r\\\n ],\\\r\\\n \\\\\\"cashback\\\\\\" \\\\\\"allow\\\\\\"\\\r\\\n }\\\r\\\n ]\\\r\\\n}\\"\nheaders = {\n\n}\n\nresponse = requests request(\\"put\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "jmuima3fr9sbhutatvesd", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //sandbox crbcos com/cardmanagement/v1/cards/cc25620c d865 4801 9128 b44700ccb94c/controls\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http put new(url)\nrequest body = \\"{\\\r\\\n \\\\\\"authorizationcontrols\\\\\\" \[\\\r\\\n {\\\r\\\n \\\\\\"type\\\\\\" \\\\\\"country\\\\\\",\\\r\\\n \\\\\\"action\\\\\\" \\\\\\"allow\\\\\\",\\\r\\\n \\\\\\"list\\\\\\" \[\\\r\\\n \\\\\\"string\\\\\\"\\\r\\\n ]\\\r\\\n }\\\r\\\n ],\\\r\\\n \\\\\\"velocitycontrols\\\\\\" \[\\\r\\\n {\\\r\\\n \\\\\\"type\\\\\\" \\\\\\"pos\\\\\\",\\\r\\\n \\\\\\"action\\\\\\" \\\\\\"allow\\\\\\",\\\r\\\n \\\\\\"list\\\\\\" \[\\\r\\\n {\\\r\\\n \\\\\\"period\\\\\\" \\\\\\"day\\\\\\",\\\r\\\n \\\\\\"amount\\\\\\" 0,\\\r\\\n \\\\\\"usagelimit\\\\\\" 0\\\r\\\n }\\\r\\\n ],\\\r\\\n \\\\\\"cashback\\\\\\" \\\\\\"allow\\\\\\"\\\r\\\n }\\\r\\\n ]\\\r\\\n}\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" }, { "id" "afy7cwt 4c2c6vnwr5eob", "language" "go", "code" "package main\n\nimport (\n \\"fmt\\"\n \\"strings\\"\n \\"net/http\"\n \\"io\\"\n)\n\nfunc main() {\n\n url = \\"https //sandbox crbcos com/cardmanagement/v1/cards/cc25620c d865 4801 9128 b44700ccb94c/controls\\"\n method = \\"put\\"\n\n payload = strings newreader(`{`+\\"\n\\"+`\n \\"authorizationcontrols\\" \[`+\\"\n\\"+`\n {`+\\"\n\\"+`\n \\"type\\" \\"country\\",`+\\"\n\\"+`\n \\"action\\" \\"allow\\",`+\\"\n\\"+`\n \\"list\\" \[`+\\"\n\\"+`\n \\"string\\"`+\\"\n\\"+`\n ]`+\\"\n\\"+`\n }`+\\"\n\\"+`\n ],`+\\"\n\\"+`\n \\"velocitycontrols\\" \[`+\\"\n\\"+`\n {`+\\"\n\\"+`\n \\"type\\" \\"pos\\",`+\\"\n\\"+`\n \\"action\\" \\"allow\\",`+\\"\n\\"+`\n \\"list\\" \[`+\\"\n\\"+`\n {`+\\"\n\\"+`\n \\"period\\" \\"day\\",`+\\"\n\\"+`\n \\"amount\\" 0,`+\\"\n\\"+`\n \\"usagelimit\\" 0`+\\"\n\\"+`\n }`+\\"\n\\"+`\n ],`+\\"\n\\"+`\n \\"cashback\\" \\"allow\\"`+\\"\n\\"+`\n }`+\\"\n\\"+`\n ]`+\\"\n\\"+`\n}`)\n\n client = \&http client {\n }\n req, err = http newrequest(method, url, payload)\n\n if err != nil {\n fmt println(err)\n return\n }\n res, err = client do(req)\n if err != nil {\n fmt println(err)\n return\n }\n defer res body close()\n\n body, err = io readall(res body)\n if err != nil {\n fmt println(err)\n return\n }\n fmt println(string(body))\n}", "customlabel" "" } ], "selectedlanguageid" "hiyb6hxbzbif03ihcjxah" }, "results" { "languages" \[ { "id" "kcrcuayhepl8dhvegmp34", "language" "200", "code" "", "customlabel" "" }, { "id" "llihbth7ga8xautfwfayl", "language" "202", "code" "" } ], "selectedlanguageid" "llihbth7ga8xautfwfayl" }, "request" { "pathparameters" \[ { "name" "cardid", "kind" "required", "type" "string", "description" "uid format card id in the cross river system, which is the id attribute value of the response to create a card this is not the number that appears on the card ", "" "uid format card id in the cross river system, which is the id attribute value of the response to create a card this is not the number that appears on the card " } ], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "name" "controlconfiginfo", "kind" "required", "type" "object", "description" "", "" "required", "children" \[ { "name" "authorizationcontrols", "kind" "optional", "type" "object", "description" "establish rules for card transaction validation", "children" \[ { "name" "type", "kind" "optional", "type" "string", "description" " country \n currency \n mcc \n mid " }, { "name" "action", "kind" "optional", "type" "string", "description" " allow \n deny " }, { "name" "list", "kind" "optional", "type" "string", "description" "" } ] }, { "name" "velocitycontrols", "kind" "optional", "type" "object", "description" "spending limits over time periods", "children" \[ { "name" "type", "kind" "optional", "type" "string", "description" " pos\n ecomm\n gwp\n withdrawal\n general spend" }, { "name" "action", "kind" "optional", "type" "string", "description" " allow\n deny" }, { "name" "list", "kind" "optional", "type" "object", "description" "", "children" \[ { "name" "period", "kind" "optional", "type" "string", "description" " day\n week\n month\n year\n total" }, { "name" "amount", "kind" "optional", "type" "integer", "description" "maximum cumulative transaction amount allowed within the period " }, { "name" "usagelimit", "kind" "optional", "type" "integer", "description" "number of transactions allowed within the velocity window block high frequency fraud attempts, even when each transaction is small " } ] }, { "name" "cashback", "kind" "optional", "type" "string", "description" "controls whether cashback amounts are included in velocity control amount calculations \noptions \n allow (cashback amount is included in the velocity control limit calculation)\n deny (cashback amount is excluded from the velocity control limit calculation)" } ] } ], "schema" \[ { "name" "authorizationcontrols", "kind" "optional", "type" "object", "description" "establish rules for card transaction validation", "children" \[ { "name" "type", "kind" "optional", "type" "string", "description" " country \n currency \n mcc \n mid " }, { "name" "action", "kind" "optional", "type" "string", "description" " allow \n deny " }, { "name" "list", "kind" "optional", "type" "string", "description" "" } ] }, { "name" "velocitycontrols", "kind" "optional", "type" "object", "description" "spending limits over time periods", "children" \[ { "name" "type", "kind" "optional", "type" "string", "description" " pos\n ecomm\n gwp\n withdrawal\n general spend" }, { "name" "action", "kind" "optional", "type" "string", "description" " allow\n deny" }, { "name" "list", "kind" "optional", "type" "object", "description" "", "children" \[ { "name" "period", "kind" "optional", "type" "string", "description" " day\n week\n month\n year\n total" }, { "name" "amount", "kind" "optional", "type" "integer", "description" "maximum cumulative transaction amount allowed within the period " }, { "name" "usagelimit", "kind" "optional", "type" "integer", "description" "number of transactions allowed within the velocity window block high frequency fraud attempts, even when each transaction is small " } ] }, { "name" "cashback", "kind" "optional", "type" "string", "description" "controls whether cashback amounts are included in velocity control amount calculations \noptions \n allow (cashback amount is included in the velocity control limit calculation)\n deny (cashback amount is excluded from the velocity control limit calculation)" } ] } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "response" \[], "hastryitout" false, "autogeneratedanchorslug" "endpoint cardmanagementv1cardscardidcontrols", "legacyhash" "x sphgtvjw6sa3mdft10" } combining multiple authorization controls you can combine multiple authorization control types on a single card all controls must pass for transaction approval example comprehensive control set { "authorizationcontrols" \[ { "type" "country", "action" "allow", "list" \["us"] }, { "type" "currency", "action" "allow", "list" \["usd"] }, { "type" "mcc", "action" "allow", "list" \["5172", "5541", "5542", "5552"] }, { "type" "mid", "action" "deny", "list" \["blocked merchant 123"] } ] } evaluation logic ✅ country must be us ✅ currency must be usd ✅ mcc must be fuel related (5172, 5541, 5542, 5552) ✅ mid must exclude blocked merchant 123 all conditions must be satisfied for approval