Call this endpoint before paying a bill to confirm that the customer ID is valid for the selected service. This prevents failed payments caused by incorrect meter numbers, decoder IDs, or phone numbers.
Authentication
x-api-key: your_api_key
x-api-secret: your_api_secret
Endpoint
GET https://api.hyparrow.com/api/v1/bills/validate?customerId={id}&serviceId={id}
Query parameters
The customer’s identifier for the service. This varies by biller type:
Airtime / data : the phone number (e.g., 08012345678)
Electricity : the meter number
Cable TV : the smartcard or IUC number
Internet : the account number
The biller ID for the service you intend to pay. Retrieve this from the List Services endpoint.
Response
true when the customer is found and the details are valid.
Customer details returned by the biller. The customer ID that was validated.
The full name associated with the customer ID.
The customer’s address registered with the biller, if available.
The customer’s email registered with the biller, if available.
The customer’s phone number registered with the biller, if available.
Outstanding balance or minimum required amount in kobo, if applicable.
An error message when validation fails. Empty on success.
Examples
curl (electricity meter)
curl (cable TV)
curl -X GET "https://api.hyparrow.com/api/v1/bills/validate?customerId=45678901234&serviceId=BIL150" \
-H "x-api-key: your_api_key" \
-H "x-api-secret: your_api_secret"
Success response
{
"success" : true ,
"data" : {
"customerId" : "45678901234" ,
"customerName" : "Ada Okafor" ,
"customerAddress" : "12 Adeola Odeku Street, Lagos" ,
"customerEmail" : "" ,
"customerPhone" : "08012345678" ,
"amount" : "0"
},
"error" : ""
}
Error response
{
"success" : false ,
"data" : null ,
"error" : "Invalid customer ID"
}
Always validate a customer before calling Pay Bill . A successful validation response confirms the payment will reach the correct account.