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

# Get the bank account number for a sub-account.

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

Returns the bank account number (and bank details) generated for this sub-account in the given
currency, if one exists.

## Response `200`

Bank account number details

- 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.
- `404` — Entity was not found
- `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)
