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

# Validate KES identifier

> Validate a Kenyan M-Pesa PayBill or Till number and retrieve the associated business name. This endpoint is only available in production.



## OpenAPI

````yaml post /quote/validate-kes-identifier
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:
  /quote/validate-kes-identifier:
    post:
      tags:
        - Quote
      summary: Validate KES identifier
      description: >-
        Validate a Kenyan M-Pesa PayBill or Till number and retrieve the
        associated business name. This endpoint is only available in production.
      operationId: validateKesIdentifier
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - identifier
                - identifierType
              properties:
                identifier:
                  type: string
                  description: The paybill or till number to validate
                  example: '247247'
                identifierType:
                  type: string
                  enum:
                    - PayBill
                    - Till
                  description: The type of identifier to validate
                  example: PayBill
            examples:
              validatePaybill:
                summary: Validate Paybill
                description: Validate a Kenyan M-Pesa paybill number
                value:
                  identifier: '247247'
                  identifierType: PayBill
              validateTill:
                summary: Validate Till
                description: Validate a Kenyan M-Pesa till number
                value:
                  identifier: '796980711'
                  identifierType: Till
        required: true
      responses:
        '200':
          description: Validation successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
                  data:
                    type: object
                    properties:
                      organization_name:
                        type: string
                        description: >-
                          The name of the business associated with the
                          identifier
              examples:
                paybillResponse:
                  summary: Paybill Validation Response
                  value:
                    status: ok
                    data:
                      organization_name: Equity Paybill Account
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    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

````