Verify a number

Number Lookup API

Resolve a mobile money number to its network before you pay out, and to the stored customer name when that number already exists in your customer list.

POSThttps://zonmpay.com/api/public/v1/numberprevious

Step by step

  1. 1

    Authenticate the request

    Send your secret key in the x-api-key header (or as Authorization: Bearer KEY). Keys are created in the developer area and shown only once — store yours server-side and never in browser code.

  2. 2

    Send the number

    POST the number in any common format; it is normalised to 255XXXXXXXXX.

  3. 3

    Read the result

    channelprovider is the detected network. accountname is filled from your own customer records; name_source tells you whether the name was verified or is still unverified.

  4. 4

    Then pay out

    Use the confirmed number with the Disbursement API to cut failed payouts.

Request body

phonenumberstringRequired

Phone number to resolve

Example request

cURL
curl -X POST https://zonmpay.com/api/public/v1/numberprevious \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{ "phonenumber": "255712345678" }'

Responses

Success
{
  "type": "success",
  "message": "Account resolved",
  "data": {
    "reference": "DSXPNE1Y2F",
    "accountnumber": "255712345678",
    "accountname": "Joseph Mtui",
    "name_source": "customer_record",
    "channelprovider": "Vodacom Tanzania",
    "environment": "live"
  }
}
Error
{
  "type": "error",
  "message": "Invalid phone number format",
  "data": { "error_code": "phone_invalid_format" }
}

Things that can go wrong

  • phone_invalid_formatThe number is not a valid Tanzanian mobile number.