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

# Bank Accounts

> Link fiat bank accounts for deposits and withdrawals

Bank accounts are used to deposit fiat into your Consul balance and to receive withdrawals. Each
bank account is tied to a specific currency and payment rail. Use the
[Create a Bank Account](/api-reference/bank-accounts/create-a-bank-account) endpoint to link one.

The required fields depend on the currency and rail. Select your currency below for the full
schema and a working example.

<Tabs>
  <Tab title="USD (Wire)">
    **Payment rail:** `usd_fedwire`

    | Field                      | Required      | Description                  |
    | -------------------------- | ------------- | ---------------------------- |
    | `account_number`           | Yes           | Bank account number          |
    | `routing_number`           | Yes           | ABA routing number           |
    | `bank_account_type`        | Yes           | `checking` or `savings`      |
    | `bank_account_holder_type` | Yes           | `business` or `individual`   |
    | `owner_address`            | Yes           | Account holder's address     |
    | `owner_first_name`         | If individual | Account holder's first name  |
    | `owner_last_name`          | If individual | Account holder's last name   |
    | `owner_business_name`      | If business   | Business name on the account |

    ```bash theme={"system"}
    curl -X POST https://api.onconsul.com/v1/bank_accounts \
      -H "Authorization: Basic base64($CONSUL_API_KEY)" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Acme Corp Operating",
        "currency": "USD",
        "payment_rail": "usd_fedwire",
        "usd_domestic_wire": {
          "account_number": "123456789",
          "routing_number": "021000021",
          "bank_account_type": "checking",
          "bank_account_holder_type": "business",
          "owner_business_name": "Acme Corp",
          "owner_address": {
            "line1": "123 Main St",
            "city": "New York",
            "state": "NY",
            "postal_code": "10001",
            "country": "US"
          }
        }
      }'
    ```
  </Tab>

  <Tab title="USD (ACH)">
    **Payment rail:** `usd_ach`

    Same fields as Wire. Uses the `usd_ach` field instead of `usd_domestic_wire`:

    ```bash theme={"system"}
    curl -X POST https://api.onconsul.com/v1/bank_accounts \
      -H "Authorization: Basic base64($CONSUL_API_KEY)" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Acme Corp ACH",
        "currency": "USD",
        "payment_rail": "usd_ach",
        "usd_ach": {
          "account_number": "123456789",
          "routing_number": "021000021",
          "bank_account_type": "checking",
          "bank_account_holder_type": "business",
          "owner_business_name": "Acme Corp",
          "owner_address": {
            "line1": "123 Main St",
            "city": "New York",
            "state": "NY",
            "postal_code": "10001",
            "country": "US"
          }
        }
      }'
    ```
  </Tab>

  <Tab title="BRL (PIX)">
    **Payment rail:** `brl_pix`

    | Field     | Required | Description                                      |
    | --------- | -------- | ------------------------------------------------ |
    | `pix_key` | Yes      | PIX key (CPF, CNPJ, email, phone, or random key) |

    ```bash theme={"system"}
    curl -X POST https://api.onconsul.com/v1/bank_accounts \
      -H "Authorization: Basic base64($CONSUL_API_KEY)" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "BRL PIX Account",
        "currency": "BRL",
        "payment_rail": "brl_pix",
        "brl_pix": {
          "pix_key": "12345678901"
        }
      }'
    ```
  </Tab>

  <Tab title="ARS (Transfers 3.0)">
    **Payment rail:** `ars_transfers_3_0`

    | Field              | Required | Description                  |
    | ------------------ | -------- | ---------------------------- |
    | `beneficiary_name` | Yes      | Name of the account holder   |
    | `account_type`     | Yes      | `cvu`, `cbu`, or `alias`     |
    | `account_value`    | Yes      | The CVU, CBU, or alias value |

    ```bash theme={"system"}
    curl -X POST https://api.onconsul.com/v1/bank_accounts \
      -H "Authorization: Basic base64($CONSUL_API_KEY)" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "ARS Account",
        "currency": "ARS",
        "payment_rail": "ars_transfers_3_0",
        "ars_transfers": {
          "beneficiary_name": "Juan Pérez",
          "account_type": "cvu",
          "account_value": "0000003100099632680016"
        }
      }'
    ```
  </Tab>

  <Tab title="MXN (SPEI)">
    **Payment rail:** `mxn_spei`

    | Field              | Required | Description                |
    | ------------------ | -------- | -------------------------- |
    | `beneficiary_name` | Yes      | Name of the account holder |
    | `spei_clabe`       | Yes      | 18-digit CLABE number      |

    ```bash theme={"system"}
    curl -X POST https://api.onconsul.com/v1/bank_accounts \
      -H "Authorization: Basic base64($CONSUL_API_KEY)" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "MXN SPEI Account",
        "currency": "MXN",
        "payment_rail": "mxn_spei",
        "mxn_spei": {
          "beneficiary_name": "María García",
          "spei_clabe": "012345678901234567"
        }
      }'
    ```
  </Tab>

  <Tab title="COP (PSE)">
    **Payment rail:** `cop_pse`

    | Field                    | Required | Description                         |
    | ------------------------ | -------- | ----------------------------------- |
    | `beneficiary_first_name` | Yes      | First name                          |
    | `beneficiary_last_name`  | Yes      | Last name                           |
    | `document_type`          | Yes      | `cc`, `ce`, `nit`, `pass`, or `pep` |
    | `document_id`            | Yes      | Document number                     |
    | `email`                  | Yes      | Contact email                       |
    | `bank_code`              | Yes      | Colombian bank code                 |
    | `bank_account`           | Yes      | Bank account number                 |
    | `account_type`           | Yes      | `checking` or `savings`             |

    ```bash theme={"system"}
    curl -X POST https://api.onconsul.com/v1/bank_accounts \
      -H "Authorization: Basic base64($CONSUL_API_KEY)" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "COP PSE Account",
        "currency": "COP",
        "payment_rail": "cop_pse",
        "cop_ach": {
          "beneficiary_first_name": "Carlos",
          "beneficiary_last_name": "Rodríguez",
          "document_type": "cc",
          "document_id": "1234567890",
          "email": "carlos@example.com",
          "bank_code": "007",
          "bank_account": "12345678901234",
          "account_type": "checking"
        }
      }'
    ```
  </Tab>
</Tabs>
