Recipients
Check who owns a phone number or bank account before you pay it.
Send your API key as Authorization: Bearer apk_test_… (sandbox) or apk_live_… (live). Each endpoint lists the scope the key needs. See API keys.
Verify a recipient
/api/v1/recipients/verifyrecipients:read 30 a minute per keyLooks up the name on an M-Pesa, Airtel Money or bank account. Send the name you expect and we tell you whether it matches. Use it when someone gives you their number for the first time.
typestringrequiredWhat to check.
mobile_moneybankphonestringoptionalmobile_money only: the Kenyan mobile number.
networkstringoptionalmobile_money only. Default "safaricom".
safaricomairtelbank_codestringoptionalbank only: from GET /api/v1/banks.
account_numberstringoptionalbank only: 6 to 34 characters.
namestringoptionalThe name you expect. When sent, name_match tells you how close it is.
curl -X POST "https://api.autopayke.com/api/v1/recipients/verify" \
-H "Authorization: Bearer $AUTOPAYKE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "mobile_money",
"phone": "+254712345678",
"name": "Jane Doe"
}'{
"ok": true,
"data": {
"object": "recipient_check",
"livemode": false,
"resolved": true,
"account_name": "JANE WANJIKU DOE",
"name_match": "matched"
}
}resolvedbooleanWhether the network returned a name. false can mean the account doesn't exist or the network doesn't share names for it.
account_namestring | nullThe registered name, as the network returns it (often upper case).
name_matchstring | nullOnly when you sent name. matched: every word of the shorter name appears in the other (Jane Doe matches JANE WANJIKU DOE). mismatch: they don't agree; confirm with the person before paying. unverified: nothing resolved to compare against. null when you didn't send a name.
matchedmismatchunverified
Plus the key and rate errors any keyed call can return.
- Sandbox: every number resolves to JANE WANJIKU DOE except +254700000002, and every account except 0000000000.
- Checking many numbers that don't resolve looks like sweeping for valid accounts and alerts our team. Only check numbers people gave you.