> For the complete documentation index, see [llms.txt](https://apidocs.onekeypayments.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.onekeypayments.com/api-reference/cashouts-api/validate-bank-accounts/bank-account-validator.md).

# Bank account validator

## 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).\
> 5\. The account can receive funds (it's not blocked, closed, etc).<br>

```json
{"openapi":"3.0.0","info":{"title":"Bank Account Validation API","version":"1.0.0"},"servers":[{"url":"https://api-stg.onekeypayments.com/v5","description":"Staging Server"}],"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.\nThe validations performed are:\n1. The bank account, branch and type are valid.\n2. The account exists in the bank.\n3. The bank account belongs to the beneficiary details indicated (Document, name, etc).\n4. The amount specified is within the minimum and maximum limits (optional, only performed if amount is sent).\n5. The account can receive funds (it's not blocked, closed, etc).\n","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"]},"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"]},"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."}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://apidocs.onekeypayments.com/api-reference/cashouts-api/validate-bank-accounts/bank-account-validator.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
