---
title: "Create a bank account number for a sub-account."
method: POST
path: "/ledger/subaccounts/{subAccountIdRef}/account-details"
tags: ["ledger-sub-accounts"]
---

# Create a bank account number for a sub-account.

`POST /ledger/subaccounts/{subAccountIdRef}/account-details`

Generates a bank account number for this sub-account in the given currency through the
account-number provider. The account name must be supplied by the client.

## Request body

- CreateSubAccountNumberRequest — Request to generate a bank account number for a sub-account.
  - `accountName` string, required — Name to assign to the generated bank account.

## Response `201`

Bank account number created

- CashDepositPaymentDetails — Destination account details the customer must pay into to fund the deposit. Mirrors a Beneficiary (without an id). Carries only the account details needed to make the payment; transaction context (amount, status, etc.) lives on the enclosing CashDepositTransaction. `details` can be nullable when the account number provider is still generating it
  - `details` CashAccountDetails
    - `accountInfoType` string, required — Used to determine the exact schema type. Allowed values: - CashLocalBankAccount - CashSepaBankAccount - CashACHBankAccount - CashSwiftBankAccount - CashMobileWalletAccount - CashMultiRailBankAccount
    - `accountName` string, required — Name on the destination account.
    - `accountNumber` string, required — The destination account identifier. For mobile money this is the phone number, for P2P wallet the account ID. Where routing number or sort code is present, this would be `{routingNumber}-{accountNumber}`.
    - `reference` string — Reference the customer must include with the deposit so the pay-in is auto-matched. Optional — some providers do not require one.
  - `payinCurrency` string, required — Currency the destination account accepts for the deposit.

## Other responses

- `400` — Request could not be validated
- `401` — Client is not authorized to make request
- `403` — Expected permission is not available.
- `409` — Entity already exist, it can not be created.
- `default` — Internal Server Error

---

[API](https://skmtc.net/nestechops/apis/onboard-external-api-gateway.md) · [All operations](https://skmtc.net/nestechops/apis/onboard-external-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nestechops/onboard-external-api-gateway/revisions/29661adc1ffc/schema)
