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

# Create an external account

> Create a new external bank account for a counter party. External accounts represent
beneficiary bank accounts where funds can be sent during offramp transfers.

The required fields depend on the combination of `bankAddress.country`, `currency`,
and `transferType`. Only supported combinations are accepted; unsupported combinations
return a validation error. The counter party must be active.




## OpenAPI

````yaml https://production.hifi.com/api/v3/openapi.json post /v3/users/{userId}/counter-parties/{counterPartyId}/external-accounts
openapi: 3.0.0
info:
  title: Hifi API
  version: 3.0.0
  description: API documentation for HIFI
servers:
  - url: https://production.hifi.com
    description: Production server
  - url: https://sandbox.hifi.com
    description: Sandbox server
security:
  - bearerAuth: []
tags:
  - name: Common
    description: Common endpoints
  - name: User
    description: User endpoints
  - name: Counter Party
    description: Counter party endpoints
  - name: Crypto Transfer
    description: Crypto transfer and batch transfer endpoints
  - name: Wallet
    description: Wallet and wallet offer endpoints
  - name: External Account
    description: External bank account endpoints (under a counter party)
  - name: External Wallet
    description: External wallet endpoints (under a counter party)
  - name: External Card
    description: External card endpoints (under a counter party)
  - name: Token Swap
    description: Token swap endpoints
  - name: Bridge
    description: Bridge endpoints
  - name: Virtual Account
    description: Virtual account endpoints
  - name: Compliance
    description: Compliance and compliance link endpoints
  - name: Webhook Endpoint
    description: Webhook endpoint endpoints
  - name: File
    description: File upload endpoints
  - name: Onramp
    description: Onramp (fiat to crypto) endpoints
  - name: Offramp
    description: Offramp (crypto to fiat) endpoints
  - name: Orchestration Address
    description: Orchestration (liquidation) address endpoints
  - name: KYC Link
    description: Hosted and custom KYC/KYB link endpoints
  - name: Transfer Approval
    description: Transfer approval endpoints
  - name: Corridor
    description: Supported fiat/crypto transfer corridor endpoints
  - name: Migration
    description: v2-to-v3 ID mapping endpoints
paths:
  /v3/users/{userId}/counter-parties/{counterPartyId}/external-accounts:
    post:
      tags:
        - External Account
      summary: Create an external account
      description: >
        Create a new external bank account for a counter party. External
        accounts represent

        beneficiary bank accounts where funds can be sent during offramp
        transfers.


        The required fields depend on the combination of `bankAddress.country`,
        `currency`,

        and `transferType`. Only supported combinations are accepted;
        unsupported combinations

        return a validation error. The counter party must be active.
      operationId: v3CreateExternalAccount
      parameters:
        - $ref: '#/components/parameters/UserIdPathParameter'
        - $ref: '#/components/parameters/CounterPartyIdPathParameter'
      requestBody:
        $ref: '#/components/requestBodies/CreateExternalAccountBody'
      responses:
        '200':
          $ref: '#/components/responses/CreateExternalAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '409':
          $ref: '#/components/responses/ConflictResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
components:
  parameters:
    UserIdPathParameter:
      name: userId
      in: path
      schema:
        type: string
        pattern: ^user_[A-Za-z0-9]+$
      description: ID of the user.
      required: true
    CounterPartyIdPathParameter:
      name: counterPartyId
      in: path
      required: true
      schema:
        type: string
      description: Public ID of the counter party (prefixed with `cpty_`)
      example: cpty_7bV1aLcs3Kf9dQ2mNpXwZ
  requestBodies:
    CreateExternalAccountBody:
      required: true
      description: >
        External account details. The required fields depend on the combination
        of

        `bankAddress.country`, `currency`, and `transferType`. Only the
        combinations

        below are accepted; each row lists the rail-specific fields required in

        addition to `currency`, `transferType`, and `bankAddress`.


        | Transfer type | Currency | Country | Rail-specific required fields |

        |---|---|---|---|

        | ACH | USD | US | accountNumber, routingNumber, accountType, bankName |

        | WIRE | USD | US | accountNumber, routingNumber, accountType, bankName
        |

        | RTP | USD | US | accountNumber, routingNumber, accountType, bankName |

        | SEPA | EUR | EUR-zone | iban, swiftCode, bankName |

        | SWIFT | USD | 58 countries (listed below) | swiftCode, accountNumber,
        bankName |

        | SWIFT | USD | Indonesia (own field set) | accountNumber, swiftCode,
        bankName |

        | PIX | BRL | Brazil | exactly one of: pixKey (EVP), email, phoneNumber,
        cpf, cnpj (bankName not accepted) |

        | SPEI | MXN | Mexico | clabe, bankName |

        | CIPS | CNY | China | accountNumber, bankName |

        | CHATS | HKD | Hong Kong | accountNumber, bankCode, swiftCode, bankName
        |

        | FPS | HKD | Hong Kong | accountNumber, fpsId, bankName |

        | BANK | COP | Colombia | phoneNumber, bankName, accountType |

        | NEQUI | COP | Colombia | phoneNumber, bankName |

        | BANK | NGN | Nigeria | accountNumber, bankName |

        | INSTAPAY | PHP | Philippines | accountNumber, bankName |

        | PESONET | PHP | Philippines | accountNumber, bankName |

        | BANK | SGD | Singapore | accountNumber, swiftCode, bankName |

        | BANK | AED | United Arab Emirates (local) | iban, swiftCode, bankName
        |


        SWIFT (USD) supported `bankAddress.country` (ISO 3166-1 alpha-3): ARE,
        ARG, AUS, AUT,

        BEL, BRA, BGR, CAN, CHL, CHN, COL, HRV, CYP, CZE, DNK, EST, USA, FIN,
        FRA, DEU,

        GRC, HKG, HUN, ISL, IRL, ISR, IND, ITA, JPN, KEN, LVA, LIE, LTU, LUX,
        MAC, MLT, MEX, NLD,

        NZL, NGA, NOR, PAN, PHL, POL, PRT, ROU, SAU, SRB, SGP, SVK, SVN, ZAF,
        KOR, ESP,

        SWE, TWN, THA, TUR, GBR. Indonesia (IDN) uses a SWIFT variant with its
        own fields.

        United Arab Emirates also has a local AED rail (BANK, see above).
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/ExternalAccountCreateACH'
              - $ref: '#/components/schemas/ExternalAccountCreateWire'
              - $ref: '#/components/schemas/ExternalAccountCreateRTP'
              - $ref: '#/components/schemas/ExternalAccountCreateSEPA'
              - $ref: '#/components/schemas/ExternalAccountCreateSWIFT'
              - $ref: '#/components/schemas/ExternalAccountCreatePIX'
              - $ref: '#/components/schemas/ExternalAccountCreateSPEI'
              - $ref: '#/components/schemas/ExternalAccountCreateCIPS'
              - $ref: '#/components/schemas/ExternalAccountCreateCHATS'
              - $ref: '#/components/schemas/ExternalAccountCreateFPS'
              - $ref: '#/components/schemas/ExternalAccountCreateIDNSwift'
              - $ref: '#/components/schemas/ExternalAccountCreateColombiaBank'
              - $ref: '#/components/schemas/ExternalAccountCreateNequi'
              - $ref: '#/components/schemas/ExternalAccountCreateNigeriaBank'
              - $ref: '#/components/schemas/ExternalAccountCreateInstaPay'
              - $ref: '#/components/schemas/ExternalAccountCreatePESONet'
              - $ref: '#/components/schemas/ExternalAccountCreateSingaporeBank'
              - $ref: '#/components/schemas/ExternalAccountCreateUAEBank'
          examples:
            ACHExample:
              summary: ACH account (US)
              value:
                transferType: ACH
                currency: USD
                accountNumber: '123456789'
                routingNumber: '021000021'
                accountType: CHECKING
                bankName: Chase Bank
                bankAddress:
                  addressLine1: 123 Main Street
                  city: New York
                  stateProvinceRegion: NY
                  postalCode: '10001'
                  country: USA
            WireExample:
              summary: Domestic wire account (US)
              value:
                transferType: WIRE
                currency: USD
                accountNumber: '123456789'
                routingNumber: '021000021'
                accountType: CHECKING
                bankName: Bank of America
                bankAddress:
                  addressLine1: 123 Main Street
                  city: New York
                  stateProvinceRegion: NY
                  postalCode: '10001'
                  country: USA
            SEPAExample:
              summary: SEPA account (Germany)
              value:
                transferType: SEPA
                currency: EUR
                iban: DE91100000000123456789
                swiftCode: DEUTDEFF
                bankName: Deutsche Bank
                bankAddress:
                  addressLine1: Taunusanlage 12
                  city: Frankfurt
                  stateProvinceRegion: HE
                  postalCode: '60325'
                  country: DEU
            SWIFTExample:
              summary: SWIFT account (Brazil, USD)
              value:
                transferType: SWIFT
                currency: USD
                swiftCode: BRASBRRJXXX
                accountNumber: '123456789'
                bankName: Banco do Brasil
                bankAddress:
                  addressLine1: Rua Example 123
                  city: Sao Paulo
                  stateProvinceRegion: SP
                  postalCode: '01310100'
                  country: BRA
            PIXCPFExample:
              summary: PIX account (Brazil, CPF key)
              value:
                transferType: PIX
                currency: BRL
                cpf: '12345678901'
                bankAddress:
                  addressLine1: Rua Example 123
                  city: Sao Paulo
                  stateProvinceRegion: SP
                  postalCode: '01310100'
                  country: BRA
            PIXEVPExample:
              summary: PIX account (Brazil, EVP random key)
              value:
                transferType: PIX
                currency: BRL
                pixKey: 123e4567-e89b-12d3-a456-426614174000
                bankAddress:
                  addressLine1: Rua Example 123
                  city: Sao Paulo
                  stateProvinceRegion: SP
                  postalCode: '01310100'
                  country: BRA
            SPEIExample:
              summary: SPEI account (Mexico)
              value:
                transferType: SPEI
                currency: MXN
                clabe: '032180000118359719'
                bankName: BBVA Mexico
                bankAddress:
                  addressLine1: Av. Paseo 123
                  city: Mexico City
                  stateProvinceRegion: CMX
                  postalCode: '01000'
                  country: MEX
            NigeriaBankExample:
              summary: Bank account (Nigeria)
              value:
                transferType: BANK
                currency: NGN
                accountNumber: '0123456789'
                bankName: Access Bank
                bankAddress:
                  addressLine1: 1 Bank Road
                  city: Lagos
                  stateProvinceRegion: LA
                  postalCode: '100001'
                  country: NGA
            UAEBankExample:
              summary: Local bank account (United Arab Emirates, AED)
              value:
                transferType: BANK
                currency: AED
                iban: AE070331234567890123456
                swiftCode: EBILAEAD
                bankName: Emirates NBD
                bankAddress:
                  addressLine1: Sheikh Zayed Road
                  city: Dubai
                  stateProvinceRegion: DU
                  postalCode: '00000'
                  country: ARE
  responses:
    CreateExternalAccountResponse:
      description: External account created successfully.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ExternalAccountObject'
          example:
            id: extacct_9aB0xY4mNpXwZ7bV1aLdt
            userId: usr_3Kf9dQ2mNpXwZ7bV1aLcs
            counterPartyId: cpty_7dLpR2mNpXwZ7bV1aQz3x
            accountNumber: '****6789'
            routingNumber: '021000021'
            accountType: CHECKING
            bankName: Chase Bank
            bankAddress:
              addressLine1: 123 Main Street
              city: New York
              stateProvinceRegion: NY
              postalCode: '10001'
              country: USA
            currency: USD
            transferType: ACH
            status: ACTIVE
            createdAt: '2026-07-01T10:30:00.000Z'
            updatedAt: '2026-07-01T10:30:00.000Z'
    BadRequestResponse:
      description: Bad Request — the request was malformed or failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            type: VALIDATION_ERROR
            message: One or more fields are invalid or missing.
            fields:
              - code: invalid_value
                message: Must be a valid email address
                field: email
    UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    ConflictResponse:
      description: >-
        Conflict — the request collides with the current state of the resource
        (e.g. idempotency-key reuse with a different payload).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            type: RESOURCE_CONFLICT
            message: Resource already exists or conflicts with current state
    InternalServerErrorResponse:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
  schemas:
    ExternalAccountCreateACH:
      type: object
      description: ACH account (US, USD).
      required:
        - transferType
        - currency
        - accountNumber
        - routingNumber
        - accountType
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - ACH
          example: ACH
        currency:
          type: string
          enum:
            - USD
          example: USD
        accountNumber:
          type: string
          minLength: 1
          description: Bank account number.
          example: '123456789'
        routingNumber:
          type: string
          minLength: 9
          maxLength: 9
          description: ABA routing number (exactly 9 digits).
          example: '021000021'
        accountType:
          type: string
          enum:
            - CHECKING
            - SAVINGS
          example: CHECKING
        bankName:
          type: string
          example: Chase Bank
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateWire:
      type: object
      description: Domestic wire account (US, USD).
      required:
        - transferType
        - currency
        - accountNumber
        - routingNumber
        - accountType
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - WIRE
          example: WIRE
        currency:
          type: string
          enum:
            - USD
          example: USD
        accountNumber:
          type: string
          minLength: 1
          example: '123456789'
        routingNumber:
          type: string
          minLength: 9
          maxLength: 9
          example: '021000021'
        accountType:
          type: string
          enum:
            - CHECKING
            - SAVINGS
          example: CHECKING
        bankName:
          type: string
          example: Bank of America
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateRTP:
      type: object
      description: Real-time payments account (US, USD).
      required:
        - transferType
        - currency
        - accountNumber
        - routingNumber
        - accountType
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - RTP
          example: RTP
        currency:
          type: string
          enum:
            - USD
          example: USD
        accountNumber:
          type: string
          minLength: 1
          example: '123456789'
        routingNumber:
          type: string
          minLength: 9
          maxLength: 9
          example: '021000021'
        accountType:
          type: string
          enum:
            - CHECKING
            - SAVINGS
          example: CHECKING
        bankName:
          type: string
          example: Chase Bank
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateSEPA:
      type: object
      description: SEPA account (EUR-zone country, EUR).
      required:
        - transferType
        - currency
        - iban
        - swiftCode
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - SEPA
          example: SEPA
        currency:
          type: string
          enum:
            - EUR
          example: EUR
        iban:
          type: string
          minLength: 1
          description: International Bank Account Number.
          example: DE91100000000123456789
        swiftCode:
          type: string
          description: SWIFT/BIC code (8 or 11 characters).
          example: DEUTDEFF
        bankName:
          type: string
          example: Deutsche Bank
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateSWIFT:
      type: object
      description: >-
        International SWIFT account. Supported in many countries; currency
        defaults to USD.
      required:
        - transferType
        - currency
        - swiftCode
        - accountNumber
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - SWIFT
          example: SWIFT
        currency:
          type: string
          enum:
            - USD
          example: USD
        swiftCode:
          type: string
          description: SWIFT/BIC code (8 or 11 characters).
          example: BRASBRRJXXX
        accountNumber:
          type: string
          minLength: 1
          example: '123456789'
        accountType:
          type: string
          enum:
            - CHECKING
            - SAVINGS
          description: Optional for SWIFT.
          example: CHECKING
        bankName:
          type: string
          example: Banco do Brasil
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreatePIX:
      type: object
      description: >
        PIX account (Brazil, BRL). Exactly one of `pixKey`, `email`,
        `phoneNumber`,

        `cpf`, or `cnpj` must be provided to identify the PIX key. `bankName` is
        not

        accepted for this rail.
      required:
        - transferType
        - currency
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - PIX
          example: PIX
        currency:
          type: string
          enum:
            - BRL
          example: BRL
        pixKey:
          type: string
          description: >-
            PIX key, EVP (random key) format only, e.g.
            `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`.
          example: 123e4567-e89b-12d3-a456-426614174000
        email:
          type: string
          description: PIX key, email format.
          example: jane.doe@example.com
        phoneNumber:
          type: string
          description: PIX key, Brazilian phone number in `+55` E.164 format.
          example: '+5511987654321'
        cpf:
          type: string
          description: PIX key, CPF (individual taxpayer ID, 11 digits).
          example: '12345678901'
        cnpj:
          type: string
          description: PIX key, CNPJ (business taxpayer ID, 14 digits).
          example: '12345678901234'
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateSPEI:
      type: object
      description: SPEI account (Mexico, MXN).
      required:
        - transferType
        - currency
        - clabe
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - SPEI
          example: SPEI
        currency:
          type: string
          enum:
            - MXN
          example: MXN
        clabe:
          type: string
          minLength: 18
          maxLength: 18
          description: CLABE number (exactly 18 digits).
          example: '032180000118359719'
        bankName:
          type: string
          example: BBVA Mexico
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateCIPS:
      type: object
      description: CIPS account (China, CNY).
      required:
        - transferType
        - currency
        - accountNumber
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - CIPS
          example: CIPS
        currency:
          type: string
          enum:
            - CNY
          example: CNY
        accountNumber:
          type: string
          minLength: 1
          example: '6222021234567890123'
        bankName:
          type: string
          example: Industrial and Commercial Bank of China
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateCHATS:
      type: object
      description: CHATS account (Hong Kong, HKD).
      required:
        - transferType
        - currency
        - accountNumber
        - bankCode
        - swiftCode
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - CHATS
          example: CHATS
        currency:
          type: string
          enum:
            - HKD
          example: HKD
        accountNumber:
          type: string
          minLength: 1
          example: '123456789'
        bankCode:
          type: string
          minLength: 1
          example: '004'
        swiftCode:
          type: string
          description: SWIFT/BIC code (8 or 11 characters).
          example: HSBCHKHHHKH
        bankName:
          type: string
          example: HSBC
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateFPS:
      type: object
      description: FPS account (Hong Kong, HKD).
      required:
        - transferType
        - currency
        - accountNumber
        - fpsId
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - FPS
          example: FPS
        currency:
          type: string
          enum:
            - HKD
          example: HKD
        accountNumber:
          type: string
          minLength: 1
          example: '123456789'
        fpsId:
          type: string
          minLength: 1
          description: Faster Payment System identifier.
          example: '123456789'
        bankName:
          type: string
          example: HSBC
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateIDNSwift:
      type: object
      description: SWIFT account (Indonesia, USD).
      required:
        - transferType
        - currency
        - accountNumber
        - swiftCode
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - SWIFT
          example: SWIFT
        currency:
          type: string
          enum:
            - USD
          example: USD
        accountNumber:
          type: string
          minLength: 1
          example: '123456789'
        swiftCode:
          type: string
          description: SWIFT/BIC code (8 or 11 characters).
          example: BMRIIDJAXXX
        bankName:
          type: string
          description: Must be one of the supported Indonesian bank names.
          example: Bank Mandiri
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateColombiaBank:
      type: object
      description: Bank transfer account (Colombia, COP).
      required:
        - transferType
        - currency
        - phoneNumber
        - bankName
        - accountType
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - BANK
          example: BANK
        currency:
          type: string
          enum:
            - COP
          example: COP
        phoneNumber:
          type: string
          description: Phone number in E.164 format.
          example: '+573001234567'
        bankName:
          type: string
          description: Must be one of the supported Colombian bank names.
          example: BANCOLOMBIA
        accountType:
          type: string
          enum:
            - CHECKING
            - SAVINGS
          example: SAVINGS
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateNequi:
      type: object
      description: Nequi account (Colombia, COP).
      required:
        - transferType
        - currency
        - phoneNumber
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - NEQUI
          example: NEQUI
        currency:
          type: string
          enum:
            - COP
          example: COP
        phoneNumber:
          type: string
          description: Phone number in E.164 format.
          example: '+573001234567'
        bankName:
          type: string
          example: NEQUI
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateNigeriaBank:
      type: object
      description: Bank transfer account (Nigeria, NGN).
      required:
        - transferType
        - currency
        - accountNumber
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - BANK
          example: BANK
        currency:
          type: string
          enum:
            - NGN
          example: NGN
        accountNumber:
          type: string
          minLength: 1
          example: '0123456789'
        bankName:
          type: string
          description: Must be one of the supported Nigerian bank names.
          example: Access Bank
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateInstaPay:
      type: object
      description: InstaPay account (Philippines, PHP).
      required:
        - transferType
        - currency
        - accountNumber
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - INSTAPAY
          example: INSTAPAY
        currency:
          type: string
          enum:
            - PHP
          example: PHP
        accountNumber:
          type: string
          minLength: 1
          example: '123456789'
        bankName:
          type: string
          description: Must be one of the supported Philippine InstaPay bank names.
          example: BPI
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreatePESONet:
      type: object
      description: PESONet account (Philippines, PHP).
      required:
        - transferType
        - currency
        - accountNumber
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - PESONET
          example: PESONET
        currency:
          type: string
          enum:
            - PHP
          example: PHP
        accountNumber:
          type: string
          minLength: 1
          example: '123456789'
        bankName:
          type: string
          description: Must be one of the supported Philippine PESONet bank names.
          example: BPI
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateSingaporeBank:
      type: object
      description: Bank transfer account (Singapore, SGD).
      required:
        - transferType
        - currency
        - accountNumber
        - swiftCode
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - BANK
          example: BANK
        currency:
          type: string
          enum:
            - SGD
          example: SGD
        accountNumber:
          type: string
          minLength: 1
          example: '123456789'
        swiftCode:
          type: string
          description: SWIFT/BIC code (8 or 11 characters).
          example: DBSSSGSGXXX
        bankName:
          type: string
          example: DBS Bank
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountCreateUAEBank:
      type: object
      description: >-
        Local bank transfer account (United Arab Emirates, AED). For USD/SWIFT
        to the UAE, use the SWIFT rail instead.
      required:
        - transferType
        - currency
        - iban
        - swiftCode
        - bankName
        - bankAddress
      properties:
        transferType:
          type: string
          enum:
            - BANK
          example: BANK
        currency:
          type: string
          enum:
            - AED
          example: AED
        iban:
          type: string
          minLength: 1
          description: International Bank Account Number.
          example: AE070331234567890123456
        swiftCode:
          type: string
          description: SWIFT/BIC code (8 or 11 characters).
          example: EBILAEAD
        bankName:
          type: string
          example: Emirates NBD
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
    ExternalAccountObject:
      type: object
      description: An external account.
      properties:
        id:
          type: string
          description: Public ID of the external account (prefixed with `extacct_`).
          example: extacct_9aB0xY4mNpXwZ7bV1aLdt
        userId:
          type: string
          description: >-
            Public ID of the user this account belongs to (prefixed with
            `usr_`).
          example: usr_3Kf9dQ2mNpXwZ7bV1aLcs
        counterPartyId:
          type: string
          description: >-
            Public ID of the counter party this account belongs to (prefixed
            with `cpty_`).
          example: cpty_7dLpR2mNpXwZ7bV1aQz3x
        accountNumber:
          type: string
          description: Masked bank account number.
          example: '****6789'
        routingNumber:
          type: string
          description: ABA routing number.
          example: '021000021'
        accountType:
          type: string
          enum:
            - CHECKING
            - SAVINGS
          example: CHECKING
        iban:
          type: string
          description: Masked IBAN.
          example: '****6789'
        swiftCode:
          type: string
          description: SWIFT/BIC code.
          example: DEUTDEFF
        sortCode:
          type: string
          description: Sort code.
          example: '123456'
        pixKey:
          type: string
          description: Masked PIX key (EVP format).
          example: '****4000'
        phoneNumber:
          type: string
          description: Masked phone number.
          example: +57*****4567
        email:
          type: string
          description: Masked email (PIX key, Brazil only).
          example: j***e@e*****e.com
        cpf:
          type: string
          description: Masked CPF (PIX key, Brazil only).
          example: '****8901'
        cnpj:
          type: string
          description: Masked CNPJ (PIX key, Brazil only).
          example: '****1234'
        bankName:
          type: string
          example: Chase Bank
        bankAddress:
          $ref: '#/components/schemas/ExternalAccountBankAddress'
        currency:
          type: string
          enum:
            - USD
            - EUR
            - BRL
            - NGN
            - KES
            - TZS
            - UGX
            - BWP
            - XAF
            - MWK
            - RWF
            - ZMW
            - XOF
            - ZAR
            - MXN
            - PHP
            - AED
            - HKD
            - CNY
            - COP
            - ARS
            - SGD
            - GBP
          example: USD
        transferType:
          type: string
          enum:
            - ACH
            - WIRE
            - SWIFT
            - RTP
            - PIX
            - SPEI
            - CHATS
            - FPS
            - CIPS
            - SEPA
            - INSTAPAY
            - PESONET
            - NEQUI
            - BANK
          example: ACH
        fpsId:
          type: string
          description: Masked Faster Payment System identifier.
          example: '****6789'
        clabe:
          type: string
          description: Masked CLABE number.
          example: '****9719'
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          example: ACTIVE
        createdAt:
          type: string
          format: date-time
          example: '2026-07-01T10:30:00.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-07-01T10:30:00.000Z'
    ApiError:
      type: object
      description: >-
        Standard v3 error shape, returned by validation failures and
        business-logic errors alike.
      properties:
        type:
          type: string
          description: >-
            Machine-readable error type, e.g. VALIDATION_ERROR,
            ACTION_NOT_ALLOWED, RESOURCE_CONFLICT.
          example: VALIDATION_ERROR
        message:
          type: string
          description: Human-readable error message.
          example: One or more fields are invalid or missing.
        fields:
          type: array
          description: >-
            Present on field-level validation errors. One entry per problem
            field.
          items:
            type: object
            properties:
              code:
                type: string
                description: Error code related to the field issue.
              message:
                type: string
                description: Error message for the specific issue.
              field:
                type: string
                description: The name of the field that has an issue.
    Unauthorized:
      type: object
      properties:
        type:
          type: string
          description: Unauthorized enum
          example: UNAUTHORIZED
        message:
          type: string
          description: Unauthorized message
          example: Authentication required
    InternalServerError:
      type: object
      properties:
        type:
          type: string
          example: INTERNAL_SERVER_ERROR
          description: Internal server error enum
        message:
          type: string
          example: An internal server error occurred
          description: Internal server error message
    ExternalAccountBankAddress:
      type: object
      description: Address of the beneficiary bank.
      required:
        - addressLine1
        - city
        - stateProvinceRegion
        - postalCode
        - country
      properties:
        addressLine1:
          type: string
          description: Primary address line.
          example: 123 Main Street
        addressLine2:
          type: string
          description: Secondary address line (apartment, suite, etc.).
          example: Suite 100
        city:
          type: string
          description: City name.
          example: New York
        stateProvinceRegion:
          type: string
          maxLength: 10
          description: State, province, or region.
          example: NY
        postalCode:
          type: string
          description: Postal or ZIP code.
          example: '10001'
        country:
          type: string
          description: ISO 3166-1 alpha-3 country code.
          example: USA
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````