Close a virtual account
curl --request POST \
--url https://api.kemycard.com/v1/virtual-accounts/{code}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.kemycard.com/v1/virtual-accounts/{code}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kemycard.com/v1/virtual-accounts/{code}/close', 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}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.kemycard.com/v1/virtual-accounts/{code}/close"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kemycard.com/v1/virtual-accounts/{code}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemycard.com/v1/virtual-accounts/{code}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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
Close a Virtual Account
Closes the account: it no longer accepts deposits, and its status becomes closed. The
virtual_account.closed webhook is sent.
- If the account is still being opened and its bank details have not been issued yet, the creation fee is
refunded to your
othersops balance (creation_fee_refundedin the webhook). - An account that is already
failedorclosedreturns422 VALIDATION_ERROR. - If the account cannot be closed at the moment, the request returns
422 VALIDATION_ERROR: try again later.
POST
/
virtual-accounts
/
{code}
/
close
Close a virtual account
curl --request POST \
--url https://api.kemycard.com/v1/virtual-accounts/{code}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.kemycard.com/v1/virtual-accounts/{code}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kemycard.com/v1/virtual-accounts/{code}/close', 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}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.kemycard.com/v1/virtual-accounts/{code}/close"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kemycard.com/v1/virtual-accounts/{code}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemycard.com/v1/virtual-accounts/{code}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
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"
}
}