Change the destination of the funds
curl --request PATCH \
--url https://api.kemycard.com/v1/virtual-accounts/{code}/destination \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination": {
"type": "external_address",
"address": "YOUR_SOLANA_USDC_ADDRESS"
}
}
'import requests
url = "https://api.kemycard.com/v1/virtual-accounts/{code}/destination"
payload = { "destination": {
"type": "external_address",
"address": "YOUR_SOLANA_USDC_ADDRESS"
} }
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({destination: {type: 'external_address', address: 'YOUR_SOLANA_USDC_ADDRESS'}})
};
fetch('https://api.kemycard.com/v1/virtual-accounts/{code}/destination', 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.kemycard.com/v1/virtual-accounts/{code}/destination",
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([
'destination' => [
'type' => 'external_address',
'address' => 'YOUR_SOLANA_USDC_ADDRESS'
]
]),
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.kemycard.com/v1/virtual-accounts/{code}/destination"
payload := strings.NewReader("{\n \"destination\": {\n \"type\": \"external_address\",\n \"address\": \"YOUR_SOLANA_USDC_ADDRESS\"\n }\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.kemycard.com/v1/virtual-accounts/{code}/destination")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination\": {\n \"type\": \"external_address\",\n \"address\": \"YOUR_SOLANA_USDC_ADDRESS\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemycard.com/v1/virtual-accounts/{code}/destination")
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 \"destination\": {\n \"type\": \"external_address\",\n \"address\": \"YOUR_SOLANA_USDC_ADDRESS\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_reference": "user-001",
"currency": "EUR",
"status": "active",
"destination": {
"type": "wallet",
"wallet_code": "01a11628-4600-7e59-bd4a-01604c588373",
"blockchain": "solana",
"currency": "USDC",
"address": "CUSTOMER_DEPOSIT_ADDRESS"
},
"deposit_instructions": {
"currency": "eur",
"payment_rails": [
"sepa"
],
"iban": "LU00TEST0000000000000000",
"bic": "TESTLULL",
"account_holder_name": "Alice Martin",
"bank_name": "Test Bank S.A.",
"bank_address": "1 Test Street, L-0000 Luxembourg"
},
"tos_url": "<string>",
"creation_fee": 10,
"failure_reason": "The customer was not approved by our banking partner.",
"created_at": "2023-11-07T05:31:56Z",
"activated_at": "2023-11-07T05:31:56Z",
"closed_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"mode": "test",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "PLAN_UPGRADE_REQUIRED",
"message": "This product is not included in the Découverte plan. Upgrade to a paid plan (Starter, Business or Premium) to use \"wallets\".",
"details": {
"plan": "decouverte",
"product": "wallets"
}
}
}{
"success": false,
"error": {
"code": "ACCOUNT_SUSPENDED_NEGATIVE_BALANCE",
"message": "Your account is suspended because one of your ops balances is negative. Top up the negative balance to restore access. Read-only requests (GET) remain available.",
"details": {
"negative_balance_since": "2026-10-15T08:00:00+00:00"
}
}
}{
"success": false,
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found.",
"details": null
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Missing required fields.",
"details": {}
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"mode": "test",
"timestamp": "2023-11-07T05:31:56Z"
}
}Virtual Accounts
Change the Destination
Changes where the net amount of the deposits is sent. The same rules as at creation apply: a USDC wallet on Solana of the same customer, or an external Solana address.
The new destination applies to the deposits whose USDC has not arrived yet. A deposit whose USDC has already
arrived keeps the destination it was given. A failed or closed account cannot be changed.
PATCH
/
virtual-accounts
/
{code}
/
destination
Change the destination of the funds
curl --request PATCH \
--url https://api.kemycard.com/v1/virtual-accounts/{code}/destination \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destination": {
"type": "external_address",
"address": "YOUR_SOLANA_USDC_ADDRESS"
}
}
'import requests
url = "https://api.kemycard.com/v1/virtual-accounts/{code}/destination"
payload = { "destination": {
"type": "external_address",
"address": "YOUR_SOLANA_USDC_ADDRESS"
} }
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({destination: {type: 'external_address', address: 'YOUR_SOLANA_USDC_ADDRESS'}})
};
fetch('https://api.kemycard.com/v1/virtual-accounts/{code}/destination', 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.kemycard.com/v1/virtual-accounts/{code}/destination",
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([
'destination' => [
'type' => 'external_address',
'address' => 'YOUR_SOLANA_USDC_ADDRESS'
]
]),
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.kemycard.com/v1/virtual-accounts/{code}/destination"
payload := strings.NewReader("{\n \"destination\": {\n \"type\": \"external_address\",\n \"address\": \"YOUR_SOLANA_USDC_ADDRESS\"\n }\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.kemycard.com/v1/virtual-accounts/{code}/destination")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination\": {\n \"type\": \"external_address\",\n \"address\": \"YOUR_SOLANA_USDC_ADDRESS\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemycard.com/v1/virtual-accounts/{code}/destination")
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 \"destination\": {\n \"type\": \"external_address\",\n \"address\": \"YOUR_SOLANA_USDC_ADDRESS\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_reference": "user-001",
"currency": "EUR",
"status": "active",
"destination": {
"type": "wallet",
"wallet_code": "01a11628-4600-7e59-bd4a-01604c588373",
"blockchain": "solana",
"currency": "USDC",
"address": "CUSTOMER_DEPOSIT_ADDRESS"
},
"deposit_instructions": {
"currency": "eur",
"payment_rails": [
"sepa"
],
"iban": "LU00TEST0000000000000000",
"bic": "TESTLULL",
"account_holder_name": "Alice Martin",
"bank_name": "Test Bank S.A.",
"bank_address": "1 Test Street, L-0000 Luxembourg"
},
"tos_url": "<string>",
"creation_fee": 10,
"failure_reason": "The customer was not approved by our banking partner.",
"created_at": "2023-11-07T05:31:56Z",
"activated_at": "2023-11-07T05:31:56Z",
"closed_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"mode": "test",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "PLAN_UPGRADE_REQUIRED",
"message": "This product is not included in the Découverte plan. Upgrade to a paid plan (Starter, Business or Premium) to use \"wallets\".",
"details": {
"plan": "decouverte",
"product": "wallets"
}
}
}{
"success": false,
"error": {
"code": "ACCOUNT_SUSPENDED_NEGATIVE_BALANCE",
"message": "Your account is suspended because one of your ops balances is negative. Top up the negative balance to restore access. Read-only requests (GET) remain available.",
"details": {
"negative_balance_since": "2026-10-15T08:00:00+00:00"
}
}
}{
"success": false,
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found.",
"details": null
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Missing required fields.",
"details": {}
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"mode": "test",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
API key (sk_test_... or sk_live_...)
Path Parameters
Code of the virtual account
Body
application/json
Where the net amount of each deposit is sent, always in USDC on Solana. Two options:
wallet: a KemyCard wallet of the customer, identified by itswallet_code. No on-chain transfer: the net amount is credited to the balance of this wallet, as for a wallet deposit. You withdraw it withPOST /wallets/{code}/withdrawals.external_address: an address outside KemyCard (for example your own custody wallet). The net amount is sent on-chain to this address.
Show child attributes
Show child attributes