Overview
The Bills API lets you browse a catalog of billers, validate a customer (meter, smartcard/IUC, or account) before charging, and pay for airtime, data, cable TV, and electricity. Every successful payment debits your Hyparrow wallet. There are two route families:/bills/*— the primary catalog-driven flow. You discover billers and payment items from the cache, validate a customer, then pay bypaymentCode./bills/topup/*— an alternate bill-pay route set that resolves products by catalog ids (network / plan / provider) instead of payment codes, and also supports printable PIN products (exam PINs, recharge-card PINs, data PINs).
Base URL:
https://api.hyparrow.cloud/api/v1Auth: every request requires X-API-Key and X-API-Secret headers.Sandbox: point at https://sandbox.hyparrow.cloud/api/v1 and use your
pk_test_ key. In sandbox you can simulate outcomes with magic amounts — an
amount ending in .01 forces a failed result, and .99 forces a pending
result. Everything else succeeds.Amount units
Discovering billers
The primary flow is driven by a cached catalog. Walk it from categories down to the specific payment item, whosePaymentCode you pass to /bills/pay.
1
List categories
GET /bills/categories returns the available bill categories (airtime, data,
cable TV, electricity, and more).2
List billers in a category
GET /bills/category/billers?category=<name|id> returns the billers under a
category. You can also browse everything with GET /bills/services.3
Get payment options
GET /bills/services/options?serviceId=<id> returns the payment items
(plans / packages) for a biller, each carrying the PaymentCode and Amount
you need to pay.4
Find a specific biller (optional)
GET /bills/search?q=<term> free-text searches the catalog, and
GET /bills/biller?category=<name>&biller=<name> returns a single biller
matched by category + biller name.List categories
Response
Validate before you pay
For services tied to a customer account — electricity meters and cable smartcards/IUCs — validate the customer first. This confirms the beneficiary name and that the account is payable before any money leaves the wallet.Validate a customer
Response
/bills/validate accepts both the flat shape above and an array shape
({ "customers": [{ "CustomerId": "...", "PaymentCode": "..." }] }). Both
customerId and paymentCode are required.Paying a bill
POST /bills/pay charges the wallet and submits the payment. The amount is in
kobo and, for fixed-price payment items, must exactly match the cached item
amount — otherwise the request is rejected with the required amount. For
flexible-price items you supply the amount; if you omit it on a fixed-price item,
Hyparrow auto-fills it from the catalog.
1
Resolve the payment item
From the catalog, take the
PaymentCode (and Amount for fixed items).2
Validate (metered/cable services)
Confirm the beneficiary with
/bills/validate.3
Pay
Call
/bills/pay. The wallet is debited and the payment is submitted to the
bill provider in one call.4
Confirm
Poll
/bills/status?reference=<ref> to confirm the final outcome.Pay a bill
Response
data.TransactionRef (or your own requestRef) is what you use to check
status later.
Examples by category
Checking status
GET /bills/status?reference=<ref> returns the latest status for a bill
transaction. Pass either the provider TransactionRef returned by /bills/pay
or your own requestRef.
Response
In sandbox, use the magic amounts to exercise status handling: an amount ending
in
.99 (e.g. "19999" for ₦199.99) lands in pending so you can test polling,
and .01 lands in failed.Edge cases
Alternate route set — /bills/topup
/bills/topup/* is an alternate bill-pay route set. Instead of payment codes it
resolves products by catalog ids (network, plan, provider), and it adds printable
PIN products that the primary routes don’t cover. Hyparrow prices each category
server-side and debits the result; if the provider declines or errors, the wallet
deduction is automatically refunded.
Airtime costs less than face value. It carries no markup — Hyparrow passes
part of its wholesale discount back to you, so
chargeKobo is below the
amount you sent: 1.5% off MTN and Airtel, 2% off GLO and 9mobile. ₦100 of
MTN debits ₦98.50 and your customer still receives ₦100. Every other category
adds a markup instead. Always trust the returned chargeKobo.Resolve catalog ids
GET /bills/topup/services?service=<type> returns the catalog you need to build a
request. Valid service values include network, data, cabletv,
cable-provider, electricity, exampin, datapin, and recharge-card.
Fetch data plans
Validate (cable / electricity)
POST /bills/topup/validate resolves the customer name for a cable IUC or an
electricity meter. Airtime and data have nothing to validate.
Validate a meter
Response
Pay (airtime / data / TV / electricity)
POST /bills/topup pays a bill resolved by catalog ids. service is one of
airtime, data, tv, electricity. amount is the base price in kobo —
the value your customer receives. Hyparrow prices it before debiting: a markup on
most categories, a cashback on airtime.
Response
baseKobo (what you sent),
markupKobo (Hyparrow’s markup), cashbackKobo (the discount off face value,
airtime only) and chargeKobo (what the wallet was debited). markupKobo and
cashbackKobo are never both non-zero — a category is priced one way or the
other.
Airtime response — charged below face value
PIN products
These routes generate printable PINs. Theamount you send is the base total
price in kobo (unit price × quantity); the wallet is charged the base plus the
category markup, and a declined purchase is refunded.
Response
Status for
/bills/topup/* payments is available through the same
GET /bills/status?reference=<ref> endpoint, using the reference returned by
the payment call.
