Buying a bill
One POST per service, each with your own reference, each answering with the bill.
All are POST, all need reference, and all answer with the bill object (201 new, 200 repeat).
#A complete example
Paying an electricity meter. Every other service is the same call with its own fields.
curl https://api.paymonetra.com/v1/bills/electricity \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"reference": "order-1042",
"biller_id": 3,
"meter_number": "45012345678",
"meter_type": "prepaid",
"amount": 5000
}'const url = 'https://api.paymonetra.com/v1/bills/electricity'
const response = await fetch(url, {
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.PAYMONETRA_SECRET_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
reference: 'order-1042',
biller_id: 3,
meter_number: '45012345678',
meter_type: 'prepaid',
amount: 5000,
}),
})
const result = await response.json()
if (!response.ok) throw new Error(result.error.message)$ch = curl_init('https://api.paymonetra.com/v1/bills/electricity');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('PAYMONETRA_SECRET_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'reference' => 'order-1042',
'biller_id' => 3,
'meter_number' => '45012345678',
'meter_type' => 'prepaid',
'amount' => 5000,
]),
]);
$result = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) {
throw new RuntimeException($result['error']['message']);
}{
"id": "MB3F9A1C0D2E4B5A6C7D",
"reference": "order-1042",
"service": "electricity",
"status": "successful",
"biller": "Ikeja Electric",
"recipient": "45012345678",
"recipient_name": "ADA OBI",
"plan": "Prepaid",
"amount": 5000,
"charged": 5000,
"currency": "NGN",
"mode": "live",
"created_at": "2026-11-28T10:15:02+01:00",
"completed_at": "2026-11-28T10:15:05+01:00",
"token": "1234-5678-9012-3456-7890",
"units": "52.3kWh"
}#Buy airtime
Send phone (Nigerian mobile, any common format), amount (100 to 50,000), network optional (guessed from the number; send it for ported numbers)
#Buy data
Send phone, plan_code, network optional, amount optional (needed only if one code is sold at two prices)
#Pay for cable TV
Send biller, smartcard (10 to 12 digits), plan_code. The price is the plan's, never sent.
#Pay for electricity
Send biller_id, meter_number (10 to 20 digits), meter_type prepaid or postpaid, amount (500 to 500,000)
#Buy exam pins
Send biller, quantity (1 to 10). The price is the pin price times quantity.
#Buy international airtime
Send operator_id, country, phone (local number, no country code), amount_usd, amount_ngn (the quote; optional, but without it you pay today's price)
If the price moved more than 1.5% (minimum ₦50) since your quote, the answer is 409 price_changed with the new amount_ngn in the error. Quote again and resend.