Recipient Verification API
Verify recipient details before sending payments to ensure accuracy and reduce failed transactions.
Verify Mobile Money Transfer
Validate mobile money wallet number before transfer.
POST /business/verify-transferRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
countryCode | string | Yes | Country code: KE, TZ, UG, ZA |
phoneNumber | string | Yes | Phone number with international prefix |
Example Request - Kenya TESTENV Number
curl -X POST https://api.test.wakapay.io/business/verify-transfer \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"countryCode": "KE",
"phoneNumber": "+254700000001"
}'const response = await fetch(
"https://api.test.wakapay.io/business/verify-transfer",
{
method: "POST",
headers: {
Authorization: `Bearer ${accessToken}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
countryCode: "KE",
phoneNumber: "+254700000001",
}),
},
);
const data = await response.json();
console.log(data);Response
{
"displayName": "Amina Mjema",
"receiverPhone": "+254700000001",
"verified": true
}Response Fields
| Field | Type | Description |
|---|---|---|
verified | boolean | Whether recipient was successfully verified |
displayName | string | Registered name of the account holder |
receiverPhone | string | Verified phone number |
TESTENV Test Phone Numbers
Use these phone numbers for testing mobile money transfers:
| Country | Phone Number | Verification | Display Name |
|---|---|---|---|
| Kenya (KE) | +254700000001 | verified: true | Amina Mjema |
| Tanzania (TZ) | +255700000001 | verified: true | Amina Mjema |
Non-test phone numbers will return verified: false with empty displayName in TESTENV.
Example Request - Tanzania TESTENV Number
curl -X POST https://api.test.wakapay.io/business/verify-transfer \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"countryCode": "TZ",
"phoneNumber": "+255700000001"
}'Response - Tanzania
{
"displayName": "Amina Mjema",
"receiverPhone": "+255700000001",
"verified": true
}Example Response - Non-Test Number
{
"displayName": "",
"receiverPhone": "+254712345678",
"verified": false
}Verify Payment (Till/Paybill)
Validate Paybill or Till number before payment.
POST /business/verify-paymentDifference between Till and Paybill:
- Till (Lipa Number) - No account reference needed. Payment goes directly to the till number.
- Paybill - Requires an account reference. Payment goes to the paybill number with a specific account reference for tracking.
Till/Paybill Request Body
| Field | Type | Required | Description |
|---|---|---|---|
countryCode | string | Yes | Country code: KE, TZ, UG, ZA |
type | string | Yes | Payment type: till or paybill |
lipaNumber | string | Yes | Till or Paybill number |
accountReference | string | Conditional | Account reference (required for paybill, omit for till) |
TESTENV Test Lipa Numbers
Use these numbers for testing till/paybill payments:
| Country | Type | Lipa Number | Account Ref | Display Name |
|---|---|---|---|---|
| Kenya (KE) | Till | 888880 | - | Ugali Point |
| Kenya (KE) | Paybill | 123456 | ABC123 | Ugali Point Paybill |
| Tanzania (TZ) | Till | 600000 | - | Ugali Point |
| Tanzania (TZ) | Paybill | 700000 | ABC123 | Ugali Point Paybill |
Example Request - Kenya Till
curl -X POST https://api.test.wakapay.io/business/verify-payment \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"countryCode": "KE",
"type": "till",
"lipaNumber": "888880"
}'const response = await fetch(
"https://api.test.wakapay.io/business/verify-payment",
{
method: "POST",
headers: {
Authorization: `Bearer ${accessToken}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
countryCode: "KE",
type: "till",
lipaNumber: "888880",
}),
},
);
const data = await response.json();
console.log(data);Response - Till
{
"displayName": "Ugali Point",
"verified": true
}Example Request - Kenya Paybill
curl -X POST https://api.test.wakapay.io/business/verify-payment \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"countryCode": "KE",
"type": "paybill",
"lipaNumber": "123456",
"accountReference": "ABC123"
}'Response - Paybill
{
"displayName": "Ugali Point Paybill",
"verified": true
}Verification Status
| Status | Description | Action |
|---|---|---|
verified: true | Recipient exists and can receive payments | Proceed with payment |
verified: false | Recipient does not exist or not active in TESTENV | Check details and retry, or activate account for production |
Use Cases
Verify Before Mobile Money Transfer
async function sendVerifiedTransfer(
amount,
currency,
phoneNumber,
countryCode,
reference,
) {
// Step 1: Verify recipient
const verifyResponse = await fetch(
"https://api.test.wakapay.io/business/verify-transfer",
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
countryCode: countryCode,
phoneNumber: phoneNumber,
}),
},
);
const verifyData = await verifyResponse.json();
if (!verifyData.verified) {
throw new Error("Recipient verification failed");
}
// Step 2: Use verified name in transfer
console.log(`Sending to: ${verifyData.displayName}`);
// Step 3: Send transfer
const transferResponse = await fetch(
"https://api.test.wakapay.io/business/payout/transfer",
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
senderCurrency: "USD",
receiverCurrency: currency,
amount: amount,
receiverPhone: phoneNumber,
payoutCountry: countryCode,
businessReference: reference,
// ... other required fields
}),
},
);
return await transferResponse.json();
}Verify Before Till/Paybill Payment
async function sendVerifiedPayment(
amount,
currency,
lipaNumber,
type,
countryCode,
reference,
) {
// Step 1: Verify payment recipient
const verifyPayload = {
countryCode: countryCode,
type: type,
lipaNumber: lipaNumber,
};
// Add account reference for paybill
if (type === "paybill") {
verifyPayload.accountReference = "ABC123";
}
const verifyResponse = await fetch(
"https://api.test.wakapay.io/business/verify-payment",
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify(verifyPayload),
},
);
const verifyData = await verifyResponse.json();
if (!verifyData.verified) {
throw new Error("Payment recipient verification failed");
}
console.log(`Paying to: ${verifyData.displayName}`);
// Step 2: Send payment
const paymentResponse = await fetch(
"https://api.test.wakapay.io/business/payout/payment",
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
type: type,
senderCurrency: "USD",
receiverCurrency: currency,
amount: amount,
receiverLipaNumber: lipaNumber,
payoutCountry: countryCode,
businessReference: reference,
// ... other required fields
}),
},
);
return await paymentResponse.json();
}Error Responses
400 - Missing countryCode
{
"code": 0,
"error": "countryCode is required"
}400 - Invalid countryCode
{
"code": 0,
"error": "countryCode must be one of: KE, TZ, UG, ZA"
}400 - Missing phoneNumber
{
"code": 0,
"error": "empty mobile number"
}400 - Invalid Phone Format
{
"code": 0,
"error": "phoneNumber must use the correct international prefix for the given countryCode"
}400 - Missing type (verify-payment)
{
"code": 0,
"error": "type must be \"paybill\" or \"till\""
}400 - Invalid type (verify-payment)
{
"code": 0,
"error": "type must be \"paybill\" or \"till\""
}400 - Missing lipaNumber
{
"code": 0,
"error": "lipaNumber is required"
}401 - No Authorization
{
"message": "missing value in request header"
}Best Practices
- Always verify first - Prevents failed payments and reduces costs
- Display verification results - Show displayName to user for confirmation
- Handle unverified recipients - Show clear error messages
- Use TESTENV numbers for testing - Use provided test numbers in test environment
- Include accountReference for paybill - Required for paybill type payments
Supported Countries
- KE - Kenya
- TZ - Tanzania
- UG - Uganda
- ZA - South Africa
Related
- Payouts - Payment (Till/Paybill) - Send payments to verified till/paybill
- Payouts - Transfer (Mobile Money) - Send transfers to verified phone numbers
- Error Handling - Handle verification errors
Last updated on