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

# Create Bank Account

> Registers a bank account for a customer (or the authenticated account).
Use `GET /bankaccounts/validation` first to obtain the required fields for the given currency and country.




## OpenAPI

````yaml POST /bankaccounts
openapi: 3.1.0
info:
  title: Truust API
  version: '2.0'
  description: >
    The Truust API allows you to manage payment flows, orders, customers,
    wallets, and more.


    ## Authentication


    All authenticated endpoints require a Bearer token using your account's
    **Secret Key**.


    ```

    Authorization: Bearer {your_secret_key}

    ```


    Your API keys are available in the Dashboard under **Account Settings → API
    Developers**.
  contact:
    email: hello@truust.io
  license:
    name: Proprietary
servers:
  - url: https://{subdomain}.truust.io/2.0
    description: Production
    variables:
      subdomain:
        default: your-subdomain
        description: Your account subdomain
  - url: https://{subdomain}-sandbox.truust.io/2.0
    description: Sandbox
    variables:
      subdomain:
        default: your-subdomain
        description: Your account subdomain
security:
  - bearerAuth: []
tags:
  - name: Account
    description: Manage your Truust account
  - name: Customers
    description: Manage buyers and sellers (end users)
  - name: Orders
    description: Create and manage escrow payment orders
  - name: Payins
    description: Manage incoming payments for orders
  - name: Payouts
    description: Manage outgoing payments from orders
  - name: Wallets
    description: Manage customer and account wallets
  - name: Bank Accounts
    description: Manage bank accounts for payouts
  - name: Cards
    description: Manage tokenized payment cards
  - name: Subscriptions
    description: Manage recurring payment subscriptions
  - name: Verifications
    description: KYC verification for customers and accounts
  - name: Bundles
    description: Manage product bundles for orders
  - name: Refunds
    description: View refund records
paths:
  /bankaccounts:
    post:
      tags:
        - Bank Accounts
      summary: Create bank account
      description: >
        Registers a bank account for a customer (or the authenticated account).

        Use `GET /bankaccounts/validation` first to obtain the required fields
        for the given currency and country.
      operationId: createBankAccount
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - type
                - number
              example:
                customer_id: 7485
                name: My bank account
                type: IBAN
                number: ES1300812944953951475955
                bic: CAIXESBBXXX
              properties:
                customer_id:
                  type: integer
                  description: >-
                    Customer ID to assign the bank account to. Required unless
                    `customer_type` is `source`.
                  example: 7485
                customer_type:
                  type: string
                  enum:
                    - source
                  description: >-
                    Pass `source` to register a bank account for the
                    authenticated account instead of a customer.
                name:
                  type: string
                  maxLength: 255
                  description: Account holder name.
                  example: My bank account
                type:
                  type: string
                  description: >
                    Bank account type. `IBAN` for SEPA accounts, `BSB_ACCOUNT`
                    for Australian accounts,

                    `INTERNATIONAL` for SWIFT/BIC accounts, `CLEARJUNCTION` /
                    `CURRENCYCLOUD` for gateway-linked accounts,

                    `PA_CTE` / `PA_AHORRO` for Spanish payment accounts, and
                    `OTHER` / `CL_CTE` / `CL_VISTA` /

                    `CL_AHORRO` / `ZEPTO` for other formats.
                  enum:
                    - IBAN
                    - OTHER
                    - BSB_ACCOUNT
                    - PA_AHORRO
                    - PA_CTE
                    - CL_CTE
                    - CL_VISTA
                    - CL_AHORRO
                    - INTERNATIONAL
                    - ZEPTO
                    - CLEARJUNCTION
                    - CURRENCYCLOUD
                  example: IBAN
                number:
                  type: string
                  description: >-
                    Bank account number or IBAN. Must be a valid IBAN when
                    `type` is `IBAN`, `CLEARJUNCTION`, or `CURRENCYCLOUD`.
                  example: ES1300812944953951475955
                bic:
                  type: string
                  maxLength: 11
                  description: >-
                    BIC/SWIFT code. Required for `INTERNATIONAL` type.
                    Auto-populated from `bsb` for `BSB_ACCOUNT`.
                  example: CAIXESBBXXX
                bsb:
                  type: string
                  description: >-
                    6-digit BSB code (Australian bank routing number). Required
                    for `BSB_ACCOUNT` type.
                  example: '062000'
                cod_entidad:
                  type: string
                  description: >-
                    Entity code for Spanish payment accounts (`PA_CTE` /
                    `PA_AHORRO`). Auto-populated from `bic`.
                iban:
                  type: string
                  description: IBAN (alternative field to `number` for SEPA accounts).
                  example: ES9121000418450200051332
                tag:
                  type: string
                  maxLength: 100
                metadata:
                  type: object
                  additionalProperties: true
                  description: >-
                    Additional metadata. For `CLEARJUNCTION` and `CURRENCYCLOUD`
                    types the following beneficiary fields are required.
                  properties:
                    currency:
                      type: string
                      description: >-
                        3-letter ISO 4217 currency code. Required for
                        CLEARJUNCTION / CURRENCYCLOUD.
                      example: EUR
                    country:
                      type: string
                      description: >-
                        2-letter ISO 3166-1 country code. Required for
                        CLEARJUNCTION / CURRENCYCLOUD.
                      example: ES
                    beneficiary_entity_type:
                      type: string
                      enum:
                        - individual
                        - company
                      description: Required for CLEARJUNCTION / CURRENCYCLOUD.
                    beneficiary_company_name:
                      type: string
                      description: Required when `beneficiary_entity_type` is `company`.
                    beneficiary_first_name:
                      type: string
                      description: Required when `beneficiary_entity_type` is `individual`.
                    beneficiary_last_name:
                      type: string
                      description: Required when `beneficiary_entity_type` is `individual`.
                    beneficiary_address:
                      type: string
                      description: Required for CLEARJUNCTION / CURRENCYCLOUD.
                    beneficiary_city:
                      type: string
                      description: Required for CLEARJUNCTION / CURRENCYCLOUD.
                    beneficiary_postcode:
                      type: string
                    beneficiary_state:
                      type: string
                    beneficiary_country:
                      type: string
                      description: >-
                        2-letter country code. Required for CLEARJUNCTION /
                        CURRENCYCLOUD.
                    bank_account_type:
                      type: string
                      enum:
                        - checking
                        - savings
                    routing_code_type:
                      type: string
                    routing_code_value:
                      type: string
                    payment_types:
                      type: array
                      items:
                        type: string
      responses:
        '200':
          description: Bank account created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccount'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    BankAccount:
      type: object
      properties:
        id:
          type: integer
        self:
          type: string
        uuid:
          type: string
        type:
          type: string
          description: Account type (e.g. `IBAN`, `ACCOUNT`).
        name:
          type: string
          nullable: true
          description: Account holder name.
        number:
          type: string
          description: Masked account number or IBAN.
        bic:
          type: string
          nullable: true
        tag:
          type: string
          nullable: true
        metadata:
          type: object
          nullable: true
          additionalProperties: true
        created_at:
          type: string
          format: date-time
          nullable: true
        connections:
          $ref: '#/components/schemas/Connections'
    Connections:
      type: object
      description: Hypermedia links to related resources.
      additionalProperties:
        type: string
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: The given data was invalid.
              errors:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
                example:
                  name:
                    - The name field is required.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Use your account's **Secret Key** as the Bearer token.

````