Verify Phone Number


This endpoint allows you to verify that the phone number you are using is valid. This is an important step before processing payments to ensure the recipient can receive the transaction.

Overview

Phone verification is crucial for successful payment processing. This endpoint validates:

  • Phone number format
  • Country code validity
  • Network operator compatibility
  • Number reachability

Supported Countries:

West Africa

CountryCountry CodeOperators
COTE D'IVOIRE (CI)+225MTN, MOOV, ORANGE
TOGO (TG)+228MOOV, TMONEY
SENEGAL (SN)+221ORANGE, FREE
MALI (ML)+223MOOV
BURKINA FASO (BF)+226MOOV, ORANGE
BENIN (BJ)+229MOOV

Central Africa

CountryCountry CodeOperators
CAMEROUN (CM)+237MTN, ORANGE
GABON (GA)+241AIRTEL, MOOV
TCHAD (TD)+235AIRTEL, MOOV
RCA (Centrafrique - CF)+236ORANGE
CONGO (CG)+242AIRTEL, MTN
GUINEE EQUATORIALE (GQ)+240MUNI DINERO

Request

Method: POST

URL: {{base_url}}clients/verify_phoneNumber

Headers:

  • SECRETKEY: Your API secret key
  • Content-Type: application/json

Parameters:

  • mobile_phone (required): The user mobile phone to whom the payment will be done

cURL Request

curl -X POST \
  https://sandbox.peexit.com/api/v1/clients/verify_phoneNumber \
  -H 'SECRETKEY: ########-####-####-####-############' \
  -H 'Content-Type: application/json' \
  -d '{
    "mobile_phone": "+237677777777"
  }'

Request Body

Request payload

{
  "mobile_phone": "+237677777777"
}

Note: The phone number must be in international format with the country code (e.g., +237677777777 for Cameroon).

Response

Status 200 - Success

The verification response includes detailed information about the phone number:

  • phone: The verified phone number
  • valid: Boolean indicating if the number is valid
  • mnc: Mobile Network Code
  • local_format: Number in local format
  • international_format: Number in international format
  • country_prefix: Country calling code
  • country_code: ISO country code
  • country_name: Full country name

Success Response

{
  "phone": "237677777777",
  "valid": true,
  "mnc": "mtn-cm",
  "local_format": "677777777",
  "international_format": "+237677777777",
  "country_prefix": "+237",
  "country_code": "cm",
  "country_name": "Cameroon"
}

Error Handling

Status 401 - Unauthorized

This means you're not authorized to make requests on the server. This could happen if:

  • You have not provided a correct secret key
  • Your secret key is wrong or expired

Status 422 - Bad Request

The phone number format is invalid.

Error Response

{
  "error": "Unauthorized", 
  "message": "Invalid or missing secret key"
}

Invalid phone format

{
  "error": {
      "statusCode": 422,
      "name": "UnprocessableEntity",
      "message": "Invalid wallet number",
      "details": "+237 : the phone number does not respect my dialing format !",
    }
}

Phone Number Format

Accepted Formats

  • International format: +237677777777

Invalid Formats

  • With spaces: +237 677 777 777
  • With dashes: +237-677-777-777
  • Missing country code: 677777777
  • Wrong country code: +1677777777
  • Letters in number: +237abcdefgh

Network Codes

Common network codes returned:

  • mtn-cm: MTN Cameroon
  • orange-cm: Orange Cameroon
  • Other operators as supported

Use Cases

Phone verification is typically used for:

  1. Pre-payment Validation - Verify recipient before creating payment
  2. Form Validation - Real-time validation in user interfaces
  3. Compliance - Ensure regulatory compliance for payments

Next Steps

After verifying a phone number, you can proceed with:

Was this page helpful?