Closing a card account

How to close a card account.

To close a card account, use the DELETE /accounts/card_accounts/ endpoint and provide the card_account_id of the card account to be closed as a path parameter.

An example close account request is shown below.

curl --request PATCH \
  --url https://sandbox.bond.tech/api/v0/cards/close/card_id \
  --header 'Authorization: YOUR-AUTHORIZATION' \
  --header 'Identity: YOUR-IDENTITY'
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://sandbox.bond.tech/api/v0/cards/close/card_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Identity"] = 'YOUR-IDENTITY'
request["Authorization"] = 'YOUR-AUTHORIZATION'

response = http.request(request)
puts response.read_body
const options = {
  method: 'PATCH',
  headers: {
    Identity: 'YOUR-IDENTITY',
    Authorization: 'YOUR-AUTHORIZATION'
  }
};

fetch('https://sandbox.bond.tech/api/v0/cards/close/card_id', options)
  .then(response => console.log(response))
  .catch(err => console.error(err));
import requests

url = "https://sandbox.bond.tech/api/v0/cards/close/card_id"

headers = {
    "Identity": "YOUR-IDENTITY",
    "Authorization": "YOUR-AUTHORIZATION"
}

response = requests.request("PATCH", url, headers=headers)

print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0/cards/close/card_id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Identity", "YOUR-IDENTITY");
request.AddHeader("Authorization", "YOUR-AUTHORIZATION");
IRestResponse response = client.Execute(request);
var client = new RestClient("https://sandbox.bond.tech/api/v0/cards/close/card_id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Identity", "YOUR-IDENTITY");
request.AddHeader("Authorization", "YOUR-AUTHORIZATION");
IRestResponse response = client.Execute(request);

A successful 200 response shows that the card account status has been updated to Closed as shown in the example below.

{
    "card_account_id": "c3f4871c-bb8d-4213-9ed3-b56c3bc8eb0b",
    "card_id": "c3f4871c-bb8d-4213-9ed3-b56c3bc8eb0a",
    "status": "Closed"
}

For a complete specification and interactive examples, see Closing a card in the Bond API Reference.