Skip to content

Stripe: Retrieve a bank account

Stripe customers.getCustomersCustomerBankAccountsId: arguments, response, policy and SDK examples.

← Customers operations · Get started

Operation stripe.getcustomerscustomerbankaccountsid

Provider route: GET /v1/customers/{customer}/bank_accounts/{id}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["customers"]["getCustomersCustomerBankAccountsId"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.customers.getCustomersCustomerBankAccountsId(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_stripe import StripeIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.customers.get_customers_customer_bank_accounts_id(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.customerstringRequired within parentMaximum length: 5000
path.idstringRequired within parentMaximum length: 5000
queryobjectOptionalAdditional keys: not allowed
query.expandarrayOptional
query.expand[]stringEach itemMaximum length: 5000

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Retrieve a bank account — response body

Referenced models: Retrieve a bank account — response body

704 more schemas are linked from the tables above, on the schema pages.

Retrieve a bank account — response body
FieldTypePresenceDescription and constraints
$objectRootThese bank accounts are payment methods on `Customer` objects.

On the other hand [External Accounts](/api#external_accounts) are transfer
destinations on `Account` objects for connected accounts.
They can be bank accounts or debit cards as well, and are documented in the links above.

Related guide: [Bank debits and transfers](/payments/bank-debits-transfers)
accountJSONOptional
account (anyOf 1)JSONAlternativeThe account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](/api/external_account_bank_accounts/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`.
account (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
account (anyOf 1) (anyOf 2)ModelAlternativeExpand Create an account — response body
account (anyOf 2)nullAlternative
account_holder_nameJSONOptional
account_holder_name (anyOf 1)stringAlternativeThe name of the person or business that owns the bank account.
Maximum length: 5000
account_holder_name (anyOf 2)nullAlternative
account_holder_typeJSONOptional
account_holder_type (anyOf 1)stringAlternativeThe type of entity that holds the account. This can be either `individual` or `company`.
Maximum length: 5000
account_holder_type (anyOf 2)nullAlternative
account_typeJSONOptional
account_type (anyOf 1)stringAlternativeThe bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
Maximum length: 5000
account_type (anyOf 2)nullAlternative
available_payout_methodsJSONOptional
available_payout_methods (anyOf 1)arrayAlternativeA set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout.
available_payout_methods (anyOf 1)[]stringEach itemKnown values: instant, standard
available_payout_methods (anyOf 2)nullAlternative
bank_nameJSONOptional
bank_name (anyOf 1)stringAlternativeName of the bank associated with the routing number (e.g., `WELLS FARGO`).
Maximum length: 5000
bank_name (anyOf 2)nullAlternative
countrystringRequired within parentTwo-letter ISO code representing the country the bank account is located in.
Maximum length: 5000
currencystringRequired within parentThree-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.
Format: currency
customerJSONOptional
customer (anyOf 1)JSONAlternativeThe ID of the customer that the bank account is associated with.
customer (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
customer (anyOf 1) (anyOf 2)ModelAlternativeExpand Create a customer — response body
customer (anyOf 1) (anyOf 3)ModelAlternativeExpand Delete a customer — response body
customer (anyOf 2)nullAlternative
default_for_currencyJSONOptional
default_for_currency (anyOf 1)booleanAlternativeWhether this bank account is the default external account for its currency.
default_for_currency (anyOf 2)nullAlternative
fingerprintJSONOptional
fingerprint (anyOf 1)stringAlternativeUniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
Maximum length: 5000
fingerprint (anyOf 2)nullAlternative
future_requirementsJSONOptional
future_requirements (anyOf 1)JSONAlternativeInformation about the [upcoming new requirements for the bank account](https://docs.stripe.com/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
future_requirements (anyOf 1) (anyOf 1)ModelAlternativeExpand Retrieve a bank account — response body — requirements value currently due, errors, past due, pending verification
future_requirements (anyOf 2)nullAlternative
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
last4stringRequired within parentThe last four digits of the bank account number.
Maximum length: 5000
metadataJSONOptional
metadata (anyOf 1)objectAlternativeSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Additional keys: see wildcard field
metadata (anyOf 1).*stringAdditional keysMaximum length: 500
metadata (anyOf 2)nullAlternative
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: bank_account
requirementsJSONOptional
requirements (anyOf 1)JSONAlternativeInformation about the requirements for the bank account, including what information needs to be collected.
requirements (anyOf 1) (anyOf 1)ModelAlternativeExpand Retrieve a bank account — response body — requirements value currently due, errors, past due, pending verification
requirements (anyOf 2)nullAlternative
routing_numberJSONOptional
routing_number (anyOf 1)stringAlternativeThe routing transit number for the bank account.
Maximum length: 5000
routing_number (anyOf 2)nullAlternative
statusstringRequired within parentFor bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, `tokenized_account_number_deactivated` or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If the status is `tokenized_account_number_deactivated`, the account utilizes a tokenized account number which has been deactivated due to expiration or revocation. This account will need to be reverified to continue using it for money movement. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated.

For external accounts, possible values are `new`, `errored`, `verification_failed`, and `tokenized_account_number_deactivated`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
Maximum length: 5000

Referenced models: Create an account — response body, Create a customer — response body, Delete a customer — response body, Retrieve a bank account — response body — requirements value currently due, errors, past due, pending verification

Delete a customer — response body
FieldTypePresenceDescription and constraints
$objectRoot
deletedbooleanRequired within parentAlways true for a deleted object
Known values: True
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: customer
Create an account — response body — groups The groups associated with the account payments pricing
FieldTypePresenceDescription and constraints
$objectRoot
payments_pricingJSONOptional
payments_pricing (anyOf 1)stringAlternativeThe group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://docs.stripe.com/connect/platform-pricing-tools) for details.
Maximum length: 5000
payments_pricing (anyOf 2)nullAlternative
Create an account — response body — tos acceptance
FieldTypePresenceDescription and constraints
$objectRoot
dateJSONOptional
date (anyOf 1)JSONAlternative
date (anyOf 1) (anyOf 1)integerAlternativeThe Unix timestamp marking when the account representative accepted their service agreement
Format: unix-time
date (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
date (anyOf 2)nullAlternative
ipJSONOptional
ip (anyOf 1)stringAlternativeThe IP address from which the account representative accepted their service agreement
Maximum length: 5000
ip (anyOf 2)nullAlternative
service_agreementstringOptionalThe user's service agreement type
Maximum length: 5000
user_agentJSONOptional
user_agent (anyOf 1)stringAlternativeThe user agent of the browser from which the account representative accepted their service agreement
Maximum length: 5000
user_agent (anyOf 2)nullAlternative
Create a Payment Method — response body — zip
FieldTypePresenceDescription and constraints
$objectRoot

SDK function policy ID: stripe.getcustomerscustomerbankaccountsid. Catalog operation: GetCustomersCustomerBankAccountsId. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"Stripe-Version": "2026-09-30.endive"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.