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.| Parameter | Type | Required | Description |
|---|---|---|---|
billerId | string | Yes | Biller identifier |
customerId | string | Yes | Customer ID (phone, meter, smartcard) |
type | string | Yes | PREPAID or POSTPAID |
Validation by Category
Different categories return different information:- Airtime & Data
- Cable TV
- Electricity
Phone Number ValidationResponse Fields:
customerName- Account holder namecustomerId- Phone numberbillerName- Network namevalidated- true/false
Complete Validation Flow
Error Handling
Customer Not Found
Customer Not Found
Error: Customer ID does not existCommon causes:
- Wrong phone/meter/card number
- Incorrect biller selected
- Inactive account
- Verify customer ID with user
- Check biller is correct
- Try different format (with/without prefix)
Invalid Customer ID Format
Invalid Customer ID Format
Error: Customer ID format is invalidFormats by category:
- Airtime: 11 digits (08012345678)
- Electricity: 11-13 digits
- Cable TV: 10 digits
- Internet: Varies by provider
- Validate format before API call
- Remove spaces and special characters
- Check digit count
Service Unavailable
Service Unavailable
Validation Timeout
Validation Timeout
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

