Unlink Wallet from Card
curl --request DELETE \
--url https://api.example.com/v1/wallet/internal/card_linked \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'x-client-key: <x-client-key>' \
--data '
{
"addressId": "<string>"
}
'import requests
url = "https://api.example.com/v1/wallet/internal/card_linked"
payload = { "addressId": "<string>" }
headers = {
"x-client-key": "<x-client-key>",
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'x-client-key': '<x-client-key>',
Authorization: '<authorization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({addressId: '<string>'})
};
fetch('https://api.example.com/v1/wallet/internal/card_linked', 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.example.com/v1/wallet/internal/card_linked",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'addressId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"x-client-key: <x-client-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.example.com/v1/wallet/internal/card_linked"
payload := strings.NewReader("{\n \"addressId\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("x-client-key", "<x-client-key>")
req.Header.Add("Authorization", "<authorization>")
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.delete("https://api.example.com/v1/wallet/internal/card_linked")
.header("x-client-key", "<x-client-key>")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"addressId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/wallet/internal/card_linked")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-client-key"] = '<x-client-key>'
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"addressId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}
Wallet
Unlink Wallet from Card
Remove a custodial wallet from card payment sources
DELETE
/
v1
/
wallet
/
internal
/
card_linked
Unlink Wallet from Card
curl --request DELETE \
--url https://api.example.com/v1/wallet/internal/card_linked \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'x-client-key: <x-client-key>' \
--data '
{
"addressId": "<string>"
}
'import requests
url = "https://api.example.com/v1/wallet/internal/card_linked"
payload = { "addressId": "<string>" }
headers = {
"x-client-key": "<x-client-key>",
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'x-client-key': '<x-client-key>',
Authorization: '<authorization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({addressId: '<string>'})
};
fetch('https://api.example.com/v1/wallet/internal/card_linked', 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.example.com/v1/wallet/internal/card_linked",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'addressId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"x-client-key: <x-client-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.example.com/v1/wallet/internal/card_linked"
payload := strings.NewReader("{\n \"addressId\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("x-client-key", "<x-client-key>")
req.Header.Add("Authorization", "<authorization>")
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.delete("https://api.example.com/v1/wallet/internal/card_linked")
.header("x-client-key", "<x-client-key>")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"addressId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/wallet/internal/card_linked")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-client-key"] = '<x-client-key>'
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"addressId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}
Remove a wallet from card payment sources. The wallet remains available but won’t be used for card transactions.
Authentication
string
required
Your public API client key
string
required
Bearer token for authentication
Request Body
string
required
Wallet addressId to unlink
Response
boolean
Whether unlinking was successful
{
"success": true
}
curl -X DELETE "https://dev.api.baanx.com/v1/wallet/internal/card_linked" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"addressId": "7c1839ee-918e-4787-b74f-deeb48ead58b"
}'
unlink_data = {"addressId": "7c1839ee-918e-4787-b74f-deeb48ead58b"}
response = requests.delete(
"https://dev.api.baanx.com/v1/wallet/internal/card_linked",
headers=headers,
json=unlink_data
)
if response.status_code == 200:
print("Wallet unlinked from card")
async function unlinkWalletFromCard(addressId: string): Promise<boolean> {
const response = await fetch(
'https://dev.api.baanx.com/v1/wallet/internal/card_linked',
{
method: 'DELETE',
headers: {
'x-client-key': 'YOUR_CLIENT_KEY',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({ addressId })
}
);
const result = await response.json();
return result.success;
}
Important Notes
Unlinking Effects: Unlinking a wallet doesn’t delete it, only removes it as a card payment source. The wallet and its funds remain accessible.
Related Endpoints
- List Card-Linked Wallets - View currently linked wallets
- Link Wallet to Card - Add a wallet as a card payment source
- Update Linked Wallet Priority - Change charging order
Was this page helpful?
⌘I