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

# Get bank code

> Returns all bank codes for a given country. This endpoint is currently limited to Nigeria(NGN) and South Africa(ZAR) only.



## OpenAPI

````yaml get /bank/bankcode
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:
  /bank/bankcode:
    get:
      tags:
        - Bank Code
      summary: Get bank code
      description: >-
        Returns all bank codes for a given country. This endpoint is currently
        limited to Nigeria(NGN) and South Africa(ZAR) only.
      operationId: getBankCode
      parameters:
        - name: country
          in: query
          description: >-
            The country to get the bank codes for. Use 'NG' for Nigeria and 'ZA'
            for South Africa.
          schema:
            type: string
            enum:
              - NG
              - ZA
          required: true
      responses:
        '200':
          description: Bank code response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankCode'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    BankCode:
      type: object
      properties:
        status:
          type: string
          format: string
          example: ok
        message:
          type: string
          format: string
          example: all bank codes retrieved successfully
        data:
          type: array
          items:
            type: object
            properties:
              bankName:
                type: string
                format: string
                example: KUDA MICROFINANCE BANK
              nipBankCode:
                type: string
                format: string
                example: '090267'
    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

````