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

# Validate Bank Account

> Validates a bank account number format for a given country and bank code. Returns validation status, bank information, and whether the country is supported.

Validates a bank account by checking the account number format, bank code, and country support. Returns validation status and bank information.


## OpenAPI

````yaml POST /api/v3/customer/validate/bank
openapi: 3.0.0
info:
  title: KOTANI PAY API PLATFORM
  description: ''
  version: '3.0'
  contact: {}
servers:
  - url: https://preview.kotanipay.com
security: []
tags: []
paths:
  /api/v3/customer/validate/bank:
    post:
      tags:
        - CUSTOMER - VALIDATION
      summary: Validate bank account
      description: >-
        Validates a bank account number format for a given country and bank
        code. Returns validation status, bank information, and whether the
        country is supported.
      operationId: AccountValidationController_validateBankAccount_api/v3
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateBankAccountDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Bank account validated successfully.
                  data:
                    $ref: '#/components/schemas/ValidateAccountResponseDto'
                    type: object
        '400':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Invalid request
                  data:
                    type: object
                    example: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Unauthorized
                  data:
                    type: object
                    example: {}
      security:
        - JWT: []
components:
  schemas:
    ValidateBankAccountDto:
      type: object
      properties:
        accountNumber:
          type: string
          description: Bank account number
          example: '1234567890'
        bankCode:
          type: string
          description: Bank code or name
          example: KCB
        countryCode:
          type: string
          description: Country code
          example: KE
      required:
        - accountNumber
        - bankCode
        - countryCode
    ValidateAccountResponseDto:
      type: object
      properties:
        isValid:
          type: boolean
          description: Whether the phone number or account is valid
          example: true
        isSupported:
          type: boolean
          description: Whether the country/service is supported
          example: true
        requiresInternationalization:
          type: boolean
          description: >-
            Whether the phone number needs internationalization (missing country
            code)
          example: false
        countryCode:
          type: string
          description: Country code (ISO2)
          example: KE
        countryName:
          type: string
          description: Country name
          example: Kenya
        callingCode:
          type: string
          description: Phone number calling code (e.g., +254)
        internationalNumber:
          type: string
          description: >-
            Phone number in international format without spaces (e.g.,
            +254719399210)
          example: '+254719399210'
        nationalNumber:
          type: string
          description: Phone number in national format without spaces (e.g., 0719399210)
          example: '0719399210'
        accountType:
          type: string
          description: Account type
          enum:
            - mobile_money
            - bank
        bankName:
          type: string
          description: Bank name (for bank accounts)
        currency:
          type: string
          description: Currency for the country
          example: KES
        message:
          type: string
          description: Validation error message (if invalid)
      required:
        - isValid
        - isSupported
        - accountType
  securitySchemes:
    JWT:
      scheme: bearer
      bearerFormat: JWT
      type: http

````