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

# Convalidare un conto bancario

Evita le transazioni non riuscite convalidando il formato dei conti bancari in base alle regole specifiche di ogni paese. Questo endpoint garantisce l'accuratezza dei dati prima di avviare un bonifico.


## OpenAPI

````yaml openapi/it/localpayment.json POST /api/validation/bank
openapi: 3.1.0
info:
  version: '1.0'
  title: Localpayment
  contact:
    name: Support
    url: mailto:support@localpayment.com
servers:
  - url: https://api.stage.localpayment.com
    description: Stage
security:
  - token: []
paths:
  /api/validation/bank:
    post:
      summary: Convalidare un conto bancario
      operationId: validate-bank-account
      parameters:
        - name: Authorization
          in: header
          description: >-
            Token di accesso Bearer per l'autenticazione. Questo token si
            ottiene dagli endpoint [Ottenere il token di
            accesso](/it/reference/get-token) o [Rinnovare il token di
            accesso](/it/reference/refresh-token).
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                country:
                  type: string
                  enum:
                    - ARG
                    - BOL
                    - BRA
                    - CHL
                    - COL
                    - CRI
                    - DOM
                    - GTM
                    - HND
                    - MEX
                    - PAN
                    - PRY
                    - PER
                  description: >-
                    [Paese del documento](/it/docs/global-coverage). ISO 3166-1
                    alpha-3.
                bank:
                  type: object
                  description: Informazioni sulla banca.
                  properties:
                    code:
                      type: string
                      description: '[Codice della banca](/it/reference/get-bank-codes).'
                      examples:
                        - '000'
                    account:
                      type: object
                      description: Informazioni sul conto bancario da convalidare.
                      properties:
                        number:
                          type: string
                          description: Numero di conto bancario.
                        type:
                          type: string
                          enum:
                            - C
                            - S
                            - M
                            - V
                            - R
                            - D
                            - P
                          description: >-
                            [Tipo di conto
                            bancario](/it/reference/validate-bank-account).


                            * `C`: Conto corrente

                            * `S`: Conto di risparmio

                            * `M`: Conto master

                            * `V`: Conto VISA

                            * `R`: RUT

                            * `D`: Debito

                            * `P`: Telefono
                      required:
                        - number
                        - type
                    branch:
                      type: object
                      description: Obbligatorio solo per i conti bancari brasiliani.
                      properties:
                        code:
                          type: string
                          description: >-
                            Il formato del codice della filiale [dipende dalla
                            banca](/it/reference/get-bank-codes).
                  required:
                    - code
                    - account
              required:
                - country
                - bank
              x-examples:
                Example 1:
                  country: ARG
                  bank:
                    code: '426'
                    account:
                      number: '4260004000100091408081'
                      type: s
            examples:
              200 - Valid bank code and account number.:
                value:
                  country: ARG
                  bank:
                    code: '191'
                    account:
                      number: '1910119655111901676653'
                      type: S
              200 - Brazil bank account validation:
                value:
                  country: BRA
                  bank:
                    code: '341'
                    branch:
                      code: '6393'
                    account:
                      number: '217309'
                      type: S
              501 - Country not found.:
                value:
                  country: AR
                  bank:
                    code: '191'
                    account:
                      number: '1910119655111901676653'
                      type: s
              400 - Invalid bank account number.:
                value:
                  country: ARG
                  bank:
                    code: '191'
                    account:
                      number: '9910119655111901676653'
                      type: S
              701 - Bank code not found.:
                value:
                  country: ARG
                  bank:
                    code: '19'
                    account:
                      number: '1910119655111901676653'
                      type: S
              701 - InvalidAccountNumber does not exist.:
                value:
                  country: ARG
                  bank:
                    code: '191'
                    account:
                      type: S
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Codice di stato.
                  description:
                    type: string
                    description: Dettagli aggiuntivi della risposta.
              examples:
                200 - Valid bank code and account number.:
                  value:
                    code: '200'
                    description: Valid bank code and account number
        '400':
          description: Richiesta non valida.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Codice di stato.
                  description:
                    type: string
                    description: Dettagli aggiuntivi della risposta.
              examples:
                701 - Invalid bank branch code:
                  value:
                    code: '701'
                    description: Invalid bank branch code
        '401':
          description: Non autorizzato.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Informazioni aggiuntive della risposta.
                  code:
                    type: string
                    description: Codice di stato.
                  messages:
                    type: array
                    description: Elenco dei messaggi.
                    items:
                      type: object
                      properties:
                        token_class:
                          type: string
                          description: Classe del token.
                        token_type:
                          type: string
                          description: Tipo di token.
                        message:
                          type: string
                          description: Messaggio con informazioni aggiuntive.
                x-examples:
                  Example 1:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
              examples:
                401 - Token is invalid or expired:
                  value:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
        '501':
          description: Non implementato
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Codice di stato.
                  description:
                    type: string
                    description: Dettagli aggiuntivi della risposta.
              examples:
                501 - Country not found.:
                  value:
                    code: '501'
                    description: Country not found
      security:
        - token: []
      servers:
        - url: https://api.stage.localpayment.com
          description: Stage
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer

````

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