Close subledger
Relevant webhooks
For this endpoint be sure you have registered for this webhook:
API reference
Closes a specific subledger (subaccount).
The subaccount's current and available balance must be 0 to be eligible for closing
Endpoint: /core/v1/dda/subaccounts/{accountNumber}
DELETE
https://sandbox.crbcos.com/core/v1/dda/subaccounts/{accountNumber}
Path Parameters
- accountNumberstringrequiredDescription
Response
- accountNumberstringDescription
- accountTypestringDescription
- statusstringDescription
- ledgerTypestringDescription
- titlestringDescription
- currentBalanceintegerDescription
- availableBalanceintegerDescription
- holdAmountintegerDescription
- transactionCountintegerDescription
- creditLimitintegerDescription
- currencystringDescription
- openedAtstringDescription
- closedAtstringDescription
- masterAccountNumberstringDescription
- customerIdstringDescription
- classificationstringDescription
- beneficiaryobjectDescription
- referenceIdstringDescription
- firstNamestringDescription
- middleNamestringDescription
- lastNamestringDescription
- entityNamestringDescription
- streetAddress1stringDescription
- streetAddress2stringDescription
- citystringDescription
- statestringDescription
- postalCodestringDescription
- countryCodestringDescription
- phoneNumberstringDescription
- emailAddressstringDescription
- notesstringDescription
- taxIdTypestringDescription
- taxIdstringDescription
- birthDatestringDescription
- dateFormedstringDescription
- partnerIdstringDescription
- lastMaintenanceAtstringDescription
- lastTransactedAtstringDescription
- productIdstringDescription
- clientIdentifierstringDescription
- lastModifiedAtstringDescription
- balancesobjectDescription
- accountNumberstringDescription
- isSubAccountbooleanDescription
- currencystringDescription
- currentBalanceintegerDescription
- availableBalanceintegerDescription
- holdAmountintegerDescription
- transactionCountintegerDescription
- lastModifiedAtstringDescription
- lastTransactedAtstringDescription
curl
curl --location --request DELETE 'https://sandbox.crbcos.com/core/v1/dda/subaccounts/341748805478' \
--header 'Authorization: Bearer <token>'nodejs
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'DELETE',
'hostname': 'sandbox.crbcos.com',
'path': '/core/v1/dda/subaccounts/341748805478',
'headers': {
'Authorization': 'Bearer <token>'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = "\n";
req.setHeader('Content-Length', postData.length);
req.write(postData);
req.end();python
import http.client
import json
conn = http.client.HTTPSConnection("sandbox.crbcos.com")
payload = "\n"
headers = {
'Authorization': 'Bearer <token>'
}
conn.request("DELETE", "/core/v1/dda/subaccounts/341748805478", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))ruby
require "uri"
require "json"
require "net/http"
url = URI("https://sandbox.crbcos.com/core/v1/dda/subaccounts/341748805478")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = "Bearer <token>"
request.body = "\n"
response = https.request(request)
puts response.read_body
go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.crbcos.com/core/v1/dda/subaccounts/341748805478"
method := "DELETE"
payload := strings.NewReader(`
`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer <token>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}200
{
"accountNumber": "341748805478",
"accountType": "Deposit",
"status": "Closed",
"ledgerType": "Passthrough",
"productType": "Checking",
"title": "Jerry Penn",
"currentBalance": 0,
"availableBalance": 0,
"holdAmount": 0,
"transactionCount": 0,
"creditLimit": 0,
"currency": "usd",
"openedAt": "2025-09-16T07:18:04.42-04:00",
"closedAt": "2025-12-08T07:02:27.3614282-05:00",
"masterAccountNumber": "2819503463",
"customerId": "53c34cf0-4cd2-4768-937b-b30000dffdca",
"classification": "Personal",
"beneficiary": {
"firstName": "Brandon",
"lastName": "Sanderson",
"streetAddress1": "5 Broadway",
"city": "New York",
"state": "NY",
"postalCode": "10036",
"countryCode": "US"
},
"partnerId": "cd9c12f4-7691-424a-b38b-af5b0134c611",
"lastMaintenanceAt": "2025-09-16T07:24:23.443-04:00",
"productId": "83bed086-8182-4151-a1e3-af5b01362783",
"lastModifiedAt": "2025-12-08T07:02:27.3614282-05:00"
}