Quick Start
Send your first airtime top-up in under 5 minutes with the Click Airtime V2 API.
Quick Start
Send your first airtime top-up in under 5 minutes.
Prerequisites
- A Click Airtime enterprise account
- An API key from the Enterprise Portal
Get Your API Key
Log in to the Enterprise Portal, go to Settings → API Keys, and generate a new key. Your key will look like:
ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxCopy your key immediately — it won't be shown again.
Look Up Products
Use the catalog endpoint to find available products for a phone number:
curl -X GET "https://api.clickairtime.com/v2/catalog/lookup?phone_number=%2B233541112259" \
-H "Authorization: Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"const response = await fetch(
'https://api.clickairtime.com/v2/catalog/lookup?phone_number=%2B233541112259',
{
headers: {
'Authorization': 'Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
},
}
);
const { data } = await response.json();
console.log(data.network.name); // "MTN"
console.log(data.network.id); // 11 — you'll need this
console.log(data.products.custom_airtime); // { available: true, min_amount_local: 1, max_amount_local: 200, local_currency: 'GHS' }import requests
response = requests.get(
'https://api.clickairtime.com/v2/catalog/lookup',
params={'phone_number': '+233541112259'},
headers={'Authorization': 'Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'}
)
data = response.json()['data']
print(data['network']['name']) # "MTN"
print(data['network']['id']) # 11 — you'll need this
print(data['products']['custom_airtime']) # {'available': True, 'min_amount_local': 1, 'max_amount_local': 200, 'local_currency': 'GHS'}$ch = curl_init('https://api.clickairtime.com/v2/catalog/lookup?phone_number=%2B233541112259');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = json_decode(curl_exec($ch), true);
echo $result['data']['network']['name']; // "MTN"
echo $result['data']['network']['id']; // 11HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.clickairtime.com/v2/catalog/lookup?phone_number=%2B233541112259"))
.header("Authorization", "Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());The response includes the network.id (11 for MTN Ghana) and the available products:
products.custom_airtime— whether you can send a custom amount (available), the allowed range (min_amount_local..max_amount_local), and the currency to use (local_currency, hereGHS).products.fixed_bundles— fixed bundles; send a bundle's integeridasproduct_idinstead of anamount.
Send Airtime
Create a topup using the network ID from the catalog lookup. Here we send a custom amount of 1 GHS (within MTN Ghana's 1–200 GHS range). Include an Idempotency-Key so the request is safe to retry, and allow at least 30 seconds — the call waits for the operator and can take up to about 15 seconds.
curl -X POST "https://api.clickairtime.com/v2/topups" \
--max-time 30 \
-H "Authorization: Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: dc331c03-8acf-4766-8bf1-5da625683d52" \
-d '{
"phone_number": "+233541112259",
"network_id": 11,
"amount": {
"value": 1,
"currency": "GHS"
},
"reference": "order-1001"
}'const response = await fetch('https://api.clickairtime.com/v2/topups', {
method: 'POST',
headers: {
'Authorization': 'Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(), // reuse the same key if you retry
},
body: JSON.stringify({
phone_number: '+233541112259',
network_id: 11,
amount: { value: 1, currency: 'GHS' },
reference: 'order-1001',
}),
signal: AbortSignal.timeout(30000),
});
const { data } = await response.json();
console.log(data.status); // "completed"
console.log(data.cost); // { value: 0.0886, currency: "USD" }
console.log(data.provider_reference); // operator reference, e.g. "7688491163"import uuid
import requests
response = requests.post(
'https://api.clickairtime.com/v2/topups',
headers={
'Authorization': 'Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'Content-Type': 'application/json',
'Idempotency-Key': str(uuid.uuid4()), # reuse the same key if you retry
},
json={
'phone_number': '+233541112259',
'network_id': 11,
'amount': {'value': 1, 'currency': 'GHS'},
'reference': 'order-1001',
},
timeout=30,
)
data = response.json()['data']
print(data['status']) # "completed"
print(data['cost']) # {'value': 0.0886, 'currency': 'USD'}
print(data['provider_reference']) # operator reference, e.g. "7688491163"$ch = curl_init('https://api.clickairtime.com/v2/topups');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'Content-Type: application/json',
'Idempotency-Key: dc331c03-8acf-4766-8bf1-5da625683d52',
],
CURLOPT_POSTFIELDS => json_encode([
'phone_number' => '+233541112259',
'network_id' => 11,
'amount' => ['value' => 1, 'currency' => 'GHS'],
'reference' => 'order-1001',
]),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
]);
$result = json_decode(curl_exec($ch), true);
echo $result['data']['status']; // "completed"HttpClient client = HttpClient.newHttpClient();
String body = """
{
"phone_number": "+233541112259",
"network_id": 11,
"amount": { "value": 1, "currency": "GHS" },
"reference": "order-1001"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.clickairtime.com/v2/topups"))
.timeout(Duration.ofSeconds(30))
.header("Authorization", "Bearer ce_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
.header("Content-Type", "application/json")
.header("Idempotency-Key", UUID.randomUUID().toString())
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());The call returns 201 Created once the operator has confirmed delivery:
{
"success": true,
"data": {
"id": "6683ace0-794c-48fe-936b-b0f543baa7af",
"status": "completed",
"phone_number": "+233541112259",
"network": {
"id": 11,
"name": "MTN",
"country": "Ghana",
"country_code": "GH"
},
"amount": { "value": 1, "currency": "GHS" },
"cost": { "value": 0.0886, "currency": "USD" },
"wallet": {
"id": "094a21a0-ec42-4fbb-8a0c-97084de27b2c",
"type": "global",
"currency": "USD",
"strategy": "AUTO_PRIMARY"
},
"product_id": null,
"product_name": null,
"sms": { "enabled": false, "message": null },
"reference": "order-1001",
"provider_reference": "7688491163",
"failure_reason": null,
"metadata": {},
"created_at": "2026-10-13T13:24:48.420Z",
"completed_at": "2026-10-13T13:24:49.592Z"
},
"meta": {
"request_id": "req_c937fe484e15",
"timestamp": "2026-10-13T13:24:49.604Z"
}
}That's it! amount is what the recipient received (1 GHS), cost is what your wallet was charged after your rate and discount, in your wallet's currency, and provider_reference is the operator's reference for the delivery. The response is final — there is nothing to poll. If the request timed out before you got a response, retry it with the same Idempotency-Key; you will get the original result without being charged twice.
What's Next?
- Authentication — API key details and permissions
- Catalog Lookup — Full catalog API reference
- Supported Networks — Browse networks by country
- Send Airtime — Complete topup API reference
- Topup Status — Re-check a transaction later
- Wallet Balance — Check your wallet balance
- Error Codes — Handle errors gracefully
