Close a business account
curl --request POST \
--url https://thirdparty.qonto.com/v2/bank_accounts/{id}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://thirdparty.qonto.com/v2/bank_accounts/{id}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://thirdparty.qonto.com/v2/bank_accounts/{id}/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://thirdparty.qonto.com/v2/bank_accounts/{id}/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://thirdparty.qonto.com/v2/bank_accounts/{id}/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://thirdparty.qonto.com/v2/bank_accounts/{id}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/bank_accounts/{id}/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{
"bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Primary bank account",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"main": true,
"iban": "FR7616958000010123456789037",
"bic": "BNPAFRPPXXX",
"currency": "EUR",
"balance": "142188.43",
"balance_cents": 14218843,
"authorized_balance": "141148.12",
"authorized_balance_cents": 14114812,
"updated_at": "2024-04-03T12:00:00Z",
"is_external_account": false,
"account_number": 1234567890
}
}Business accounts
Close a business account
Closes a specific business account identified by its ID.
POST
/
v2
/
bank_accounts
/
{id}
/
close
Close a business account
curl --request POST \
--url https://thirdparty.qonto.com/v2/bank_accounts/{id}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://thirdparty.qonto.com/v2/bank_accounts/{id}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://thirdparty.qonto.com/v2/bank_accounts/{id}/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://thirdparty.qonto.com/v2/bank_accounts/{id}/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://thirdparty.qonto.com/v2/bank_accounts/{id}/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://thirdparty.qonto.com/v2/bank_accounts/{id}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/bank_accounts/{id}/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{
"bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Primary bank account",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"main": true,
"iban": "FR7616958000010123456789037",
"bic": "BNPAFRPPXXX",
"currency": "EUR",
"balance": "142188.43",
"balance_cents": 14218843,
"authorized_balance": "141148.12",
"authorized_balance_cents": 14114812,
"updated_at": "2024-04-03T12:00:00Z",
"is_external_account": false,
"account_number": 1234567890
}
}Authentication: API key OAuth 2.0
Scope:
Once closed, the account can no longer be used for transactions. Before closing an account,
ensure it has a zero balance and no pending transactions. The main account cannot be closed.
Restrictions:
Scope:
bank_account.write
Accessible only using Strong Customer Authentication.
Example of SCA usage: Postman visual flow
- You cannot close your main account.
- You cannot close an businesss account with a non-zero balance.
- External businesss accounts cannot be closed through this API.
Authorizations
Bearer authorization header: Bearer <token>, where <token> is the access token received from the authorization server at the end of the OAuth 2.0 flow.
Headers
Required only for Sandbox API requests; to get one, please sign up to the Developer Portal.
SCA session token for strong customer authentication
MFA token for strong customer authentication
2FA preference for the request
Path Parameters
ID of the business account to close
Response
Business account closed successfully
Show child attributes
Show child attributes
Was this page helpful?