Getting started
AIRTIMLY API DOCUMENTATION
Base URL: https://airtimly.co/api
Format: JSON requests and JSON responses
API keys: generate and manage keys from Settings > Developer API
Integrate Airtimly services into your application using your developer API key. Keep your key private and check transaction status before retrying a purchase.
Manage API keysBrowse each service below. Every endpoint has its own explanation and, where provided in the API reference, a separate cURL or JSON example.
AIRTIMLY API DOCUMENTATION
Base URL: https://airtimly.co/api
Format: JSON requests and JSON responses
API keys: generate and manage keys from Settings > Developer API
Send your key in the Authorization header on EVERY request:
Authorization: Token YOUR_API_KEY
Content-Type: application/jsonMissing or wrong key (HTTP 401):
{
"status": false,
"message": "Invalid or revoked API token."
}Notes
- Your key can be locked to specific server IPs. Ask the admin.
- Limit: 120 requests per minute per key (HTTP 429 when exceeded).
- Phone numbers: 08012345678 and 2348012345678 are both accepted.
1 = MTN
2 = GLO
3 = 9MOBILE
4 = AIRTELPlan ids, cable provider/plan ids, disco ids and meter type ids come from the
GET endpoints below. Always use the "id" values they return.
GET /api/user
curl --location 'https://airtimly.co/api/user' \
--header 'Authorization: Token YOUR_API_KEY' \
--header 'Content-Type: application/json'Response (HTTP 200):
{
"status": true,
"message": "Okay",
"user": {
"id": 12,
"name": "John Doe",
"email": "john@mail.com",
"phone": "08012345678",
"balance": 5000
}
}GET /api/data
GET /api/data?network=1 (one network only)Response (HTTP 200):
{
"status": true,
"networks": [
{
"id": 1,
"name": "MTN",
"plans": [
{ "id": "PLAN_CODE", "name": "1GB SME (30 Days)", "amount": 250 },
{ "id": "PLAN_CODE_2", "name": "2GB SME (30 Days)", "amount": 500 }
]
},
{ "id": 2, "name": "GLO", "plans": [ ... ] },
{ "id": 3, "name": "9MOBILE", "plans": [ ... ] },
{ "id": 4, "name": "AIRTEL", "plans": [ ... ] }
]
}The plan "id" is the value you send as "plan" when buying.
POST /api/datacurl --location 'https://airtimly.co/api/data' \
--header 'Authorization: Token YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"network": 1,
"mobile_number": "08012345678",
"plan": "PLAN_CODE",
"Ported_number": true
}'Success (HTTP 200):
{
"status": "success",
"Status": "successful",
"message": "Data Purchase Successful.",
"response": "MTN 1GB SME (30 Days) sent to 08012345678",
"api_response": "MTN 1GB SME (30 Days) sent to 08012345678",
"request-id": "API_66bbd45c67b7b",
"service": "data",
"amount": "250",
"old_balance": 5000,
"new_balance": 4750
}GET /api/data?request-id=API_66bbd45c67b7bResponse (HTTP 200):
{
"status": "success",
"Status": "successful",
"message": "Transaction successful.",
"response": "MTN 1GB SME (30 Days) to 08012345678",
"api_response": "MTN 1GB SME (30 Days) to 08012345678",
"request-id": "API_66bbd45c67b7b",
"service": "data",
"amount": "250",
"created_at": "2026-10-16 10:21:05"
}status here can be "success", "processing" or "fail".
Unknown id (HTTP 404):
{
"status": "fail",
"Status": "failed",
"message": "Transaction not found.",
"request-id": "API_unknown"
}GET /api/topupResponse (HTTP 200):
{
"status": true,
"networks": [
{ "id": 1, "name": "MTN" },
{ "id": 2, "name": "GLO" },
{ "id": 3, "name": "9MOBILE" },
{ "id": 4, "name": "AIRTEL" }
],
"airtime_types": ["VTU"],
"min_amount": 50
}POST /api/topupcurl --location 'https://airtimly.co/api/topup' \
--header 'Authorization: Token YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"network": 1,
"amount": 100,
"mobile_number": "08012345678",
"Ported_number": true,
"airtime_type": "VTU"
}'Success (HTTP 200):
{
"status": "success",
"Status": "successful",
"message": "Airtime Purchase Successful.",
"response": "₦100 MTN airtime sent to 08012345678",
"api_response": "₦100 MTN airtime sent to 08012345678",
"request-id": "API_66bbd45c67b8c",
"service": "airtime",
"amount": "100",
"old_balance": 4750,
"new_balance": 4650
}GET /api/topup?request-id=API_66bbd45c67b8cResponse (HTTP 200):
{
"status": "success",
"Status": "successful",
"message": "Transaction successful.",
"response": "₦100 MTN airtime to 08012345678",
"api_response": "₦100 MTN airtime to 08012345678",
"request-id": "API_66bbd45c67b8c",
"service": "airtime",
"amount": "100",
"created_at": "2026-10-16 10:25:41"
}GET /api/cablesubResponse (HTTP 200):
{
"status": true,
"providers": [
{
"id": "DSTV",
"name": "DStv",
"plans": [
{ "id": "PLAN_CODE", "name": "Compact", "amount": 15700 },
{ "id": "PLAN_CODE_2", "name": "Padi", "amount": 4400 }
]
},
{ "id": "GOTV", "name": "GOtv", "plans": [ ... ] }
]
}"cablename" = provider id, "cableplan" = plan id (both from this list).
GET /api/validateiuc?cablename=DSTV&cableplan=PLAN_CODE&smart_card_number=1234567890Response (HTTP 200):
{
"status": true,
"message": "Okay",
"customer_name": "JOHN DOE",
"smart_card_number": "1234567890",
"provider": "DStv",
"plan": "Compact",
"amount": 15700
}Invalid card (HTTP 400):
{
"status": false,
"message": "We could not verify that smartcard number."
}POST /api/cablesubcurl --location 'https://airtimly.co/api/cablesub' \
--header 'Authorization: Token YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"cablename": "DSTV",
"cableplan": "PLAN_CODE",
"smart_card_number": "1234567890"
}'Success (HTTP 200):
{
"status": "success",
"Status": "successful",
"message": "Cable Subscription Successful.",
"response": "DStv Compact subscription for JOHN DOE (1234567890)",
"api_response": "DStv Compact subscription for JOHN DOE (1234567890)",
"request-id": "API_66bbd45c67b9d",
"service": "cable",
"amount": "15700",
"old_balance": 50000,
"new_balance": 34300,
"customer_name": "JOHN DOE",
"smart_card_number": "1234567890"
}GET /api/cablesub?request-id=API_66bbd45c67b9dResponse (HTTP 200):
{
"status": "success",
"Status": "successful",
"message": "Transaction successful.",
"response": "DStv Compact subscription for 1234567890",
"api_response": "DStv Compact subscription for 1234567890",
"request-id": "API_66bbd45c67b9d",
"service": "cable",
"amount": "15700",
"created_at": "2026-10-16 10:30:12"
}GET /api/billpaymentResponse (HTTP 200):
{
"status": true,
"min_amount": 500,
"max_amount": 500000,
"discos": [
{
"id": "DISCO_CODE",
"name": "Ikeja Electric",
"meter_types": [
{ "id": "METER_TYPE_CODE", "name": "Prepaid" },
{ "id": "METER_TYPE_CODE_2", "name": "Postpaid" }
]
}
]
}"disco_name" = disco id, "MeterType" = meter type id (both from this list).
For MeterType you may also send 1 (prepaid) or 2 (postpaid).
GET /api/validatemeter?disco_name=DISCO_CODE&MeterType=METER_TYPE_CODE&meter_number=1234567890Response (HTTP 200):
{
"status": true,
"message": "Okay",
"customer_name": "JOHN DOE",
"meter_number": "1234567890",
"disco": "Ikeja Electric",
"meter_type": "Prepaid"
}Invalid meter (HTTP 400):
{
"status": false,
"message": "We could not verify that meter number."
}POST /api/billpaymentcurl --location 'https://airtimly.co/api/billpayment' \
--header 'Authorization: Token YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"disco_name": "DISCO_CODE",
"MeterType": "METER_TYPE_CODE",
"meter_number": "1234567890",
"amount": 2000
}'Success (HTTP 200):
{
"status": "success",
"Status": "successful",
"message": "Electricity Purchase Successful.",
"response": "Ikeja Electric electricity for JOHN DOE (1234567890)",
"api_response": "Ikeja Electric electricity for JOHN DOE (1234567890)",
"request-id": "API_66bbd45c67bae",
"service": "electricity",
"amount": "2000",
"old_balance": 34300,
"new_balance": 32300,
"token": "5271 8659 3341 7720 1182",
"details": null,
"customer_name": "JOHN DOE",
"meter_number": "1234567890"
}"token" is the prepaid token. If no token could be read from the provider's
message, "token" is null and "details" carries the provider's message.
GET /api/billpayment?request-id=API_66bbd45c67baeResponse (HTTP 200):
{
"status": "success",
"Status": "successful",
"message": "Transaction successful.",
"response": "Ikeja Electric electricity for meter 1234567890 - Token: 5271 8659 3341 7720 1182",
"api_response": "Ikeja Electric electricity for meter 1234567890 - Token: 5271 8659 3341 7720 1182",
"request-id": "API_66bbd45c67bae",
"service": "electricity",
"amount": "2000",
"created_at": "2026-10-16 10:35:50"
}Creating a card needs identity and address verification completed in the app.
Card top-up and withdrawal amounts are in USD ($1 to $1,000). The "amount"
field in the response is the NAIRA charged to (or credited to) your wallet.
GET /api/cardResponse (HTTP 200):
{
"status": true,
"message": "Okay",
"ready": true,
"pricing": {
"creation_usd": 3,
"creation_ngn": 5400,
"rate": 1800,
"topup_fee_percent": 2,
"withdraw_rate": 1500
},
"cards": [
{
"id": 7,
"status": "active",
"name": "JOHN DOE",
"brand": "visa",
"type": "virtual",
"last4": "4821",
"masked_number": "**** **** **** 4821",
"expiry": "09/29",
"balance_usd": 10,
"created_at": "2026-10-10 09:12:44"
}
]
}"ready" is false until KYC is complete.
Card status values: pending, active, frozen, failed.
GET /api/card/7Response (HTTP 200):
{
"status": true,
"message": "Okay",
"card": {
"id": 7,
"status": "active",
"name": "JOHN DOE",
"brand": "visa",
"type": "virtual",
"last4": "4821",
"masked_number": "**** **** **** 4821",
"expiry": "09/29",
"balance_usd": 10,
"created_at": "2026-10-10 09:12:44",
"number": "4111 1111 1111 4821",
"cvv": "123",
"billing": {
"street": "12 Example Street",
"city": "Lagos",
"zip": "100001",
"country": "NG"
}
}
}Keep the number and CVV private. Not available (HTTP 404):
{ "status": false, "message": "Card not available." }GET /api/card/7/transactionsResponse (HTTP 200):
{
"status": true,
"message": "Okay",
"transactions": [
{ "...": "latest 30 card transactions as returned by the card provider" }
]
}POST /api/card (no body needed; "ref" optional)curl --location 'https://airtimly.co/api/card' \
--header 'Authorization: Token YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{ "ref": "my-unique-id-1" }'Accepted (HTTP 202):
{
"status": "processing",
"Status": "processing",
"message": "Your card is being created. Check GET /api/card until its status is active.",
"response": "Your card is being created. Check GET /api/card until its status is active.",
"api_response": "Your card is being created. Check GET /api/card until its status is active.",
"request-id": "CRD261016103512A1B2C3D4",
"service": "card",
"amount": "5400",
"old_balance": 20000,
"new_balance": 14600,
"card_id": 8
}Failed (HTTP 400, wallet refunded):
{
"status": "fail",
"Status": "failed",
"message": "Card creation failed. Your wallet has been refunded.",
"response": "Provider reason here",
"api_response": "Provider reason here",
"request-id": "CRD261016103512A1B2C3D4",
"service": "card",
"amount": "5400",
"old_balance": 20000,
"new_balance": 20000
}KYC missing (HTTP 403):
{
"status": "fail",
"Status": "failed",
"message": "Card access needs identity and address verification. Complete KYC in the app first."
}POST /api/card/topup--data '{ "card_id": 7, "amount": 10 }'Success (HTTP 200):
{
"status": "success",
"Status": "successful",
"message": "Card Top-up Successful.",
"response": "Card topped up with $10.00",
"api_response": "Card topped up with $10.00",
"request-id": "TUP261016104001E5F6A7B8",
"service": "card_topup",
"amount": "18360",
"old_balance": 50000,
"new_balance": 31640,
"card_id": 7,
"amount_usd": 10,
"fee_usd": 0.2
}Failed (HTTP 400, wallet refunded):
{
"status": "fail",
"Status": "failed",
"message": "Card top-up failed. Your wallet has been refunded.",
"response": "Provider reason here",
"api_response": "Provider reason here",
"request-id": "TUP261016104001E5F6A7B8",
"service": "card_topup",
"amount": "18360",
"old_balance": 50000,
"new_balance": 50000
}POST /api/card/withdraw--data '{ "card_id": 7, "amount": 5 }'At least $2 must always stay on the card.
Success (HTTP 200):
{
"status": "success",
"Status": "successful",
"message": "Card Withdrawal Successful.",
"response": "Withdrew $5.00 from your card to your wallet",
"api_response": "Withdrew $5.00 from your card to your wallet",
"request-id": "WDR261016104512C9D0E1F2",
"service": "card_withdraw",
"amount": "7500",
"old_balance": 31640,
"new_balance": 39140,
"card_id": 7,
"amount_usd": 5
}Too much (HTTP 400):
{
"status": "fail",
"Status": "failed",
"message": "You must leave at least $2.00 on your card. Maximum withdrawal: $8.00."
}POST /api/card/freeze--data '{ "card_id": 7, "mode": "freeze" }' ("freeze" or "unfreeze")Response (HTTP 200):
{
"status": "success",
"Status": "successful",
"message": "Card frozen. Payments will be declined until you unfreeze it.",
"service": "card_freeze",
"card_id": 7,
"card_status": "frozen"
}On unfreeze, message is "Card is active again." and card_status is "active".
POST requests return:
{
"status": "fail",
"Status": "failed",
"message": "What went wrong"
}GET requests return:
{
"status": false,
"message": "What went wrong"
}Common errors
Insufficient wallet balance (HTTP 402)
"Insufficient wallet balance. Please fund your wallet and try again."Invalid network (HTTP 400)
"Invalid network. Use 1 = MTN, 2 = GLO, 3 = 9MOBILE, 4 = AIRTEL."Invalid phone (HTTP 400)
"Enter a valid 11-digit mobile_number starting with 0, e.g. 08012345678."Airtime below minimum (HTTP 400)
"Minimum airtime amount is ₦50."Plan not found (HTTP 400)
"That plan is not available for this network. Get plan ids from GET /api/data."Duplicate ref (HTTP 409)
"Duplicate request: this ref was already used. Check the transaction status before retrying."Daily limit reached (HTTP 403)
the message says the limit that was reached.IP not allowed (HTTP 403)
"This IP address is not allowed for this API key."Account inactive (HTTP 403)
"This account is not active."Too many requests (HTTP 429)
"Too many requests. Slow down and try again shortly."Server error (HTTP 500)
"Something went wrong on our side. If you were charged, it is refunded automatically."200 Success
202 Processing (wallet charged, check with request-id)
400 Invalid input, or the purchase failed and was refunded
401 Missing or invalid token
402 Insufficient wallet balance
403 IP not allowed, account inactive, daily limit, or KYC needed
404 Not found
409 Duplicate ref
429 Too many requests
500 Server errorGET /api/gift-cardsReturns active gift cards, available countries, supported face values, and
the NGN rate used by the application. Use the returned card_id and country_id
values when purchasing.
POST /api/gift-cardsHeaders:
Authorization: Token YOUR_API_KEY
Content-Type: application/jsonExample body:
{
"card_id": 1,
"country_id": 1,
"amount": 25,
"ref": "your-unique-giftcard-reference"
}The amount is the gift card face value in the currency listed for that country.
The user's Airtimly wallet is charged the calculated NGN price. Orders are
created as pending and fulfilled through the gift-card fulfilment workflow.
A processing response includes request-id, service="gift_card", amount,
old_balance, and new_balance. Do not retry a processing purchase. Check it
using GET /api/gift-cards?request-id=REQUEST_ID.
GET /api/gift-cards?request-id=REQUEST_IDStatus is success when delivered, processing while awaiting fulfilment, and
fail if rejected/refunded. The response is scoped to the authenticated user.
Use a unique ref for every purchase. A duplicate ref is rejected with HTTP 409.
© All rights reserved. 2026, Airtimly