curl --request PATCH \
--url https://api.next.orenda.finance/v2/customers/{customerId}/cards/{cardId}/policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version": 1,
"areas": {}
}
'import requests
url = "https://api.next.orenda.finance/v2/customers/{customerId}/cards/{cardId}/policy"
payload = {
"version": 1,
"areas": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({version: 1, areas: {}})
};
fetch('https://api.next.orenda.finance/v2/customers/{customerId}/cards/{cardId}/policy', 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.next.orenda.finance/v2/customers/{customerId}/cards/{cardId}/policy",
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([
'version' => 1,
'areas' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.next.orenda.finance/v2/customers/{customerId}/cards/{cardId}/policy"
payload := strings.NewReader("{\n \"version\": 1,\n \"areas\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.next.orenda.finance/v2/customers/{customerId}/cards/{cardId}/policy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"version\": 1,\n \"areas\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.next.orenda.finance/v2/customers/{customerId}/cards/{cardId}/policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 1,\n \"areas\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"cardId": "<string>",
"version": 123,
"updatedAt": "<string>",
"inertPaths": [
"<string>"
],
"areas": {
"mcc": {
"enabled": true,
"mode": "<string>",
"editable": true,
"card": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"effective": {
"mode": "<string>",
"blocked": [
"<string>"
],
"allowed": [
"<string>"
],
"unrestricted": true
}
},
"country": {
"enabled": true,
"mode": "<string>",
"editable": true,
"card": {
"countries": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"regions": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
}
},
"effective": {
"mode": "<string>",
"countries": [
"<string>"
],
"regions": [
"<string>"
]
}
},
"inputOptions": {
"enabled": true,
"mode": "<string>",
"editable": true,
"card": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"effective": {
"mode": "<string>",
"blocked": [
"<string>"
],
"allowed": [
"<string>"
],
"unrestricted": true
}
},
"limits": {
"currency": "<string>",
"enabled": true,
"mode": "<string>",
"editable": true,
"card": {
"atm": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
},
"pos": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
}
},
"effective": {
"atm": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
},
"pos": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
}
},
"ceiling": {
"atm": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
},
"pos": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
}
}
},
"customerLimits": {
"currency": "<string>",
"enabled": true,
"mode": "<string>",
"editable": true,
"card": null,
"effective": {
"atm": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
},
"pos": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
}
},
"ceiling": null
}
}
}
}Update this card's policy (v2)
Lets a cardholder tighten their own card. Only on accounts whose cards.limits.mode is custom in capabilities.
Writing limits. Send areas.limits as { "currency": "GBP", "card": { "atm": {…}, "pos": {…} } }. currency must be the card’s currency, otherwise the request is rejected before anything is written. Each channel carries single, daily, weekly, monthly and annual as decimal strings in major units ("300.00"), plus the count object of integers. Send all of them every time.
nullmeans “no limit of my own at this window”, so the program’s value applies."0.00"is rejected: sendnullto remove a limit.- More decimals than the currency allows is rejected, never rounded (
"300.001"for GBP;"300.5"for JPY). "card": nullremoves the cardholder’s limits entirely.
Errors specific to amounts (all 400): CARD_POLICY_INVALID_AMOUNT (not a decimal string, or out of range), CARD_POLICY_AMOUNT_PRECISION (too many decimals), CARD_POLICY_ZERO_AMOUNT, CARD_POLICY_CURRENCY_MISMATCH.
The other areas (mcc, country, inputOptions), the tighten-only rule, the version check (409 CARD_POLICY_VERSION_CONFLICT) and the response work as described in the card limits walkthrough. The response is the whole policy in the v2 shape, so render from it without a second GET.
If the card’s currency cannot be determined, the request fails with 400 CARD_POLICY_CURRENCY_UNAVAILABLE.
curl --request PATCH \
--url https://api.next.orenda.finance/v2/customers/{customerId}/cards/{cardId}/policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version": 1,
"areas": {}
}
'import requests
url = "https://api.next.orenda.finance/v2/customers/{customerId}/cards/{cardId}/policy"
payload = {
"version": 1,
"areas": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({version: 1, areas: {}})
};
fetch('https://api.next.orenda.finance/v2/customers/{customerId}/cards/{cardId}/policy', 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.next.orenda.finance/v2/customers/{customerId}/cards/{cardId}/policy",
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([
'version' => 1,
'areas' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.next.orenda.finance/v2/customers/{customerId}/cards/{cardId}/policy"
payload := strings.NewReader("{\n \"version\": 1,\n \"areas\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.next.orenda.finance/v2/customers/{customerId}/cards/{cardId}/policy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"version\": 1,\n \"areas\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.next.orenda.finance/v2/customers/{customerId}/cards/{cardId}/policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 1,\n \"areas\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"cardId": "<string>",
"version": 123,
"updatedAt": "<string>",
"inertPaths": [
"<string>"
],
"areas": {
"mcc": {
"enabled": true,
"mode": "<string>",
"editable": true,
"card": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"effective": {
"mode": "<string>",
"blocked": [
"<string>"
],
"allowed": [
"<string>"
],
"unrestricted": true
}
},
"country": {
"enabled": true,
"mode": "<string>",
"editable": true,
"card": {
"countries": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"regions": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
}
},
"effective": {
"mode": "<string>",
"countries": [
"<string>"
],
"regions": [
"<string>"
]
}
},
"inputOptions": {
"enabled": true,
"mode": "<string>",
"editable": true,
"card": {
"allow": [
"<string>"
],
"block": [
"<string>"
]
},
"effective": {
"mode": "<string>",
"blocked": [
"<string>"
],
"allowed": [
"<string>"
],
"unrestricted": true
}
},
"limits": {
"currency": "<string>",
"enabled": true,
"mode": "<string>",
"editable": true,
"card": {
"atm": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
},
"pos": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
}
},
"effective": {
"atm": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
},
"pos": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
}
},
"ceiling": {
"atm": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
},
"pos": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
}
}
},
"customerLimits": {
"currency": "<string>",
"enabled": true,
"mode": "<string>",
"editable": true,
"card": null,
"effective": {
"atm": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
},
"pos": {
"single": "<string>",
"daily": "<string>",
"weekly": "<string>",
"monthly": "<string>",
"annual": "<string>",
"count": {
"daily": 123,
"weekly": 123,
"monthly": 123,
"annual": 123
}
}
},
"ceiling": null
}
}
}
}