POST /v1/msisdn/validate
Looks up the name registered on a mobile money number, so your customer can check who they’re paying, or you can check a payout recipient before you send. MTN and Airtel Uganda.
Request cURL PHP Node.js Python
curl -X POST "https://morzepay.com/v1/msisdn/validate" \
-H "Authorization: Bearer $MORZEPAY_KEY" \
-H "Content-Type: application/json" \
-d '{
"msisdn": "0771234567"
}'$ch = curl_init('https://morzepay.com/v1/msisdn/validate');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('MORZEPAY_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'msisdn' => '0771234567',
]),
]);
$response = json_decode(curl_exec($ch), true);const res = await fetch('https://morzepay.com/v1/msisdn/validate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.MORZEPAY_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
msisdn: '0771234567',
}),
});
const response = await res.json();import os, requests
res = requests.post(
'https://morzepay.com/v1/msisdn/validate',
headers={'Authorization': f"Bearer {os.environ['MORZEPAY_KEY']}"},
json={
'msisdn': '0771234567',
},
)
response = res.json(){
"success": true,
"data": {
"msisdn": "+256771234567",
"valid": true,
"customer_name": "JOHN DOE",
"provider": "MTN_UGANDA",
"message": null
}
}Permission msisdn:validate
Body# JSON, with Content-Type: application/json.
msisdnstring required
The phone number. +256771234567, 256771234567 and 0771234567 all work. MTN and Airtel Uganda.
Returns# valid is true when the number is a registered mobile money account, with customer_name. When it isn’t, message says why.
Errors# Status Code When 429 RATE_LIMITEDMore than 30 lookups in a minute with this key. 503 PROVIDER_UNAVAILABLELookups are briefly unavailable. Try again shortly.
The common codes, such as UNAUTHENTICATED and RATE_LIMITED, can come from any endpoint. See Errors .