---
title: Close subledger
slug: apis/accounts/subledgers-apis/close-subledger
description: Delete (close) a subledger (subaccount) for a master account via DELETE /core/v1/dda/subaccounts/{accountNumber}, specifying the subledger account number.
icon: {"apiMethod":"DELETE"}
docTags: 
createdAt: 2025-12-08T11:51:36.906Z
---

## Relevant webhooks

For this endpoint be sure you have [registered](docId\:BN5XtgkJogBe-CtwomCbS) for this webhook:

- [Core.SubAccount.Closed](docId\:eAs8aFqW7M97baeZUC8Sr)&#x20;

## API reference

Closes a specific subledger (subaccount).

:::hint{type="info"}
The subaccount's current and available balance must be 0 to be eligible for closing
:::

:::ApiMethodV2
```json
{
  "name": "Endpoint: /core/v1/dda/subaccounts/{accountNumber}",
  "method": "DELETE",
  "url": "    https://sandbox.crbcos.com/core/v1/dda/subaccounts/{accountNumber}",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "P9idftSfTSKm5GwLRp3lQ",
        "language": "curl",
        "code": "curl --location --request DELETE 'https://sandbox.crbcos.com/core/v1/dda/subaccounts/341748805478' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer <token>' \\\n--data '\n'",
        "customLabel": ""
      },
      {
        "id": "sjZ6ScuddiYhUaZx4C86K",
        "language": "nodejs",
        "code": "var https = require('follow-redirects').https;\nvar fs = require('fs');\n\nvar options = {\n  'method': 'DELETE',\n  'hostname': 'sandbox.crbcos.com',\n  'path': '/core/v1/dda/subaccounts/341748805478',\n  'headers': {\n    'Content-Type': 'application/json',\n    'Authorization': 'Bearer <token>'\n  },\n  'maxRedirects': 20\n};\n\nvar req = https.request(options, function (res) {\n  var chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function (chunk) {\n    var body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n\n  res.on(\"error\", function (error) {\n    console.error(error);\n  });\n});\n\nvar postData =  \"\\n\";\n\nreq.setHeader('Content-Length', postData.length);\n\nreq.write(postData);\n\nreq.end();",
        "customLabel": ""
      },
      {
        "id": "gDB_P0O6T95GP_EHqfwx2",
        "language": "python",
        "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"sandbox.crbcos.com\")\npayload = \"\\n\"\nheaders = {\n  'Content-Type': 'application/json',\n  'Authorization': 'Bearer <token>'\n}\nconn.request(\"DELETE\", \"/core/v1/dda/subaccounts/341748805478\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "customLabel": ""
      },
      {
        "id": "FXvCnwdEDvWGa2RUa43LJ",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://sandbox.crbcos.com/core/v1/dda/subaccounts/341748805478\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"Authorization\"] = \"Bearer <token>\"\nrequest.body = \"\\n\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "U9BrpgYsCj1siiLdweM6D",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"strings\"\n  \"net/http\"\n  \"io\"\n)\n\nfunc main() {\n\n  url := \"https://sandbox.crbcos.com/core/v1/dda/subaccounts/341748805478\"\n  method := \"DELETE\"\n\n  payload := strings.NewReader(`\n`)\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, payload)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"Authorization\", \"Bearer <token>\")\n\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := io.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "P9idftSfTSKm5GwLRp3lQ"
  },
  "results": {
    "languages": [
      {
        "id": "vjutubmVyYLoLEjt5Wkle",
        "language": "200",
        "code": "{\n    \"accountNumber\": \"341748805478\",\n    \"accountType\": \"Deposit\",\n    \"status\": \"Closed\",\n    \"ledgerType\": \"Passthrough\",\n    \"productType\": \"Checking\",\n    \"title\": \"Jerry Penn\",\n    \"currentBalance\": 0,\n    \"availableBalance\": 0,\n    \"holdAmount\": 0,\n    \"transactionCount\": 0,\n    \"creditLimit\": 0,\n    \"currency\": \"usd\",\n    \"openedAt\": \"2025-09-16T07:18:04.42-04:00\",\n    \"closedAt\": \"2025-12-08T07:02:27.3614282-05:00\",\n    \"masterAccountNumber\": \"2819503463\",\n    \"customerId\": \"53c34cf0-4cd2-4768-937b-b30000dffdca\",\n    \"classification\": \"Personal\",\n    \"beneficiary\": {\n        \"firstName\": \"Brandon\",\n        \"lastName\": \"Sanderson\",\n        \"streetAddress1\": \"5 Broadway\",\n        \"city\": \"New York\",\n        \"state\": \"NY\",\n        \"postalCode\": \"10036\",\n        \"countryCode\": \"US\"\n    },\n    \"partnerId\": \"cd9c12f4-7691-424a-b38b-af5b0134c611\",\n    \"lastMaintenanceAt\": \"2025-09-16T07:24:23.443-04:00\",\n    \"productId\": \"83bed086-8182-4151-a1e3-af5b01362783\",\n    \"lastModifiedAt\": \"2025-12-08T07:02:27.3614282-05:00\"\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "vjutubmVyYLoLEjt5Wkle"
  },
  "request": {
    "pathParameters": [
      {
        "name": "accountNumber",
        "kind": "required",
        "type": "string",
        "description": "Account number for the subaccount (subledger) you want to close",
        "": "Account number for the subaccount (subledger) you want to close"
      }
    ],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "response": [
    {
      "name": "accountNumber",
      "kind": "optional",
      "type": "string",
      "description": "The subledger account number"
    },
    {
      "name": "accountType",
      "kind": "optional",
      "type": "string",
      "description": "Deposit account type:\n- GeneralLedger\n- Deposit\n- CreditCard\n- StoredValue\n- Wallet\n- Unknown",
      "children": []
    },
    {
      "name": "status",
      "kind": "optional",
      "type": "string",
      "description": "Subledger account status:\n- Closed\n- Active",
      "children": []
    },
    {
      "name": "ledgerType",
      "kind": "optional",
      "type": "string",
      "description": "Ledger type:\n- Passthrough\n- Direct",
      "children": []
    },
    {
      "name": "title",
      "kind": "optional",
      "type": "string",
      "description": "The name on the account. Usually this is the account holder name, but not always.",
      "children": []
    },
    {
      "name": "currentBalance",
      "kind": "optional",
      "type": "Integer",
      "description": "Current balance. A negative amount means a debit and a positive amount means a credit.",
      "children": []
    },
    {
      "name": "availableBalance",
      "kind": "optional",
      "type": "Integer",
      "description": "Available amount of the balance. A negative amount means a debit and a positive amount means a credit.",
      "children": []
    },
    {
      "name": "holdAmount",
      "kind": "optional",
      "type": "Integer",
      "description": "Amount of the hold (if any) placed on the account",
      "children": []
    },
    {
      "name": "transactionCount",
      "kind": "optional",
      "type": "Integer",
      "description": "Total number of transactions posted to the account",
      "children": []
    },
    {
      "name": "creditLimit",
      "kind": "optional",
      "type": "integer",
      "description": "Credit limit of the account customer",
      "children": []
    },
    {
      "name": "currency",
      "kind": "optional",
      "type": "string",
      "description": "Currency held in the account",
      "children": []
    },
    {
      "name": "openedAt",
      "kind": "optional",
      "type": "string",
      "description": "Date and time the deposit account was opened. The date and time are in this format: yyyy-mm-ddThh:mm:ss[.mmm]",
      "children": []
    },
    {
      "name": "closedAt",
      "kind": "optional",
      "type": "string",
      "description": "The date and time that the account was closed.  The date and time are in this format: yyyy-mm-ddThh:mm:ss[.mmm]",
      "children": []
    },
    {
      "name": "masterAccountNumber",
      "kind": "optional",
      "type": "string",
      "description": "Master account the subledger was opened under",
      "children": []
    },
    {
      "name": "customerId",
      "kind": "optional",
      "type": "string",
      "description": "The unique ID assigned to a customer when the customer record is created. You need this ID to take action for a specific customer. For example, when opening an account or adding an address to a customer record.",
      "children": []
    },
    {
      "name": "classification",
      "kind": "optional",
      "type": "string",
      "description": "Can be one of two types of beneficiaries:\n- Personal\n- Business",
      "children": []
    },
    {
      "name": "beneficiary",
      "kind": "optional",
      "type": "Object",
      "description": "Beneficiary profile for this subledger",
      "children": [
        {
          "name": "referenceId",
          "kind": "optional",
          "type": "string",
          "description": "Your organization's reference identifier for the beneficiary of this subaccount"
        },
        {
          "name": "firstName",
          "kind": "optional",
          "type": "string",
          "description": "The first name of the beneficiary"
        },
        {
          "name": "middleName",
          "kind": "optional",
          "type": "string",
          "description": "The middle name of the beneficiary"
        },
        {
          "name": "lastName",
          "kind": "optional",
          "type": "string",
          "description": "The last name of the beneficiary"
        },
        {
          "name": "entityName",
          "kind": "optional",
          "type": "string",
          "description": "If the beneficiary is a business or organization enter its name. If the beneficiary is an individual enter their full name."
        },
        {
          "name": "streetAddress1",
          "kind": "optional",
          "type": "string",
          "description": "Primary location details of account holder, for instance, street name, house/building number, PO box"
        },
        {
          "name": "streetAddress2",
          "kind": "optional",
          "type": "string",
          "description": "Additional address information"
        },
        {
          "name": "city",
          "kind": "optional",
          "type": "string",
          "description": "City full name"
        },
        {
          "name": "state",
          "kind": "optional",
          "type": "string",
          "description": "State name. We recommend you enter the 2-character state code."
        },
        {
          "name": "postalCode",
          "kind": "optional",
          "type": "string",
          "description": "Postal code, also known as ZIP code"
        },
        {
          "name": "countryCode",
          "kind": "optional",
          "type": "string",
          "description": "2-letter ISO country code"
        },
        {
          "name": "phoneNumber",
          "kind": "optional",
          "type": "string",
          "description": "The beneficiary phone number"
        },
        {
          "name": "emailAddress",
          "kind": "optional",
          "type": "string",
          "description": "Beneficiary email address. 255 character limit."
        },
        {
          "name": "notes",
          "kind": "optional",
          "type": "string",
          "description": "General notes about the beneficiary"
        },
        {
          "name": "taxIdType",
          "kind": "optional",
          "type": "string",
          "description": "Tax ID type for the beneficiary:\n- Ssn (Social security number)\n- Ein (Employer identification number)\n- Itin (Individual tax ID number)\n- Vat (International VAT number)\n- Foreign (non-US domestic)"
        },
        {
          "name": "taxId",
          "kind": "optional",
          "type": "string",
          "description": "Beneficiary tax ID number"
        },
        {
          "name": "birthDate",
          "kind": "optional",
          "type": "string",
          "description": "Beneficiary birthdate in the format YYYY-MM-DD"
        },
        {
          "name": "dateFormed",
          "kind": "optional",
          "type": "string",
          "description": "Date the subledger was formed, in the format YYYY-MM-DD"
        }
      ]
    },
    {
      "name": "partnerId",
      "kind": "optional",
      "type": "string",
      "description": "Your unique ID in the Cross River system. This ID is in GUID format.",
      "children": []
    },
    {
      "name": "lastMaintenanceAt",
      "kind": "optional",
      "type": "string",
      "description": "Date and time the account last had maintenance performed on it. The date and time are in this format: yyyy-mm-ddThh:mm:ss[.mmm]",
      "children": []
    },
    {
      "name": "lastTransactedAt",
      "kind": "optional",
      "type": "string",
      "description": "The date and time a transaction last took place on the account. The date and time are in this format: yyyy-mm-ddThh:mm:ss[.mmm]",
      "children": []
    },
    {
      "name": "productId",
      "kind": "optional",
      "type": "string",
      "description": "ID in GUID format of your specific product type on which the account is based. Provided by Cross River.",
      "children": []
    },
    {
      "name": "clientIdentifier",
      "kind": "optional",
      "type": "string",
      "description": "Your own unique identifying string to a payment call or COS record. This attribute is useful for idempotency purposes.",
      "children": []
    },
    {
      "name": "lastModifiedAt",
      "kind": "optional",
      "type": "string",
      "description": "Internal Cross River value. Date and time the database entry was last modified. In this case, the date and time are in this format: yyyy-mm-ddThh:mm:ss[.mmm]",
      "children": []
    },
    {
      "name": "balances",
      "kind": "optional",
      "type": "object",
      "description": "There can be multiple account balances listed",
      "children": [
        {
          "name": "accountNumber",
          "kind": "optional",
          "type": "string",
          "description": "Number of the account this information describes"
        },
        {
          "name": "isSubAccount",
          "kind": "optional",
          "type": "boolean",
          "description": "If the account balance presented is for a subledger, true. Otherwise false."
        },
        {
          "name": "currency",
          "kind": "optional",
          "type": "string",
          "description": "Currency held in the account"
        },
        {
          "name": "currentBalance",
          "kind": "optional",
          "type": "integer",
          "description": "Balance including all transactions even if they have not yet settled"
        },
        {
          "name": "availableBalance",
          "kind": "optional",
          "type": "integer",
          "description": "Balance available to the account holder"
        },
        {
          "name": "holdAmount",
          "kind": "optional",
          "type": "integer",
          "description": "Amount of funds that cannot yet be accessed because the funds are on hold"
        },
        {
          "name": "transactionCount",
          "kind": "optional",
          "type": "integer",
          "description": "Number of transactions in the last period"
        },
        {
          "name": "lastModifiedAt",
          "kind": "optional",
          "type": "string",
          "description": "Internal Cross River value. Date and time the database entry was last modified. In this case, the date and time are in this format: yyyy-mm-ddThh:mm:ss[.mmm]"
        },
        {
          "name": "lastTransactedAt",
          "kind": "optional",
          "type": "string",
          "description": "The date and time a transaction last took place on the account. The date and time are in this format: yyyy-mm-ddThh:mm:ss[.mmm]"
        }
      ]
    }
  ],
  "hasTryItOut": false,
  "autoGeneratedAnchorSlug": "endpoint-corev1ddasubaccountsaccountnumber",
  "legacyHash": "ACf5kZIDXMSIHxQOJw3vm"
}
```
:::

