Quick start
Make a test sale in a few minutes.
- Create an account and verify your email and phone.
- Create test keys under API keys. The secret key is shown once: keep it on your server as
PAYONETIME_SECRET. - Send a purchase with the sample below, then read the
statein the reply.
Base URL: https://api.developers.payonetime.ng/v1
curl -X POST "https://api.developers.payonetime.ng/v1/airtime" \
-H "Authorization: Bearer $PAYONETIME_SECRET" \
-H "Content-Type: application/json" \
-d '{"reference":"order-10001","network":"mtn","phone":"08031234567","amount":100000}'$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->post('https://api.developers.payonetime.ng/v1/airtime', [
'reference' => 'order-10001',
'network' => 'mtn',
'phone' => '08031234567',
'amount' => 100000,
]);
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/airtime', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
reference: 'order-10001',
network: 'mtn',
phone: '08031234567',
amount: 100000,
}),
});
const { data, error } = await response.json();import os, requests
response = requests.post(
"https://api.developers.payonetime.ng/v1/airtime",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
json={
"reference": "order-10001",
"network": "mtn",
"phone": "08031234567",
"amount": 100000,
},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.post(
Uri.parse('https://api.developers.payonetime.ng/v1/airtime'),
headers: {'Authorization': 'Bearer $secret', 'Content-Type': 'application/json'},
body: jsonEncode({
'reference': 'order-10001',
'network': 'mtn',
'phone': '08031234567',
'amount': 100000,
}),
);Authentication
Send Authorization: Bearer YOUR_KEY. A secret key can do everything and belongs only on your server. A public key can only read the catalogue. Live secret keys also require your server’s address to be on your allowed list.
Test mode
Test keys never reach a real company. Your test wallet starts with pretend money. The last four digits of the phone, meter or smartcard choose what happens:
0001 Fails at once0002 Pending, then succeeds0003 Pending, then fails0004 Connection times out, then succeeds0005 Stays pending (goes to manual review)0009 Meter or smartcard not found (verify only)other Succeeds at oncePending and retries
If your request times out, send it again with the same reference: you get the original result and are never charged twice. Money stays on hold until there is a definite answer.
Ping
GET /ping Public key allowed
Check your key.
curl -X GET "https://api.developers.payonetime.ng/v1/ping" \ -H "Authorization: Bearer $PAYONETIME_SECRET"
$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->get('https://api.developers.payonetime.ng/v1/ping');
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/ping', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
},
});
const { data, error } = await response.json();import os, requests
response = requests.get(
"https://api.developers.payonetime.ng/v1/ping",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.get(
Uri.parse('https://api.developers.payonetime.ng/v1/ping'),
headers: {'Authorization': 'Bearer $secret'},
);Services
GET /services Public key allowed
Services and whether each is available.
curl -X GET "https://api.developers.payonetime.ng/v1/services" \ -H "Authorization: Bearer $PAYONETIME_SECRET"
$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->get('https://api.developers.payonetime.ng/v1/services');
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/services', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
},
});
const { data, error } = await response.json();import os, requests
response = requests.get(
"https://api.developers.payonetime.ng/v1/services",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.get(
Uri.parse('https://api.developers.payonetime.ng/v1/services'),
headers: {'Authorization': 'Bearer $secret'},
);Data plans
GET /data/plans Public key allowed
Data plans and prices. With a secret key, your commission too.
networkstring · querymtn, airtel, glo or 9mobile
typestring · querystandard or saver
curl -X GET "https://api.developers.payonetime.ng/v1/data/plans" \ -H "Authorization: Bearer $PAYONETIME_SECRET"
$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->get('https://api.developers.payonetime.ng/v1/data/plans');
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/data/plans', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
},
});
const { data, error } = await response.json();import os, requests
response = requests.get(
"https://api.developers.payonetime.ng/v1/data/plans",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.get(
Uri.parse('https://api.developers.payonetime.ng/v1/data/plans'),
headers: {'Authorization': 'Bearer $secret'},
);TV packages
GET /tv/packages Public key allowed
TV packages and prices.
providerstring · querydstv, gotv or startimes
curl -X GET "https://api.developers.payonetime.ng/v1/tv/packages" \ -H "Authorization: Bearer $PAYONETIME_SECRET"
$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->get('https://api.developers.payonetime.ng/v1/tv/packages');
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/tv/packages', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
},
});
const { data, error } = await response.json();import os, requests
response = requests.get(
"https://api.developers.payonetime.ng/v1/tv/packages",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.get(
Uri.parse('https://api.developers.payonetime.ng/v1/tv/packages'),
headers: {'Authorization': 'Bearer $secret'},
);Electricity companies
GET /electricity/companies Public key allowed
Electricity companies and limits.
curl -X GET "https://api.developers.payonetime.ng/v1/electricity/companies" \ -H "Authorization: Bearer $PAYONETIME_SECRET"
$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->get('https://api.developers.payonetime.ng/v1/electricity/companies');
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/electricity/companies', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
},
});
const { data, error } = await response.json();import os, requests
response = requests.get(
"https://api.developers.payonetime.ng/v1/electricity/companies",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.get(
Uri.parse('https://api.developers.payonetime.ng/v1/electricity/companies'),
headers: {'Authorization': 'Bearer $secret'},
);Verify meter
POST /verify/meter
Name on an electricity meter.
companystring · bodyRequiredCompany ID.
meter_typestring · bodyRequiredMeter type. One of: prepaid, postpaid.
meterstring · bodyRequiredMeter number. In test mode the last four digits choose the outcome.
curl -X POST "https://api.developers.payonetime.ng/v1/verify/meter" \
-H "Authorization: Bearer $PAYONETIME_SECRET" \
-H "Content-Type: application/json" \
-d '{"company":"ikeja","meter_type":"prepaid","meter":"45012345678"}'$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->post('https://api.developers.payonetime.ng/v1/verify/meter', [
'company' => 'ikeja',
'meter_type' => 'prepaid',
'meter' => '45012345678',
]);
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/verify/meter', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
company: 'ikeja',
meter_type: 'prepaid',
meter: '45012345678',
}),
});
const { data, error } = await response.json();import os, requests
response = requests.post(
"https://api.developers.payonetime.ng/v1/verify/meter",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
json={
"company": "ikeja",
"meter_type": "prepaid",
"meter": "45012345678",
},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.post(
Uri.parse('https://api.developers.payonetime.ng/v1/verify/meter'),
headers: {'Authorization': 'Bearer $secret', 'Content-Type': 'application/json'},
body: jsonEncode({
'company': 'ikeja',
'meter_type': 'prepaid',
'meter': '45012345678',
}),
);Verify smartcard
POST /verify/smartcard
Name on a TV smartcard.
providerstring · bodyRequiredTV provider.
smartcardstring · bodyRequiredSmartcard number. In test mode the last four digits choose the outcome.
curl -X POST "https://api.developers.payonetime.ng/v1/verify/smartcard" \
-H "Authorization: Bearer $PAYONETIME_SECRET" \
-H "Content-Type: application/json" \
-d '{"provider":"dstv","smartcard":"7027000111"}'$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->post('https://api.developers.payonetime.ng/v1/verify/smartcard', [
'provider' => 'dstv',
'smartcard' => '7027000111',
]);
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/verify/smartcard', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
provider: 'dstv',
smartcard: '7027000111',
}),
});
const { data, error } = await response.json();import os, requests
response = requests.post(
"https://api.developers.payonetime.ng/v1/verify/smartcard",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
json={
"provider": "dstv",
"smartcard": "7027000111",
},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.post(
Uri.parse('https://api.developers.payonetime.ng/v1/verify/smartcard'),
headers: {'Authorization': 'Bearer $secret', 'Content-Type': 'application/json'},
body: jsonEncode({
'provider': 'dstv',
'smartcard': '7027000111',
}),
);Airtime
POST /airtime
Buy airtime.
referencestring · bodyRequiredYour own unique ID for this sale (4 to 64 letters, numbers, . _ -). Sending it again returns the first result and never charges twice.
networkstring · bodyRequiredNetwork. One of: mtn, airtel, glo, 9mobile.
phonestring · bodyRequiredNigerian mobile number.
amountinteger · bodyRequiredAmount in kobo as a whole number (100000 is ₦1,000).
allow_duplicateboolean · bodyOptional. Send true to buy the same number and amount again within the duplicate guard window (live only).
curl -X POST "https://api.developers.payonetime.ng/v1/airtime" \
-H "Authorization: Bearer $PAYONETIME_SECRET" \
-H "Content-Type: application/json" \
-d '{"reference":"order-10001","network":"mtn","phone":"08031234567","amount":100000}'$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->post('https://api.developers.payonetime.ng/v1/airtime', [
'reference' => 'order-10001',
'network' => 'mtn',
'phone' => '08031234567',
'amount' => 100000,
]);
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/airtime', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
reference: 'order-10001',
network: 'mtn',
phone: '08031234567',
amount: 100000,
}),
});
const { data, error } = await response.json();import os, requests
response = requests.post(
"https://api.developers.payonetime.ng/v1/airtime",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
json={
"reference": "order-10001",
"network": "mtn",
"phone": "08031234567",
"amount": 100000,
},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.post(
Uri.parse('https://api.developers.payonetime.ng/v1/airtime'),
headers: {'Authorization': 'Bearer $secret', 'Content-Type': 'application/json'},
body: jsonEncode({
'reference': 'order-10001',
'network': 'mtn',
'phone': '08031234567',
'amount': 100000,
}),
);Data
POST /data
Buy a data plan. The plan decides whether it is Standard or Saver.
referencestring · bodyRequiredYour own unique ID for this sale (4 to 64 letters, numbers, . _ -). Sending it again returns the first result and never charges twice.
phonestring · bodyRequiredNigerian mobile number.
plan_idstring · bodyRequiredFrom GET /data/plans.
allow_duplicateboolean · bodyOptional. Send true to buy the same number and amount again within the duplicate guard window (live only).
curl -X POST "https://api.developers.payonetime.ng/v1/data" \
-H "Authorization: Bearer $PAYONETIME_SECRET" \
-H "Content-Type: application/json" \
-d '{"reference":"order-10001","phone":"08031234567","plan_id":"dp_mtn_sv_1gb"}'$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->post('https://api.developers.payonetime.ng/v1/data', [
'reference' => 'order-10001',
'phone' => '08031234567',
'plan_id' => 'dp_mtn_sv_1gb',
]);
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/data', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
reference: 'order-10001',
phone: '08031234567',
plan_id: 'dp_mtn_sv_1gb',
}),
});
const { data, error } = await response.json();import os, requests
response = requests.post(
"https://api.developers.payonetime.ng/v1/data",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
json={
"reference": "order-10001",
"phone": "08031234567",
"plan_id": "dp_mtn_sv_1gb",
},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.post(
Uri.parse('https://api.developers.payonetime.ng/v1/data'),
headers: {'Authorization': 'Bearer $secret', 'Content-Type': 'application/json'},
body: jsonEncode({
'reference': 'order-10001',
'phone': '08031234567',
'plan_id': 'dp_mtn_sv_1gb',
}),
);Electricity
POST /electricity
Pay electricity. Prepaid returns a token.
referencestring · bodyRequiredYour own unique ID for this sale (4 to 64 letters, numbers, . _ -). Sending it again returns the first result and never charges twice.
companystring · bodyRequiredCompany ID.
meter_typestring · bodyRequiredMeter type. One of: prepaid, postpaid.
meterstring · bodyRequiredMeter number. In test mode the last four digits choose the outcome.
amountinteger · bodyRequiredAmount in kobo as a whole number (100000 is ₦1,000).
phonestring · bodyRequiredNigerian mobile number.
allow_duplicateboolean · bodyOptional. Send true to buy the same number and amount again within the duplicate guard window (live only).
curl -X POST "https://api.developers.payonetime.ng/v1/electricity" \
-H "Authorization: Bearer $PAYONETIME_SECRET" \
-H "Content-Type: application/json" \
-d '{"reference":"order-10001","company":"ikeja","meter_type":"prepaid","meter":"45012345678","amount":500000,"phone":"08031234567"}'$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->post('https://api.developers.payonetime.ng/v1/electricity', [
'reference' => 'order-10001',
'company' => 'ikeja',
'meter_type' => 'prepaid',
'meter' => '45012345678',
'amount' => 500000,
'phone' => '08031234567',
]);
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/electricity', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
reference: 'order-10001',
company: 'ikeja',
meter_type: 'prepaid',
meter: '45012345678',
amount: 500000,
phone: '08031234567',
}),
});
const { data, error } = await response.json();import os, requests
response = requests.post(
"https://api.developers.payonetime.ng/v1/electricity",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
json={
"reference": "order-10001",
"company": "ikeja",
"meter_type": "prepaid",
"meter": "45012345678",
"amount": 500000,
"phone": "08031234567",
},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.post(
Uri.parse('https://api.developers.payonetime.ng/v1/electricity'),
headers: {'Authorization': 'Bearer $secret', 'Content-Type': 'application/json'},
body: jsonEncode({
'reference': 'order-10001',
'company': 'ikeja',
'meter_type': 'prepaid',
'meter': '45012345678',
'amount': 500000,
'phone': '08031234567',
}),
);TV
POST /tv
Renew a TV subscription.
referencestring · bodyRequiredYour own unique ID for this sale (4 to 64 letters, numbers, . _ -). Sending it again returns the first result and never charges twice.
package_idstring · bodyRequiredFrom GET /tv/packages.
smartcardstring · bodyRequiredSmartcard number. In test mode the last four digits choose the outcome.
phonestring · bodyRequiredNigerian mobile number.
allow_duplicateboolean · bodyOptional. Send true to buy the same number and amount again within the duplicate guard window (live only).
curl -X POST "https://api.developers.payonetime.ng/v1/tv" \
-H "Authorization: Bearer $PAYONETIME_SECRET" \
-H "Content-Type: application/json" \
-d '{"reference":"order-10001","package_id":"tv_dstv_compact","smartcard":"7027000111","phone":"08031234567"}'$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->post('https://api.developers.payonetime.ng/v1/tv', [
'reference' => 'order-10001',
'package_id' => 'tv_dstv_compact',
'smartcard' => '7027000111',
'phone' => '08031234567',
]);
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/tv', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
reference: 'order-10001',
package_id: 'tv_dstv_compact',
smartcard: '7027000111',
phone: '08031234567',
}),
});
const { data, error } = await response.json();import os, requests
response = requests.post(
"https://api.developers.payonetime.ng/v1/tv",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
json={
"reference": "order-10001",
"package_id": "tv_dstv_compact",
"smartcard": "7027000111",
"phone": "08031234567",
},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.post(
Uri.parse('https://api.developers.payonetime.ng/v1/tv'),
headers: {'Authorization': 'Bearer $secret', 'Content-Type': 'application/json'},
body: jsonEncode({
'reference': 'order-10001',
'package_id': 'tv_dstv_compact',
'smartcard': '7027000111',
'phone': '08031234567',
}),
);Balance
GET /balance
Main, commission and on-hold balances in kobo.
curl -X GET "https://api.developers.payonetime.ng/v1/balance" \ -H "Authorization: Bearer $PAYONETIME_SECRET"
$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->get('https://api.developers.payonetime.ng/v1/balance');
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/balance', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
},
});
const { data, error } = await response.json();import os, requests
response = requests.get(
"https://api.developers.payonetime.ng/v1/balance",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.get(
Uri.parse('https://api.developers.payonetime.ng/v1/balance'),
headers: {'Authorization': 'Bearer $secret'},
);Transactions
GET /transactions
Your sales, newest first.
statestring · querypending, successful, failed or reversed
servicestring · queryairtime, data, electricity or tv
limitstring · query1 to 100, default 20
cursorstring · querynext_cursor from the previous page
fromstring · queryStart date, e.g. 2026-11-01
tostring · queryEnd date
curl -X GET "https://api.developers.payonetime.ng/v1/transactions" \ -H "Authorization: Bearer $PAYONETIME_SECRET"
$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->get('https://api.developers.payonetime.ng/v1/transactions');
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/transactions', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
},
});
const { data, error } = await response.json();import os, requests
response = requests.get(
"https://api.developers.payonetime.ng/v1/transactions",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.get(
Uri.parse('https://api.developers.payonetime.ng/v1/transactions'),
headers: {'Authorization': 'Bearer $secret'},
);Transaction
GET /transactions/{reference}
The source of truth for one sale.
referencestring · pathRequiredcurl -X GET "https://api.developers.payonetime.ng/v1/transactions/order-10001" \ -H "Authorization: Bearer $PAYONETIME_SECRET"
$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->get('https://api.developers.payonetime.ng/v1/transactions/order-10001');
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/transactions/order-10001', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
},
});
const { data, error } = await response.json();import os, requests
response = requests.get(
"https://api.developers.payonetime.ng/v1/transactions/order-10001",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.get(
Uri.parse('https://api.developers.payonetime.ng/v1/transactions/order-10001'),
headers: {'Authorization': 'Bearer $secret'},
);Commissions
GET /commissions
Commission you have earned.
limitstring · query1 to 100, default 20
cursorstring · querynext_cursor from the previous page
fromstring · queryStart date, e.g. 2026-11-01
tostring · queryEnd date
curl -X GET "https://api.developers.payonetime.ng/v1/commissions" \ -H "Authorization: Bearer $PAYONETIME_SECRET"
$response = Http::withToken(env('PAYONETIME_SECRET'))
->timeout(60)
->get('https://api.developers.payonetime.ng/v1/commissions');
$data = $response->json('data');const response = await fetch('https://api.developers.payonetime.ng/v1/commissions', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.PAYONETIME_SECRET}`,
},
});
const { data, error } = await response.json();import os, requests
response = requests.get(
"https://api.developers.payonetime.ng/v1/commissions",
headers={"Authorization": f"Bearer {os.environ['PAYONETIME_SECRET']}"},
timeout=60,
)
data = response.json()// Call from your server. Never put a secret key inside a mobile app.
final response = await http.get(
Uri.parse('https://api.developers.payonetime.ng/v1/commissions'),
headers: {'Authorization': 'Bearer $secret'},
);Webhooks
Events: transaction.successful, transaction.failed, transaction.reversed. Check every message before trusting it, reject old timestamps, and handle each event ID once. Answer with any 2xx within 10 seconds; otherwise we retry for about 24 hours.
$expected = hash_hmac('sha256', $request->header('X-Payonetime-Timestamp').'.'.$request->getContent(), $signingSecret);
abort_unless(hash_equals($expected, $request->header('X-Payonetime-Signature'))
&& abs(time() - (int) $request->header('X-Payonetime-Timestamp')) < 300, 401);Errors
Every error has a code, a message and a request_id. Quote the request ID to support.
INVALID_KEYHTTP 401The API key is missing or not valid.
KEY_NOT_ALLOWEDHTTP 403This needs your secret key. A public key can only read the catalogue.
IP_NOT_ALLOWEDHTTP 403This server address is not on your allowed list.
ACCOUNT_NOT_ACTIVEHTTP 403This account cannot use the API right now.
VALIDATION_FAILEDHTTP 422Some fields are missing or not valid.
INVALID_PHONEHTTP 422Enter a Nigerian mobile number, for example 08031234567.
PLAN_UNAVAILABLEHTTP 422That plan does not exist or is not on sale.
METER_NOT_FOUNDHTTP 422No meter was found with that number.
SMARTCARD_NOT_FOUNDHTTP 422No smartcard was found with that number.
AMOUNT_OUT_OF_RANGEHTTP 422The amount is outside the allowed range.
INSUFFICIENT_BALANCEHTTP 402Your main wallet balance is too low.
REFERENCE_REUSEDHTTP 409This reference was already used for a different purchase.
DUPLICATE_PURCHASEHTTP 409The same number and amount were bought moments ago. If you really mean to buy again, send "allow_duplicate": true.
LIMIT_EXCEEDEDHTTP 403This sale is above your limit.
NUMBER_BLOCKEDHTTP 403Purchases for this number are blocked. Contact support.
SERVICE_UNAVAILABLEHTTP 503This service is not available right now. You have not been charged.
NOT_FOUNDHTTP 404Not found.
METHOD_NOT_ALLOWEDHTTP 405That method is not allowed here.
RATE_LIMITEDHTTP 429Too many requests. Slow down and try again shortly.
PROCESSING_ERRORHTTP 500Something went wrong on our side. If you were making a purchase, check its reference before trying again.
Rate limits
Per key: 120 reads and 60 purchases or checks a minute. Watch X-RateLimit-Remaining; after a 429, wait for Retry-After seconds.
Go-live checklist
- Your business verification is approved.
- Live keys are stored only on your server.
- Your server’s address is on the allowed list.
- Your code treats pending as unknown and never re-sends with a new reference.
- Your webhook checks the signature and ignores repeated event IDs.
- You have set a low balance warning.
