Update card spend control
curl --request PATCH \
--url https://api.contro.me/v1/partner/cards/{id}/limits \
--header 'Content-Type: application/json' \
--header 'x-contro-api-key: <api-key>' \
--data '
{
"spendControl": {
"sales": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
},
"cash": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
},
"spent": {
"sales": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
},
"cash": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
}
}
}
}
'import requests
url = "https://api.contro.me/v1/partner/cards/{id}/limits"
payload = { "spendControl": {
"sales": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
},
"cash": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
},
"spent": {
"sales": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
},
"cash": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
}
}
} }
headers = {
"x-contro-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-contro-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
spendControl: {
sales: {perTransaction: 200, daily: 1000, monthly: 20000, allTime: 50000},
cash: {perTransaction: 200, daily: 1000, monthly: 20000, allTime: 50000},
spent: {
sales: {perTransaction: 200, daily: 1000, monthly: 20000, allTime: 50000},
cash: {perTransaction: 200, daily: 1000, monthly: 20000, allTime: 50000}
}
}
})
};
fetch('https://api.contro.me/v1/partner/cards/{id}/limits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.contro.me/v1/partner/cards/{id}/limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'spendControl' => [
'sales' => [
'perTransaction' => 200,
'daily' => 1000,
'monthly' => 20000,
'allTime' => 50000
],
'cash' => [
'perTransaction' => 200,
'daily' => 1000,
'monthly' => 20000,
'allTime' => 50000
],
'spent' => [
'sales' => [
'perTransaction' => 200,
'daily' => 1000,
'monthly' => 20000,
'allTime' => 50000
],
'cash' => [
'perTransaction' => 200,
'daily' => 1000,
'monthly' => 20000,
'allTime' => 50000
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-contro-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.contro.me/v1/partner/cards/{id}/limits"
payload := strings.NewReader("{\n \"spendControl\": {\n \"sales\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"cash\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"spent\": {\n \"sales\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"cash\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n }\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-contro-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.contro.me/v1/partner/cards/{id}/limits")
.header("x-contro-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"spendControl\": {\n \"sales\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"cash\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"spent\": {\n \"sales\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"cash\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contro.me/v1/partner/cards/{id}/limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-contro-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"spendControl\": {\n \"sales\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"cash\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"spent\": {\n \"sales\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"cash\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true
}Cards
Update card spend control
Set per-transaction-type velocity caps on a card. Accepts both the legacy { limit } body (deprecated, mirrors spendControl.sales.allTime and spendControl.cash.allTime) and the new { spendControl } body.
PATCH
/
partner
/
cards
/
{id}
/
limits
Update card spend control
curl --request PATCH \
--url https://api.contro.me/v1/partner/cards/{id}/limits \
--header 'Content-Type: application/json' \
--header 'x-contro-api-key: <api-key>' \
--data '
{
"spendControl": {
"sales": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
},
"cash": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
},
"spent": {
"sales": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
},
"cash": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
}
}
}
}
'import requests
url = "https://api.contro.me/v1/partner/cards/{id}/limits"
payload = { "spendControl": {
"sales": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
},
"cash": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
},
"spent": {
"sales": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
},
"cash": {
"perTransaction": 200,
"daily": 1000,
"monthly": 20000,
"allTime": 50000
}
}
} }
headers = {
"x-contro-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-contro-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
spendControl: {
sales: {perTransaction: 200, daily: 1000, monthly: 20000, allTime: 50000},
cash: {perTransaction: 200, daily: 1000, monthly: 20000, allTime: 50000},
spent: {
sales: {perTransaction: 200, daily: 1000, monthly: 20000, allTime: 50000},
cash: {perTransaction: 200, daily: 1000, monthly: 20000, allTime: 50000}
}
}
})
};
fetch('https://api.contro.me/v1/partner/cards/{id}/limits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.contro.me/v1/partner/cards/{id}/limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'spendControl' => [
'sales' => [
'perTransaction' => 200,
'daily' => 1000,
'monthly' => 20000,
'allTime' => 50000
],
'cash' => [
'perTransaction' => 200,
'daily' => 1000,
'monthly' => 20000,
'allTime' => 50000
],
'spent' => [
'sales' => [
'perTransaction' => 200,
'daily' => 1000,
'monthly' => 20000,
'allTime' => 50000
],
'cash' => [
'perTransaction' => 200,
'daily' => 1000,
'monthly' => 20000,
'allTime' => 50000
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-contro-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.contro.me/v1/partner/cards/{id}/limits"
payload := strings.NewReader("{\n \"spendControl\": {\n \"sales\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"cash\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"spent\": {\n \"sales\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"cash\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n }\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-contro-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.contro.me/v1/partner/cards/{id}/limits")
.header("x-contro-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"spendControl\": {\n \"sales\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"cash\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"spent\": {\n \"sales\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"cash\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contro.me/v1/partner/cards/{id}/limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-contro-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"spendControl\": {\n \"sales\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"cash\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"spent\": {\n \"sales\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n },\n \"cash\": {\n \"perTransaction\": 200,\n \"daily\": 1000,\n \"monthly\": 20000,\n \"allTime\": 50000\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true
}Authorizations
Partner API key (sk_live_* for production, sk_test_* for sandbox)
Path Parameters
Card ID
Example:
"card_def456"
Body
application/json
- Option 1
- Option 2
Per-transaction-type velocity controls. Caps not supported by the card program are rejected with 400.
Show child attributes
Show child attributes
Response
Card spend control updated
Available options:
true