Changing the limit on a card
How to change the limit on a card.
You can set a credit limit on a card when you initially create a card. To change the limit after a card has been created, use the PATCH /cards/{card_id}
operation and provide the credit_limit
parameter as shown in the table below.
Note
Each individual child card's limit must be less than the parent card, but the aggregate of all child card credit limits can be more than the parent card limit.
The aggregate of the balance of all child cards cannot exceed the parent card's limit.
Parameter | Type | Description |
---|---|---|
credit_limit required | string | New credit limit for the card. Decimal format with two decimal places, for example 3000.00 . |
An example of a request to change the credit limit for a card is shown below.
curl --request PATCH \
--url https://sandbox.bond.tech/api/v0/cards/3a7fe4e4-79a4-4a58-942a-c3d00a2406a6 \
--header 'Authorization: YOUR-AUTHORIZATION' \
--header 'Content-Type: application/json' \
--header 'Identity: YOUR-IDENTITY' \
--data '
{
"credit_limit": "3000.00"
}
'
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://sandbox.bond.tech/api/v0/cards/3a7fe4e4-79a4-4a58-942a-c3d00a2406a6")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request["Identity"] = 'YOUR-IDENTITY'
request["Authorization"] = 'YOUR-AUTHORIZATION'
request.body = "{\"credit_limit\":\"3000.00\"}"
response = http.request(request)
puts response.read_body
const options = {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
Identity: 'YOUR-IDENTITY',
Authorization: 'YOUR-AUTHORIZATION'
},
body: JSON.stringify({credit_limit: '3000.00'})
};
fetch('https://sandbox.bond.tech/api/v0/cards/3a7fe4e4-79a4-4a58-942a-c3d00a2406a6', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import requests
url = "https://sandbox.bond.tech/api/v0/cards/3a7fe4e4-79a4-4a58-942a-c3d00a2406a6"
payload = {"credit_limit": "3000.00"}
headers = {
"Content-Type": "application/json",
"Identity": "YOUR-IDENTITY",
"Authorization": "YOUR-AUTHORIZATION"
}
response = requests.request("PATCH", url, json=payload, headers=headers)
print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0/cards/3a7fe4e4-79a4-4a58-942a-c3d00a2406a6");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Identity", "YOUR-IDENTITY");
request.AddHeader("Authorization", "YOUR-AUTHORIZATION");
request.AddParameter("application/json", "{\"credit_limit\":\"3000.00\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://sandbox.bond.tech/api/v0/cards/card_id/restrictions/restriction_id")
.patch(null)
.addHeader("Content-Type", "application/json")
.addHeader("Identity", "YOUR-IDENTITY")
.addHeader("Authorization", "YOUR-AUTHORIZATION")
.build();
Response response = client.newCall(request).execute();
An example of a response to a successful request to change a card limit is shown below.
{
"card_id": "2742ff6a-7455-4066-8b45-ae12d3acca34",
"credit_limit": "3000.00"
}
For a complete specification and interactive examples, see Updating a card in the Bond API Reference.
Updated 3 months ago