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

# Bank account validator

> Validates the correctness of beneficiary details, checks if the account exists in the bank, and confirms if it can receive funds.
The validations performed are:
1. The bank account, branch and type are valid.
2. The account exists in the bank.
3. The bank account belongs to the beneficiary details indicated (Document, name, etc).
4. The amount specified is within the minimum and maximum limits (optional, only performed if amount is sent).
5. The account can receive funds (it's not blocked, closed, etc).


## Validate a bank account

> Validates the correctness of beneficiary details, checks if the account exists in the bank, and confirms if it can receive funds.\
> The validations performed are:\
> 1\. The bank account, branch and type are valid.\
> 2\. The account exists in the bank.\
> 3\. The bank account belongs to the beneficiary details indicated (Document, name, etc).\
> 4\. The amount specified is within the minimum and maximum limits (optional, only performed if amount is sent).\\


## OpenAPI

````yaml open-api-yaml/cashouts-api/validate-bank-accounts/bank-account-validator.json POST /account/validate
openapi: 3.0.0
info:
  title: Bank Account Validation API
  version: 1.0.0
servers:
  - url: https://api-stg.pandablue.com/v5
    description: Staging Server
security: []
paths:
  /account/validate:
    post:
      summary: Validate a bank account
      description: >
        Validates the correctness of beneficiary details, checks if the account
        exists in the bank, and confirms if it can receive funds.

        The validations performed are:

        1. The bank account, branch and type are valid.

        2. The account exists in the bank.

        3. The bank account belongs to the beneficiary details indicated
        (Document, name, etc).

        4. The amount specified is within the minimum and maximum limits
        (optional, only performed if amount is sent).

        5. The account can receive funds (it's not blocked, closed, etc).
      operationId: validateBankAccount
      parameters:
        - name: X-Date
          in: header
          required: true
          description: ISO8601 Datetime with Timezone (yyyy-MM-dd'T'HH:mm:ssZ)
          schema:
            type: string
            format: date-time
        - name: X-Login
          in: header
          required: true
          description: Merchant X-Login Cashouts API Key
          schema:
            type: string
        - name: Authorization
          in: header
          required: true
          description: Authorization control hash
          schema:
            type: string
      requestBody:
        description: Details of the bank account to validate.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankAccountValidationRequest'
      responses:
        '204':
          description: No Content. The bank account is valid and passed all validations.
        '400':
          description: Bad Request. A validation error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized. Invalid credentials were provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    BankAccountValidationRequest:
      type: object
      properties:
        country:
          type: string
          description: Country of the bank account to validate (ISO 3166-1 alpha-2).
          maxLength: 2
        document:
          type: string
          description: Document of identity of the beneficiary.
          maxLength: 30
        document_type:
          type: string
          description: Type of the document specified.
          maxLength: 10
        first_name:
          type: string
          description: First name of the beneficiary.
          maxLength: 255
        last_name:
          type: string
          description: Last name of the beneficiary.
          maxLength: 255
        bank_account:
          $ref: '#/components/schemas/BankAccount'
        amount:
          type: number
          format: decimal
          description: Amount of the withdrawal.
        currency:
          type: string
          description: Currency of the amount (ISO 4217).
          maxLength: 3
      required:
        - country
        - document
        - document_type
        - bank_account
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: The error code.
        description:
          type: string
          description: A human-readable description of the error.
        type:
          type: string
          description: The type of the error.
    BankAccount:
      type: object
      properties:
        bank_code:
          type: number
          description: Code of the bank of the beneficiary.
        account:
          type: string
          description: Bank account of the beneficiary.
        branch:
          type: string
          description: Bank branch of the beneficiary.
        account_type:
          type: string
          description: Bank account type of the beneficiary.
      required:
        - account

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.