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

# Register a bank account

> Register a bank account that can be used for withdrawal for a given currency. Only NGN is supported at the moment.



## OpenAPI

````yaml post /bankaccount
openapi: 3.0.1
info:
  title: Mavapay API
  description: API documentation for Mavapay
  license:
    name: MIT
  version: 1.0.0
  contact:
    name: Mavapay
    url: https://mavapay.co
    email: info@mavapay.co
servers:
  - url: https://staging.api.mavapay.co/api/v1
    description: Staging server
  - url: https://api.mavapay.co/api/v1
    description: Live server
security:
  - ApiKeyAuth: []
    bearerAuth: []
tags:
  - name: Price
    description: Price related endpoints
  - name: Payment Link
    description: Payment Link endpoints for creating and managing hosted payment pages
paths:
  /bankaccount:
    post:
      tags:
        - Bank Account
      summary: Register a bank account
      description: >-
        Register a bank account that can be used for withdrawal for a given
        currency. Only NGN is supported at the moment.
      operationId: createBankAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankAccount'
        required: true
      responses:
        '200':
          description: Bank account response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    format: string
                    example: ok
                  data:
                    $ref: '#/components/schemas/BankAccount'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    BankAccount:
      type: object
      properties:
        bankName:
          type: string
          format: string
          example: KUDA MICROFINANCE BANK
        bankCode:
          type: string
          format: string
          example: '090267'
        bankAccountNumber:
          type: string
          format: string
          example: '0123456789'
        bankAccountName:
          type: string
          format: string
          example: Satoshi Nakamoto
        currency:
          type: string
          format: string
          enum:
            - NGN
        walletId:
          type: string
          format: string
          example: d1614a76-9c7f-4111-98a7-43199f307e5b-123456789
    Error:
      required:
        - error
        - message
      type: object
      properties:
        status:
          type: string
          format: string
          example: error
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    bearerAuth:
      type: http
      scheme: bearer

````