Square: Get Bank Account By V1 Id
Square bankAccounts.getBankAccountByV1Id: arguments, response, policy and SDK examples.
← Bank accounts operations · Get started
Operation square.getbankaccountbyv1id
Provider route: GET /v2/bank-accounts/by-v1-id/{v1_bank_account_id}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/square with npm, or alter-sdk-square with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { SquareIntegration } from "@alter-ai/square";
async function execute(input: Parameters<SquareIntegration["bankAccounts"]["getBankAccountByV1Id"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new SquareIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.bankAccounts.getBankAccountByV1Id(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_square import SquareIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = SquareIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.bank_accounts.get_bank_account_by_v1_id(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.v1_bank_account_id | string | Required within parent |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Get Bank Account By V1 Id — response body |
Referenced models: Get Bank Account By V1 Id — response body
Schemas
Section titled “Schemas”1 more schema is linked from the tables above, on the schema pages.
Get Bank Account By V1 Id — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response object returned by GetBankAccountByV1Id. |
bank_account | Model | Optional | Expand Get Bank Account — response body — bank account The requested `BankAccount` object. |
errors | array | Optional | Information on errors encountered during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
Referenced models: Get Bank Account — response body — bank account, Get Shift — response body — errors item
Get Bank Account — response body — bank account
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a bank account. For more information about linking a bank account to a Square account, see [Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api). |
account_number_suffix | string | Required within parent | The last few digits of the account number. Minimum length: 1 |
account_type | string | Required within parent | Indicates the financial purpose of the bank account. The financial purpose of the associated bank account. See [BankAccountType](#type-bankaccounttype) for possible values Known values: CHECKING, SAVINGS, INVESTMENT, OTHER, BUSINESS_CHECKING |
bank_name | JSON | Optional | |
bank_name (anyOf 1) | string | Alternative | Read only. Name of actual financial institution. For example "Bank of America". Maximum length: 100 |
bank_name (anyOf 2) | null | Alternative | |
country | Model | Required within parent | Expand Create Location — response body — location country The ISO 3166 Alpha-2 country code where the bank account is based. See [Country](#type-country) for possible values |
creditable | boolean | Required within parent | Indicates whether it is possible for Square to send money to this bank account. |
currency | Model | Required within parent | Expand Create Location — response body — location currency The 3-character ISO 4217 currency code indicating the operating currency of the bank account. For example, the currency code for US dollars is `USD`. See [Currency](#type-currency) for possible values |
customer_id | string | Optional | The ID of the customer who owns the bank account Read only: true |
debit_mandate_reference_id | JSON | Optional | |
debit_mandate_reference_id (anyOf 1) | string | Alternative | Reference identifier that will be displayed to UK bank account owners when collecting direct debit authorization. Only required for UK bank accounts. |
debit_mandate_reference_id (anyOf 2) | null | Alternative | |
debitable | boolean | Required within parent | Indicates whether it is possible for Square to take money from this bank account. |
fingerprint | JSON | Optional | |
fingerprint (anyOf 1) | string | Alternative | A Square-assigned, unique identifier for the bank account based on the account information. The account fingerprint can be used to compare account entries and determine if the they represent the same real-world bank account. |
fingerprint (anyOf 2) | null | Alternative | |
holder_name | string | Required within parent | Name of the account holder. This name must match the name on the targeted bank account record. Minimum length: 1 |
id | string | Required within parent | The unique, Square-issued identifier for the bank account. Maximum length: 30 Minimum length: 1 |
location_id | JSON | Optional | |
location_id (anyOf 1) | string | Alternative | The location to which the bank account belongs. |
location_id (anyOf 2) | null | Alternative | |
primary_bank_identification_number | string | Required within parent | Primary identifier for the bank. For more information, see [Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api). Maximum length: 40 |
reference_id | JSON | Optional | |
reference_id (anyOf 1) | string | Alternative | Client-provided identifier for linking the banking account to an entity in a third-party system (for example, a bank account number or a user identifier). |
reference_id (anyOf 2) | null | Alternative | |
secondary_bank_identification_number | JSON | Optional | |
secondary_bank_identification_number (anyOf 1) | string | Alternative | Secondary identifier for the bank. For more information, see [Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api). Maximum length: 40 |
secondary_bank_identification_number (anyOf 2) | null | Alternative | |
status | string | Required within parent | Indicates the current verification status of a `BankAccount` object. Read-only. The current verification status of this BankAccount object. See [BankAccountStatus](#type-bankaccountstatus) for possible values Known values: VERIFICATION_IN_PROGRESS, VERIFIED, DISABLED |
version | JSON | Optional | |
version (anyOf 1) | integer | Alternative | The current version of the `BankAccount`. |
version (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Create Location — response body — location country, Create Location — response body — location currency
Get Shift — response body — errors item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an error encountered during a request to the Connect API. See [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information. |
category | string | Required within parent | Indicates which high-level category of error has occurred during a request to the Connect API. The high-level category for the error. See [ErrorCategory](#type-errorcategory) for possible values Known values: API_ERROR, AUTHENTICATION_ERROR, INVALID_REQUEST_ERROR, RATE_LIMIT_ERROR, PAYMENT_METHOD_ERROR, REFUND_ERROR, MERCHANT_SUBSCRIPTION_ERROR, EXTERNAL_VENDOR_ERROR |
code | Model | Required within parent | Expand Get Shift — response body — errors item code The specific code of the error. See [ErrorCode](#type-errorcode) for possible values |
detail | string | Optional | A human-readable description of the error for debugging purposes. |
field | string | Optional | The name of the field provided in the original request (if any) that the error pertains to. |
Referenced models: Get Shift — response body — errors item code
Create Location — response body — location country
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | string | Root | Indicates the country associated with another entity, such as a business. Values are in [ISO 3166-1-alpha-2 format](http://www.iso.org/iso/home/standards/country_codes.htm). Known values: ZZ, AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW |
Create Location — response body — location currency
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | string | Root | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://wikipedia.org/wiki/ISO_4217). Known values: UNKNOWN_CURRENCY, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYR, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LVL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SLE, SOS, SRD, SSP, STD, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, USS, UYI, UYU, UZS, VEF, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XTS, XXX, YER, ZAR, ZMK, ZMW, BTC, XUS |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: square.getbankaccountbyv1id. Catalog operation: GetBankAccountByV1Id. 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.
Required provider scopes: ["BANK_ACCOUNTS_READ"]
Pinned headers: {"Square-Version": "2026-11-18"}