---
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`

## Request

- Base URL: `https://external.dev.onboardpay.co`
- URL: `https://external.dev.onboardpay.co/ledger/subaccounts/{subAccountIdRef}/account-details`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/nestechops/apis/onboard-external-api-gateway/docs/ledger/subaccounts/:subAccountIdRef/account-details/get.ts> (a function with typed inputs; its response is checked against the schema)

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.
  - `paymentMethods` PaymentMethodCapability[]: Fee, limits, and settlement timeline per payment rail this account accepts deposits through, so a business can see up front what each rail will cost and how long it will take. Empty when the account-number provider has no capability data configured for this currency yet.
    - `rail` 'ACH' | 'FEDWIRE' | 'SWIFT' | 'SEPA' | 'FPS' | 'FPS_CROSS_SCHEME' | 'NIP', required: A payment rail an account-number provider can settle a deposit through.
    - `fee` PaymentMethodFee, required: The fee charged to the customer for a deposit made via this rail.
      - `percentage` number, required: Fee as a fraction of the deposit amount, e.g. 0.0035 = 0.35%.
      - `fixedAmount` number, required: Flat fee added on top of the percentage fee, in `currency`.
      - `currency` string, required: Currency `fixedAmount` is denominated in.
    - `limits` PaymentMethodLimits: Deposit amount limits for this rail, split by whether the sender is the account owner (first-party) or someone else (third-party) — third-party deposits are typically capped lower as an AML control.
      - `minAmount` number, required
      - `firstParty` PartyDepositLimits: Maximum deposit amount(s) for one party type (see PaymentMethodLimits). A null maxPerTransaction or maxPerDay means no limit is enforced for that period — e.g. NGN's first-party bank transfers have no cap at all, while third-party transfers are capped both per-transaction and per-day.
        - `maxPerTransaction` number
        - `maxPerDay` number
      - `thirdParty` PartyDepositLimits: Maximum deposit amount(s) for one party type (see PaymentMethodLimits). A null maxPerTransaction or maxPerDay means no limit is enforced for that period — e.g. NGN's first-party bank transfers have no cap at all, while third-party transfers are capped both per-transaction and per-day.
        - `maxPerTransaction` number
        - `maxPerDay` number
      - `currency` string, required
    - `timeline` PaymentMethodTimeline: How long a deposit made via this rail is expected to take to settle.
      - `minValue` integer, required
      - `maxValue` integer, required
      - `unit` 'MINUTES' | 'HOURS' | 'BUSINESS_DAYS', required

## 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

## Changes

- **2026-08-13** `35fe01ca087b`: 1 info
  - added the optional property `paymentMethods` to the response with the `200` status
- **2026-07-27** `b633da58d085`: 1 breaking, 6 info
  - the `details` response's property type changed from no type to `object` for status `200`
  - added the optional property `details/reference` to the response with the `200` status
  - removed `#/components/schemas/CashAccountDetails` from the `details` response property `allOf` list for the response status `200`
  - added discriminator to `details` response property for the response status `200`
  - …3 more
- **2026-07-26** `a3c4e2742615`: 6 breaking, 1 warning, 4 info
  - the response property `details` became nullable for the status `200`
  - the response property `details` became optional for the status `200`
  - the `details` response's property type changed from `object` to no type for status `200`
  - removed the required property `details/accountInfoType` from the response with the `200` status
  - …7 more
- **2026-07-13** `fc790ea4deb6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/nestechops/apis/onboard-external-api-gateway/changes/ledger/subaccounts/:subAccountIdRef/account-details/get.md)

---

[API](https://skmtc.dev/nestechops/apis/onboard-external-api-gateway.md) - [All operations](https://skmtc.dev/nestechops/apis/onboard-external-api-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/nestechops/apis/onboard-external-api-gateway/revisions/5da9ec1b2573?raw)
