BankAccounts
Create and query the bank accounts of the merchant.
Table Specific Information
Select
The add-in uses the Square API to process search criteria, while other filters are processed client side within the add-in.
Select all bank accounts:
SELECT * FROM BankAccounts
Select a bank account using its Id:
SELECT * FROM BankAccounts WHERE Id = 'bact:OxfBTiXgByaXds1K4GB'
Select all bank accounts for a specific location:
SELECT * FROM BankAccounts WHERE LocationId = '92BYHNBR6W77E'
Insert
To create a bank account, you will need to specify CustomerId, SourceId, and IdempotencyKey. The SourceId is a payment token generated by the Square Web Payments SDK.
INSERT INTO BankAccounts (CustomerId, SourceId, IdempotencyKey) VALUES ('CBASEPlKoFeu4nWm0MX_oHdklAIgAQ', 'payment-token-from-web-payments-sdk', 'unique-idempotency-key-001')
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | True |
The Square-issued Id of the bank account. |
| LocationId | String | True |
The Id of the location. |
| BankName | String | True |
The name of the bank that manages the account. |
| Name | String | True |
The name associated with the bank account. |
| Type | String | True |
The type of the bank account. For example, savings or checking. The allowed values are CHECKING, SAVINGS, INVESTMENT, OTHER, BUSINESS_CHECKING. |
| Country | String | True |
The ISO 3166 Alpha 2 country code where the bank account is based. |
| AccountNumberSuffix | String | True |
The last few digits of the bank account number. |
| CurrencyCode | String | True |
The code of the currency associated with the bank account. |
| PrimaryBankIdentificationNumber | String | True |
Primary identifier for the bank. |
| Status | String | True |
The current verification status of this BankAccount object. The allowed values are VERIFICATION_IN_PROGRESS, VERIFIED, DISABLED. |
| Creditable | Boolean | True |
Indicates whether it is possible for Square to send money to this bank account. |
| Debitable | Boolean | True |
Indicates whether it is possible for Square to take money from this bank account. |
| Version | Int64 | True |
The current version of the BankAccount. |
| SecondaryBankIdentificationNumber | String | True |
Secondary identifier for the bank. For international payments, this is required if it applies (for example, a routing transit number for a U.S. bank account). |
| DebitMandateReferenceId | String | True |
Reference identifier that will be displayed to UK bank account owners when collecting direct debit authorization. |
| ReferenceId | String | True |
Client-provided identifier for linking the bank account to an entity in a third-party system. |
| Fingerprint | String | True |
Square-assigned unique identifier for the bank account based on account information. Used to identify if two bank account entries refer to the same real-world account. |
| CustomerId | String | False |
The ID of the customer who owns the bank account. |
Pseudocolumns
Pseudo column fields are used in the WHERE clause of SELECT statements (unless stated otherwise) and offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description |
| SourceId | String |
The ID of the source that represents the bank account information to be stored. This value is the payment token generated by the Web Payments SDK. |
| IdempotencyKey | String |
A unique string that identifies this CreateBankAccount request. Keys can be up to 45 characters long and can include digits, letters, underscores, and hyphens. |