Permanently Close Account
curl --request POST \
--url http://localhost:8080/api/v1/accounts/{account_id}/closeimport requests
url = "http://localhost:8080/api/v1/accounts/{account_id}/close"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('http://localhost:8080/api/v1/accounts/{account_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_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/accounts/{account_id}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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 := "http://localhost:8080/api/v1/accounts/{account_id}/close"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8080/api/v1/accounts/{account_id}/close")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/accounts/{account_id}/close")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"account_name": "<string>",
"account_number": "<string>",
"account_type": "CURRENT",
"available_balance": "1000.50",
"client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"current_balance": "1000.50",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"opened_date": "2023-11-07T05:31:56Z",
"reserved_balance": "0.00",
"status": "PENDING",
"updated_at": "2023-11-07T05:31:56Z",
"closed_date": "2023-11-07T05:31:56Z",
"daily_limit": "10000.00",
"description": "<string>",
"external_account_id": "<string>",
"last_activity_date": "2023-11-07T05:31:56Z",
"monthly_limit": "50000.00",
"yearly_limit": "500000.00"
}Accounts
Permanently Close Account
Permanently close an ACTIVE or SUSPENDED account. Both current and reserved balances must be zero first. This is irreversible.
POST
/
api
/
v1
/
accounts
/
{account_id}
/
close
Permanently Close Account
curl --request POST \
--url http://localhost:8080/api/v1/accounts/{account_id}/closeimport requests
url = "http://localhost:8080/api/v1/accounts/{account_id}/close"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('http://localhost:8080/api/v1/accounts/{account_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_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/accounts/{account_id}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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 := "http://localhost:8080/api/v1/accounts/{account_id}/close"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8080/api/v1/accounts/{account_id}/close")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/accounts/{account_id}/close")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"account_name": "<string>",
"account_number": "<string>",
"account_type": "CURRENT",
"available_balance": "1000.50",
"client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"current_balance": "1000.50",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"opened_date": "2023-11-07T05:31:56Z",
"reserved_balance": "0.00",
"status": "PENDING",
"updated_at": "2023-11-07T05:31:56Z",
"closed_date": "2023-11-07T05:31:56Z",
"daily_limit": "10000.00",
"description": "<string>",
"external_account_id": "<string>",
"last_activity_date": "2023-11-07T05:31:56Z",
"monthly_limit": "50000.00",
"yearly_limit": "500000.00"
}Path Parameters
Account UUID
Response
Account closed successfully
Account - Core account entity
Account Type - Different types of accounts that can be created
Available options:
CURRENT, SAVINGS, ESCROW Example:
"1000.50"
Example:
"1000.50"
Example:
"0.00"
Account Status - Current status of the account
Available options:
PENDING, ACTIVE, SUSPENDED, CLOSED Example:
"10000.00"
Example:
"50000.00"
Example:
"500000.00"