Skip to main content

Overview

Always validate customer details before making a payment. Validation confirms the customer exists, shows their details, and prevents payment errors. What you’ll learn:
  • Why validation is important
  • Validate customer details
  • Understand validation responses
  • Handle validation errors
  • Best practices

Why Validate?

Confirm Customer

Verify customer exists and is active

See Details

View customer name and account info

Prevent Errors

Avoid paying wrong account

Check Balance

See current balance (for postpaid)

Validate Customer

Verify customer details before payment.
Request Parameters: Response:

Validation by Category

Different categories return different information:
Phone Number Validation
Response Fields:
  • customerName - Account holder name
  • customerId - Phone number
  • billerName - Network name
  • validated - true/false
Customer ID Format: 11 digits (0801234567)

Complete Validation Flow


Error Handling

Error: Customer ID does not existCommon causes:
  • Wrong phone/meter/card number
  • Incorrect biller selected
  • Inactive account
Solution:
  • Verify customer ID with user
  • Check biller is correct
  • Try different format (with/without prefix)
Error: Customer ID format is invalidFormats by category:
  • Airtime: 11 digits (08012345678)
  • Electricity: 11-13 digits
  • Cable TV: 10 digits
  • Internet: Varies by provider
Solution:
  • Validate format before API call
  • Remove spaces and special characters
  • Check digit count
Error: Biller service temporarily unavailableCauses:
  • Biller system down
  • Maintenance window
  • Network issues
Solution:
  • Retry after a few minutes
  • Try during off-peak hours
  • Check biller status
  • Use alternative biller if available
Error: Validation request timed outSolution:
  • Retry the request
  • Check internet connection
  • Try during off-peak hours
  • Contact support if persists

Best Practices

Always Validate

Never skip validation - always verify before payment

Show Customer Name

Display validated name to user for confirmation

Cache Results

Cache validation for few minutes to reduce API calls

Validate Format

Validate customer ID format client-side first

Handle Errors

Provide clear error messages to users

Show Summary

Display payment summary before confirmation

Input Validation

Validate customer ID format before API call:

Next Steps

Overview

Bill payments introduction

Discovery

Browse available billers

Payments

Make bill payments

History

View payment history