> ## 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.

# Register a bank account

> Registers a bank account for the API key’s business using a bank code and account number. The account is confirmed with the provider and an on-chain address is assigned. If the account already exists it is returned as-is.

Registration does three things in one call: it confirms the account number with
the bank, stores the account against your business, and derives the on-chain
address that pays it.

The call is idempotent per bank account. If the same bank code and account
number have already been registered — by you or by anyone else on Paj — the
existing record is returned unchanged, with the same `address`. There is no
error and no duplicate.

<Warning>
  Confirmation is a live call to the banking rail, so this endpoint is slower
  than the other two. Register accounts ahead of time rather than in a hot path
  like a checkout screen.
</Warning>

Use the returned `accountName` — it comes from the bank, not from your input —
to let the user confirm they typed the right account number before you show them
an address to pay.

See [Bank account addresses](/concepts/bank-account-addresses) for what happens
once funds reach the address.


## OpenAPI

````yaml POST /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:
    post:
      tags:
        - Pub V2
      summary: Register a bank account
      description: >-
        Registers a bank account for the API key’s business using a bank code
        and account number. The account is confirmed with the provider and an
        on-chain address is assigned. If the account already exists it is
        returned as-is.
      operationId: PubV2Controller_registerBankAccount
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterBankAccountDto'
      responses:
        '201':
          description: The registered bank account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccountDto'
        '400':
          description: Unknown bank code, or the account number could not be confirmed
        '401':
          description: Missing or invalid API key (x-api-key header)
      security:
        - x-api-key: []
components:
  schemas:
    RegisterBankAccountDto:
      type: object
      properties:
        bankCode:
          type: string
          description: Bank's code
          example: '000016'
        accountNumber:
          type: string
          description: User's bank account number
          example: '0025635480'
      required:
        - bankCode
        - accountNumber
    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

````