> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Create Bank Account

> Store a bank account on file for a square account.

`square.createBankAccount` store a bank account on file for a square account.

## Example

```ts automations/square-create-bank-account.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { square } from "automate.ax/square"

export default automation("Create Square Bank Account", () => {
  onDashboardRun({ title: "Create Square Bank Account" })

  square.createBankAccount({
    idempotencyKey: "4e43559a-f0fd-47d3-9da2-7ea1f97d94be",
    sourceId: "bnon:CA4SEHsQwr0rx6DbWLD5BQaqMnoYAQ",
    customerId: "HM3B2D5JKGZ69359BTEHXM2V8M",
  })
})
```

## Inputs

Every input accepts a compatible signal. It requires `BANK_ACCOUNTS_WRITE`.

| Field            | Type     | Required | Default | Description                                                                                                                            |
| ---------------- | -------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `idempotencyKey` | `string` | Yes      | —       | Unique ID. For more information, see the [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).             |
| `sourceId`       | `string` | Yes      | —       | The ID of the source that represents the bank account information to be stored. This field accepts the payment token created by WebSDK |
| `customerId`     | `string` | No       | —       | The ID of the customer associated with the bank account to be stored.                                                                  |

Use the official [CreateBankAccount reference](https://developer.squareup.com/reference/square/bank-accounts-api/create-bank-account) for provider field semantics and limits.

## Output

Returns the official `Square.CreateBankAccountResponse` response as a codec-safe object. Square integer money amounts remain `bigint` values.
