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

# Predict Correspondent

Predicts the correspondent (Mobile Money Operator) for the specified phone number (MSISDN).

**Average misprediction rate** when using this endpoint is 0.12%.

<Warning>Benin has a relatively high level of number portability and therefore has an average misprediction rate of 6%.</Warning>


## OpenAPI

````yaml openapi_v1 post /v1/predict-correspondent
openapi: 3.0.0
info:
  title: PawaPay Merchant API v1
  description: Please find complete documentation from https://docs.pawapay.io/.
  version: v1
  x-logo:
    url: >-
      https://global-uploads.webflow.com/62824591015aa314fd308df1/6411b26596e3de3f52551c00_Logopawapay-p-500.png
    href: https://docs.pawapay.io/
    altText: PawaPay logo
servers:
  - url: https://api.sandbox.pawapay.io
    description: PawaPay Merchant API sandbox
  - url: https://api.pawapay.io
    description: PawaPay Merchant API production
security:
  - bearerAuth: []
tags:
  - name: payouts
    x-displayName: Payouts
  - name: deposits
    x-displayName: Deposits
  - name: refunds
    x-displayName: Refunds
  - name: payment-page
    x-displayName: Payment Page
  - name: toolkit
    x-displayName: Toolkit
  - name: wallet-balances
    x-displayName: Wallet balances
paths:
  /v1/predict-correspondent:
    post:
      tags:
        - toolkit
      summary: Predict Correspondent
      operationId: predict-correspondent
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MsisdnInput'
        required: true
      responses:
        '200':
          description: Correspondent prediction was successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorrespondentPrediction'
        '400':
          description: >-
            Request was rejected due to incompatibility with PawaPay API
            specification
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                INVALID_INPUT:
                  value:
                    errorId: 94bd5e86-9bc4-4328-b128-c705f6496db8
                    errorCode: 1
                    errorMessage: 'INVALID_INPUT: Missing required property ''msisdn'''
        '401':
          description: Authentication Failure. Please check your authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Failure:
                  value:
                    errorId: cad1529e-040b-4c9d-a21d-2ba3056ff750
                    errorCode: 2
                    errorMessage: Authentication error
        '403':
          description: Authorization Failure. Please check your authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authorization Failure:
                  value:
                    errorId: daa495f0-541d-4192-b636-a8877b25a510
                    errorCode: 3
                    errorMessage: Authorization error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Internal Server Error:
                  value:
                    errorId: 94bd5e86-9bc4-4328-b128-c705f6496db8
                    errorCode: 0
                    errorMessage: Internal error
components:
  schemas:
    MsisdnInput:
      required:
        - msisdn
      type: object
      properties:
        msisdn:
          $ref: '#/components/schemas/FlexibleMsisdnValue'
    CorrespondentPrediction:
      required:
        - country
        - operator
        - correspondent
        - msisdn
      type: object
      properties:
        country:
          $ref: '#/components/schemas/Country'
        operator:
          type: string
          description: The name of the MMO associated with the specified MSISDN.
          example: MTN
        correspondent:
          $ref: '#/components/schemas/Correspondent'
        msisdn:
          $ref: '#/components/schemas/PredictedMsisdnValue'
    ErrorResponse:
      required:
        - errorId
        - errorCode
        - errorMessage
      type: object
      properties:
        errorId:
          maxLength: 36
          type: string
          description: A unique error ID in the PawaPay platform.
          example: 63743264-7292-11ea-bc55-0242ac130003
        errorCode:
          type: integer
          description: PawaPay internal error code.
          example: 1
        errorMessage:
          type: string
          description: Error message.
          example: Internal error
    FlexibleMsisdnValue:
      type: string
      description: |
        The phone number (MSISDN) to predict the correspondent of.
        Must contain the country code.

        The input will be sanitized by:
        * removing the leading + sign
        * removing all whitespace
        * removing non-numeric characters
      example: +260 763-456789
    Country:
      type: string
      description: >
        The country in which the MMO operates. 


        Format is ISO 3166-1 alpha-3, three character country code in upper
        case. Read more from
        [Wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements).
      example: ZMB
    Correspondent:
      type: string
      description: >
        The correspondent code refers to the specific MMO that the specified
        phone number (MSISDN) has an active mobile money wallet with. 


        You can find all the supported correspondents [listed
        here](/using_the_api#correspondents). 


        The [active
        configuration](/v1/api-reference/toolkit/active-configuration) endpoint
        provides the list of correspondents configured for your account.


        You can use the [predict
        correspondent](/v1/api-reference/toolkit/predict-correspondent) enpoint
        to predict the correct correspondent to use based on the phone number
        (MSISDN).
      example: MTN_MOMO_ZMB
    PredictedMsisdnValue:
      type: string
      description: >
        The correctly formatted phone number (MSISDN) from your original request
        that is in a valid format for the rest of the PawaPay Merchant API.
      example: '260763456789'
  securitySchemes:
    bearerAuth:
      type: http
      description: See [Authentication](/using_the_api#authentication).
      scheme: bearer
      bearerFormat: JWT

````