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

# Search for a bank account

> Looks up a single bank account by its on-chain address or its account number. Provide at least one of the two query parameters.

Resolves a single bank account, in either direction:

* **By `address`** — you saw a deposit land on an address and want to know which
  bank account it belongs to.
* **By `accountNumber`** — you have the account number and want the address that
  pays it.

Pass at least one of the two. Passing neither is a `400`; matching nothing is a
`404`.

<Note>
  This is a lookup, not a registration. An account that has never been through
  [`POST /pub/v2/bank-account`](/api-reference/register-bank-account) will not be
  found here, even if the account number is real.
</Note>


## OpenAPI

````yaml GET /pub/v2/bank-account
openapi: 3.0.0
info:
  title: Paj Public API
  description: >-
    Programmatic access to Paj's on/off ramp. Register a Nigerian bank account,

    get the on-chain address that pays it, and read the live conversion rates.


    Every request must carry an `x-api-key` header. Keys are scoped to a
    business,

    and the rates you receive already have that business's fee applied.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.paj.cash
    description: Production
security: []
tags: []
paths:
  /pub/v2/bank-account:
    get:
      tags:
        - Pub V2
      summary: Search for a bank account
      description: >-
        Looks up a single bank account by its on-chain address or its account
        number. Provide at least one of the two query parameters.
      operationId: PubV2Controller_searchBankAccount
      parameters:
        - name: address
          required: false
          in: query
          description: Bank account on-chain address
          schema:
            example: FsXpXq8wVTM13NDXxrf2X6PpgJWg9jCxRVuHhtfnojUa
            type: string
        - name: accountNumber
          required: false
          in: query
          description: User's bank account number
          schema:
            example: '0025635480'
            type: string
      responses:
        '200':
          description: The matching bank account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccountDto'
        '400':
          description: Neither an address nor an account number was provided
        '401':
          description: Missing or invalid API key (x-api-key header)
        '404':
          description: No bank account matched the query
      security:
        - x-api-key: []
components:
  schemas:
    BankAccountDto:
      type: object
      properties:
        id:
          type: string
          description: id
          example: someRANDOMid
        accountName:
          type: string
          description: User's bank acount name
          example: John Doe
        accountNumber:
          type: string
          description: User's bank account number
          example: '0025635480'
        bank:
          type: string
          description: Bank name
          example: First Bank
        address:
          type: string
          description: Bank Account Address
          example: FsXpXq8wVTM13NDXxrf2X6PpgJWg9jCxRVuHhtfnojUa
      required:
        - id
        - accountName
        - accountNumber
        - bank
        - address
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````