cURL
curl --request DELETE \
--url https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets/{walletId} \
--header 'partner-api-key: <api-key>'import requests
url = "https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets/{walletId}"
headers = {"partner-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'partner-api-key': '<api-key>'}};
fetch('https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets/{walletId}', 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://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets/{walletId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"partner-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"
"net/http"
"io"
)
func main() {
url := "https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets/{walletId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("partner-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets/{walletId}")
.header("partner-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets/{walletId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["partner-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "8374f327-38bd-4b0b-b8a7-2524599eb903",
"success": true
}
}Wallets
Delete Wallet
DELETE
/
api
/
partner
/
v2
/
users
/
{userId}
/
wallets
/
{walletId}
cURL
curl --request DELETE \
--url https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets/{walletId} \
--header 'partner-api-key: <api-key>'import requests
url = "https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets/{walletId}"
headers = {"partner-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'partner-api-key': '<api-key>'}};
fetch('https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets/{walletId}', 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://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets/{walletId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"partner-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"
"net/http"
"io"
)
func main() {
url := "https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets/{walletId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("partner-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets/{walletId}")
.header("partner-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-api.capa.fi/api/partner/v2/users/{userId}/wallets/{walletId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["partner-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "8374f327-38bd-4b0b-b8a7-2524599eb903",
"success": true
}
}Soft deletes (disables) a wallet for a user. The wallet will no longer be available for transactions.
Error Codes
Common Errors
| HTTP Status | Code | Message |
|---|---|---|
| 401 | UNAUTHORIZED | ”API Key is missing” |
| 401 | UNAUTHORIZED | ”Invalid API Key format” |
| 401 | UNAUTHORIZED | ”Invalid API Key” |
| 403 | INVALID_PARTNER_FLOW | ”The partner has an invalid flow.” |
User Ownership Errors
| HTTP Status | Code | Message |
|---|---|---|
| 401 | UNAUTHORIZED | ”Partner information is required for this operation” |
| 401 | UNAUTHORIZED | ”User is not associated with the partner” |
Endpoint-Specific Errors
| HTTP Status | Code | Message |
|---|---|---|
| 400 | INVALID_USER_INPUT_ERROR | ”Invalid User Input” (invalid UUID) |
Authorizations
API key for the affiliated partner performing the request.
Path Parameters
The userId of the user
Example:
"8374f327-38bd-4b0b-b8a7-2524599eb903"
The walletId of the wallet to delete
Example:
"8374f327-38bd-4b0b-b8a7-2524599eb903"
⌘I